#13930 closed defect (fixed)
Intermittent failures building Python modules: unable to execute -DNDEBUG
Reported by: | wiml@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 1.7.0 |
Component: | base | Version: | 1.6.0 |
Keywords: | Cc: | mww@…, febeling (Florian Ebeling), blb@…, tolsen (Tim Olsen), pub1@…, brunogirin@…, macports@…, Ricardo.Cordeiro@…, lars@…, peter.arrenbrecht@…, vpribish@…, iacanay@…, sirpete@…, terry@…, fhwi93ne@…, ryandesign (Ryan Carsten Schmidt), dhelder@…, skymoo (Adam Mercer), jannis@…, cooljeanius (Eric Gallager) | |
Port: |
Description
I'm not sure what's going on here. In all cases, quitting 'port' and restarting it and reissuing the 'install' command succeeds. But one time in five or so, building a Python-based port fails, apparently because it's set $CC to an empty string or something like that:
[var/root] > install py25-tkinter ---> Building py25-tkinter with target build Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-tkinter/work/Python-2.5.1/Modules" && /opt/local/bin/python2.5 setup.py build " returned error 1 Command output: running build running build_ext building '_tkinter' extension -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DWITH_APPINIT=1 -I/opt/local/include -I/opt/local/include/python2.5 -c _tkinter.c -o build/temp.macosx-10.3-i386-2.5/_tkinter.o unable to execute -DNDEBUG: No such file or directory error: command '-DNDEBUG' failed with exit status 1 Error: Status 1 encountered during processing. [var/root] > ^D Goodbye root@slowpoke# /opt/local/bin/port ~ MacPorts 1.600 Entering interactive mode... ("help" for help, "quit" to quit) [var/root] > install py25-tkinter ---> Building py25-tkinter with target build ---> Staging py25-tkinter into destroot ---> Installing py25-tkinter 2.5.1_0 ---> Activating py25-tkinter 2.5.1_0 ---> Cleaning py25-tkinter [var/root] > ^D
It's not the same port(s) each time, seems to be random.
Leopard 10.5.1/9B18, MacPorts 1.600, freshly installed and updated.
Change History (39)
comment:1 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)
Milestone: | → Port Bugs |
---|
comment:2 Changed 17 years ago by jmroot (Joshua Root)
Cc: | mww@… added |
---|
comment:4 Changed 17 years ago by afb@…
It seems that those python ports are expecting $CC to be set in build as well as in configure, and fall back to random values such as "" or "cc" or "/usr/bin/gcc-4.0" when it isn't. This probably also explains why rerunning the build sometimes succeeds, if something else was adding a $CC to the environment that can be picked up as a lucky guess second time.
Supposedly base wants to be enhanced to support CC in non-configure builds ?
Workaround meanwhile is adding build.env="CC=gcc"
while building the port.
comment:5 Changed 17 years ago by renatoc@…
I can also confirm this bug, while trying to install gtk2 and dependencies. I only noted this problem after uninstalling MacPorts (like stated in the !FAQ) and installing it again.
Anyway, I worked around this by setting
extra_env CC
in macports.conf
comment:6 follow-up: 8 Changed 17 years ago by febeling (Florian Ebeling)
This is really an annoying issue, and it persists in trunk. Has anybody looked into this already?
comment:8 Changed 17 years ago by jmroot (Joshua Root)
Replying to florian.ebeling@gmail.com:
This is really an annoying issue, and it persists in trunk. Has anybody looked into this already?
See this ML thread. It appears to be a bug in the environment handling in Leopard's Tcl.
comment:9 Changed 17 years ago by spambox@…
I can confirm this attempting to build deluge.
---> Building py25-hashlib with target build Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-hashlib/work/Python-2.5.2/Modules" && /opt/local/bin/python2.5 setup.py build " returned error 1 Command output: running build running build_ext building '_hashlib' extension creating build creating build/temp.macosx-10.3-i386-2.5 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/include -I/opt/local/include/python2.5 -c _hashopenssl.c -o build/temp.macosx-10.3-i386-2.5/_hashopenssl.o unable to execute -DNDEBUG: No such file or directory error: command '-DNDEBUG' failed with exit status 1
Reissuing the port install deluge command built py25-hashlib fine the second time.
comment:11 follow-up: 12 Changed 16 years ago by macports@…
comment:12 Changed 16 years ago by jmroot (Joshua Root)
Replying to macports@henrik.synth.no:
is r36722 in the current release (MacPorts 1.6 + port selfupdate)?
No, that's why this ticket isn't closed.
comment:25 Changed 16 years ago by jmroot (Joshua Root)
This is still not completely fixed in trunk @ r40402. I just ran port upgrade outdated
, which upgraded two ports, first ImageMagick and then py25-numpy. The latter failed with a classic env bug error: sh: -fno-strict-aliasing: command not found
, and succeeded after a clean.
comment:28 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|---|
Component: | ports → base |
Milestone: | Port Bugs → MacPorts base bugs |
comment:30 Changed 16 years ago by blb@…
Milestone: | MacPorts base bugs → MacPorts 1.7.0 |
---|
Since there's still at least one edge case (around python modules), placing in the 1.7.0 milestone so we can deal with it for that.
comment:32 follow-up: 33 Changed 16 years ago by blb@…
Resolution: | → fixed |
---|---|
Status: | new → closed |
This should now be finally fixed as of r41603, fortunately nethack and python modules were quite good at hitting this bug so gave good test cases; both now build quite smoothly in testing, but failed every time without the fix.
comment:33 follow-up: 34 Changed 16 years ago by afb@…
Replying to blb@…:
This should now be finally fixed as of r41603, fortunately nethack and python modules were quite good at hitting this bug so gave good test cases; both now build quite smoothly in testing, but failed every time without the fix.
Were you able to actually add it to the test case too ?
http://trac.macports.org/browser/trunk/base/src/pextlib1.0/tests/unsetenv.tcl
comment:34 Changed 16 years ago by blb@…
comment:36 follow-up: 37 Changed 16 years ago by bretthoerner@…
I'm running 1.6 on Leopard and synced, just wanted to note that it doesn't seem to be fixed for everything.
---> Building py25-libxml2 with target build /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py:248: UserWarning: 'licence' distribution option is deprecated; use 'license' warnings.warn(msg) running build running build_py running build_ext building 'libxml2mod' extension -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D_REENTRANT=1 -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c libxml2-py.c -o build/temp.macosx-10.3-i386-2.5/libxml2-py.o unable to execute -DNDEBUG: No such file or directory error: command '-DNDEBUG' failed with exit status 1 Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-libxml2/work/libxml2-python-2.6.21" && /opt/local/bin/python2.5 setup.py build " returned error 1 Command output: /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py:248: UserWarning: 'licence' distribution option is deprecated; use 'license' warnings.warn(msg) running build running build_py running build_ext building 'libxml2mod' extension -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D_REENTRANT=1 -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c libxml2-py.c -o build/temp.macosx-10.3-i386-2.5/libxml2-py.o unable to execute -DNDEBUG: No such file or directory error: command '-DNDEBUG' failed with exit status 1 Warning: the following items did not execute (for py25-libxml2): org.macports.activate org.macports.build org.macports.destroot org.macports.install Error: The following dependencies failed to build: gtk-doc gnome-doc-utils py25-libxml2 getopt Error: Unable to upgrade port: 1
comment:37 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to bretthoerner@…:
I'm running 1.6 on Leopard and synced, just wanted to note that it doesn't seem to be fixed for everything.
That's correct. MacPorts 1.6 experiences the issue. It is fixed in MacPorts 1.7.0-rc1 which is available now, and of course it will stay fixed when MacPorts 1.7.0 final is released.
Some sort of race in setuptools perhaps?