Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build _multiprocessing on Mac OS X #55543

Closed
dev66 mannequin opened this issue Feb 26, 2011 · 2 comments
Closed

Failed to build _multiprocessing on Mac OS X #55543

dev66 mannequin opened this issue Feb 26, 2011 · 2 comments
Labels
build The build process and cross-build OS-mac

Comments

@dev66
Copy link
Mannequin

dev66 mannequin commented Feb 26, 2011

BPO 11334
Nosy @ronaldoussoren, @ned-deily

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2011-02-26.21:45:33.294>
created_at = <Date 2011-02-26.16:53:00.597>
labels = ['OS-mac', 'build']
title = 'Failed to build _multiprocessing on Mac OS X'
updated_at = <Date 2011-02-26.21:45:33.293>
user = 'https://bugs.python.org/dev66'

bugs.python.org fields:

activity = <Date 2011-02-26.21:45:33.293>
actor = 'dev66'
assignee = 'none'
closed = True
closed_date = <Date 2011-02-26.21:45:33.294>
closer = 'dev66'
components = ['macOS']
creation = <Date 2011-02-26.16:53:00.597>
creator = 'dev66'
dependencies = []
files = []
hgrepos = []
issue_num = 11334
keywords = []
message_count = 2.0
messages = ['129573', '129601']
nosy_count = 5.0
nosy_names = ['ronaldoussoren', 'ned.deily', 'jnoller', 'asksol', 'dev66']
pr_nums = []
priority = 'normal'
resolution = 'works for me'
stage = None
status = 'closed'
superseder = None
type = 'compile error'
url = 'https://bugs.python.org/issue11334'
versions = ['Python 2.7']

@dev66
Copy link
Mannequin Author

dev66 mannequin commented Feb 26, 2011

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

@dev66 dev66 mannequin assigned ronaldoussoren Feb 26, 2011
@dev66 dev66 mannequin added OS-mac build The build process and cross-build labels Feb 26, 2011
@dev66
Copy link
Mannequin Author

dev66 mannequin commented Feb 26, 2011

seems the multiprocessing issue was produced by the dynamic_lookup
parameter in the LDFLAGS...
after removing this, "import multiprocessing" works...

thanks

export LDFLAGS="-Wall -undefined dynamic_lookup -arch i386"

@dev66 dev66 mannequin closed this as completed Feb 26, 2011
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build OS-mac
Projects
None yet
Development

No branches or pull requests

1 participant