This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dev66
Recipients dev66, ronaldoussoren
Date 2011-02-26.16:52:59
SpamBayes Score 7.577272e-13
Marked as misclassified No
Message-id <1298739181.17.0.400956610125.issue11334@psf.upfronthosting.co.za>
In-reply-to
Content
hi community,

i cannot import multiprocessing since it fails(?) during build.
could someone point out a solution for me?

thanks a lot in advance.
dave



$ python
Python 2.7.1 (r271:86832, Feb 26 2011, 17:19:29) 
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import threading
>>> import multiprocessing
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/tools/python/lib/python2.7/multiprocessing/__init__.py", line 83, in <module>
    import _multiprocessing
ImportError: No module named _multiprocessing




This is what i did to compile python 2.7:

export MACOSX_DEPLOYMENT_TARGET=10.6
export ARCHFLAGS="-arch i386"
export CXXFLAGS="-arch i386"
export CFLAGS="-arch i386"
export FFLAGS="-arch i386"
export LDFLAGS="-Wall -undefined dynamic_lookup -arch i386"

./configure
checking for --enable-universalsdk... no
checking for --with-universal-archs... 32-bit
checking MACHDEP... darwin
checking EXTRAPLATDIR... $(PLATMACDIRS)
checking machine type as reported by uname -m... i386
checking for --without-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for --with-cxx-main=<compiler>... no
checking for g++... g++
[...]
config.status: pyconfig.h is unchanged
creating Modules/Setup
creating Modules/Setup.local
creating Makefile


make -j 4
[...]
/private/var/tmp/Python-2.7.1/Modules/_multiprocessing/semaphore.c: In function 'semlock_acquire':
/private/var/tmp/Python-2.7.1/Modules/_multiprocessing/semaphore.c:314: warning: implicit declaration of function 'sem_timedwait'
*** WARNING: renaming "_multiprocessing" since importing it failed: dlopen(build/lib.macosx-10.6-i386-2.7/_multiprocessing.so, 2): Symbol not found: _sem_timedwait
  Referenced from: /private/var/tmp/Python-2.7.1/build/lib.macosx-10.6-i386-2.7/_multiprocessing.so
  Expected in: flat namespace
 in /private/var/tmp/Python-2.7.1/build/lib.macosx-10.6-i386-2.7/_multiprocessing.so
[...]
ranlib libpython2.7.a
gcc -Wall -undefined dynamic_lookup -arch i386 -u _PyMac_Error -o python.exe \
                        Modules/python.o \
                        libpython2.7.a -ldl  -framework CoreFoundation     
building dbm using ndbm

Python build finished, but the necessary bits to build these modules were not found:
_bsddb             gdbm               linuxaudiodev   
ossaudiodev        sunaudiodev                        
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

Failed to build these modules:
_multiprocessing   spwd
History
Date User Action Args
2011-02-26 16:53:01dev66setrecipients: + dev66, ronaldoussoren
2011-02-26 16:53:01dev66setmessageid: <1298739181.17.0.400956610125.issue11334@psf.upfronthosting.co.za>
2011-02-26 16:53:00dev66linkissue11334 messages
2011-02-26 16:52:59dev66create