Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #13930 (new defect)

Opened 8 months ago

Last modified 2 weeks ago

Intermittent failures building Python modules: unable to execute -DNDEBUG

Reported by: wiml@… Owned by: macports-tickets@…
Priority: Normal Milestone: Port Bugs
Component: ports Version: 1.6.0
Keywords: Cc: mww@…, florian.ebeling@…, blb@…, tolsen@…, pub1@…, brunogirin@…, macports@…, Ricardo.Cordeiro@…

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

  Changed 8 months ago by jmpp@…

  • milestone set to Port Bugs

  Changed 6 months ago by jmr@…

  • cc mww@… added

Some sort of race in setuptools perhaps?

  Changed 5 months ago by raimue@…

Has duplicate #14542.

  Changed 5 months 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.

  Changed 4 months 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

follow-up: ↓ 8   Changed 4 months ago by florian.ebeling@…

This is really an annoying issue, and it persists in trunk. Has anybody looked into this already?

  Changed 4 months ago by florian.ebeling@…

  • cc florian.ebeling@… added

Cc Me!

in reply to: ↑ 6   Changed 4 months ago by jmr@…

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.

  Changed 4 months 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.

  Changed 3 months ago by afb@…

Workaround implemented in r36722

follow-up: ↓ 12   Changed 2 months ago by macports@…

I'm still getting these errors (#15608 #15609 #15612), is r36722 in the current release (MacPorts 1.6 + port selfupdate)?

in reply to: ↑ 11   Changed 2 months ago by jmr@…

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.

  Changed 2 months ago by blb@…

  • cc blb@… added

Cc Me!

  Changed 8 weeks ago by tolsen@…

  • cc tolsen@… added

Cc Me!

  Changed 6 weeks ago by pub1@…

  • cc pub1@… added

Cc Me!

  Changed 6 weeks ago by brunogirin@…

  • cc brunogirin@… added

Cc Me!

  Changed 5 weeks ago by macports@…

  • cc macports@… added

Cc Me!

  Changed 2 weeks ago by Ricardo.Cordeiro@…

  • cc Ricardo.Cordeiro@… added

Cc Me!

Note: See TracTickets for help on using tickets.