Opened 14 years ago

Closed 14 years ago

#22584 closed defect (invalid)

Mercurial missing _locale

Reported by: wobbet@… Owned by: blb@…
Priority: Normal Milestone:
Component: ports Version: 1.8.0
Keywords: Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), deric@…
Port: python26

Description (last modified by jmroot (Joshua Root))

Running SnowLeopard on 32-bit MacBookPro2,2.

Config edited file to add +universal for all ports.

I performed a

sudo port clean --all all sudo port install python26 sudo port install mercurial

Both reported success.

When I attempt to execute

hg clone ...

I receive the following trace indicating that _locale is missing.

Traceback (most recent call last):
  File "/opt/local/bin/hg", line 27, in <module>
    mercurial.dispatch.run()
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py",
line 16, in run
    sys.exit(dispatch(sys.argv[1:]))
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py",
line 27, in dispatch
    return _runcatch(u, args)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py",
line 97, in _runcatch
    ui.warn(_("abort: could not import module %s!\n") % m)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/i18n.py",
line 43, in gettext
    return u.encode(encoding.encoding, "replace")
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/demandimport.py",
line 75, in __getattribute__
    self._load()
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/demandimport.py",
line 47, in _load
    mod = _origimport(head, globals, locals)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/encoding.py",
line 22, in <module>
    encoding = locale.getpreferredencoding() or 'ascii'
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/locale.py",
line 531, in getpreferredencoding
    import _locale
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/demandimport.py",
line 84, in _demandimport
    return _origimport(name, globals, locals, fromlist)
ImportError: No module named _locale

Change History (6)

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Cc: mcalhoun@… deric@… added
Description: modified (diff)
Keywords: mercurial _locale removed
Owner: changed from macports-tickets@… to blb@…
Port: python26 added; mercurial removed

If _locale is missing entirely that would be a problem with python26. Can you import _locale manually in an interactive interpreter? Is /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_locale.so present, and if so, what are the permissions on it? (Could be a umask issue a la #21389.)

comment:2 in reply to:  1 Changed 14 years ago by wobbet@…

Replying to jmr@…:

If _locale is missing entirely that would be a problem with python26. Can you import _locale manually in an interactive interpreter? Is /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_locale.so present, and if so, what are the permissions on it? (Could be a umask issue a la #21389.)

_locale is not present but _locale_failed is.

Macintosh-2:~ wobbet$ ls /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/
ColorPicker.so                  _Icn.so                         _codecs_jp.so                   _socket.so                      gdbm.so
MacOS.so                        _Launch.so                      _codecs_kr.so                   _sqlite3.so                     gestalt.so
OSATerminology.so               _List.so                        _codecs_tw.so                   _ssl.so                         grp.so
Python-2.6.2-py2.6.egg-info     _Menu.so                        _collections.so                 _struct.so                      icglue.so
_AE.so                          _Mlte.so                        _csv.so                         _testcapi.so                    itertools.so
_AH.so                          _OSA.so                         _ctypes.so                      _tkinter.so                     math.so
_App.so                         _Qd.so                          _ctypes_test.so                 _weakref.so                     mmap.so
_CF.so                          _Qdoffs.so                      _curses_panel_failed.so         array.so                        nis.so
_CG.so                          _Qt.so                          _elementtree.so                 audioop.so                      operator.so
_CarbonEvt.so                   _Res.so                         _fileio.so                      autoGIL.so                      parser.so
_Cm.so                          _Scrap.so                       _functools.so                   binascii.so                     pyexpat.so
_Ctl.so                         _Snd.so                         _hashlib.so                     bz2.so                          readline.so
_Dlg.so                         _TE.so                          _heapq.so                       cPickle.so                      resource.so
_Drag.so                        _Win.so                         _hotshot.so                     cStringIO.so                    select.so
_Evt.so                         _bisect.so                      _json.so                        cmath.so                        strop.so
_File.so                        _bsddb.so                       _locale_failed.so               crypt.so                        syslog.so
_Fm.so                          _bytesio.so                     _lsprof.so                      datetime.so                     termios.so
_Folder.so                      _codecs_cn.so                   _multibytecodec.so              dbm.so                          time.so
_Help.so                        _codecs_hk.so                   _multiprocessing.so             fcntl.so                        unicodedata.so
_IBCarbon.so                    _codecs_iso2022.so              _random.so                      future_builtins.so              zlib.so

comment:3 Changed 14 years ago by wobbet@…

Additional Information...

Macintosh-2:~ wobbet$ port installed python26
The following ports are currently installed:
  python26 @2.6.2_4+darwin+universal (active)

comment:4 Changed 14 years ago by blb@…

What is the result from running the following commands?

$ lipo -info /opt/local/bin/python2.6
$ port installed gettext
$ lipo -info /opt/local/lib/libintl.8.dylib

comment:5 in reply to:  4 Changed 14 years ago by wobbet@…

Replying to blb@…:

What is the result from running the following commands?

$ lipo -info /opt/local/bin/python2.6
$ port installed gettext
$ lipo -info /opt/local/lib/libintl.8.dylib
Macintosh-2:~ wobbet$ lipo -info /opt/local/bin/python2.6
Architectures in the fat file: /opt/local/bin/python2.6 are: x86_64 i386 
Macintosh-2:~ wobbet$ port installed gettext
The following ports are currently installed:
  gettext @0.16.1_0
  gettext @0.17_3
  gettext @0.17_4 (active)
Macintosh-2:~ wobbet$ lipo -info /opt/local/lib/libintl.8.dylib
Non-fat file: /opt/local/lib/libintl.8.dylib is architecture: x86_64

comment:6 Changed 14 years ago by blb@…

Resolution: invalid
Status: newclosed

That would be the issue, if you want a given port +universal, all of its dependencies need to also be +universal. MacPorts currently can't do this automatically (see ticket #126), so you have to make sure of it yourself.

Note: See TracTickets for help on using tickets.