Opened 11 years ago

Closed 11 years ago

#40167 closed defect (invalid)

python27: destroot fails: error: use of undeclared identifier 'Dl_info'

Reported by: rob.edgerley@… Owned by: jyrkiwahlstedt
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: python27

Description

Xcode Version 4.6.3 Mac OSX Version 10.8.4 MacPort Version 2.2.0

Hi all,

After spending (waisting) quite a number of hours on this problem, I've finally decided to submit a ticket ..

I'm trying to upgrade my outdated ports, specifically python27 (2.7.3.1) to python27 (2.7.5.1) and mercurial, but I encounter the same issue every time.

After launching: sudo port upgrade python27, I get the following error message:

Error: org.macports.destroot for port python27 returned: command execution failed
Please see the log file for port python27 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_distfiles.macports.org_ports_lang_python27/python27/main.log
Error: Unable to upgrade port: 1

After launching again with debugging information activated: sudo port -d upgrade python27, I get the following error message:

warning and 5 errors generated.
make[1]: *** [pythonw] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_distfiles.macports.org_ports_lang_python27/python27/work/Python-2.7.5/Mac'
make: *** [frameworkinstallapps] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_distfiles.macports.org_ports_lang_python27/python27/work/Python-2.7.5'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_distfiles.macports.org_ports_lang_python27/python27/work/Python-2.7.5" && /usr/bin/make -w frameworkinstall maninstall MAKE="/usr/bin/make CC=/usr/bin/clang" DESTDIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_distfiles.macports.org_ports_lang_python27/python27/work/destroot 
Exit code: 2
Error: org.macports.destroot for port python27 returned: command execution failed
DEBUG: Error code: CHILDSTATUS 84981 2
DEBUG: Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec destroot"
    (procedure "portdestroot::destroot_main" line 2)
    invoked from within
"$procedure $targetname"
Warning: targets not executed for python27: org.macports.install org.macports.destroot
Please see the log file for port python27 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_distfiles.macports.org_ports_lang_python27/python27/main.log
DEBUG: couldn't open "/System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/tclIndex": no such file or directory
    while executing
"open [file join $dir tclIndex]"
Error: Unable to upgrade port: 1

I've tried the following:

sudo port -d selfupdate
sudo port clean all
sudo port clean python27
sudo port select --list python
sudo port select --set python27
sudo port --d sync

But alas, nothing has worked. Still the same error.

The last message that I see in the debug window quite often is "---> Staging python27 into destroot", then the error message comes.

I've checked everything I can think of, and exhausted my google search ideas.

Thanks in advance for your support!

Attachments (1)

main.log (1.1 MB) - added by rob.edgerley@… 11 years ago.
Error log file

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by rob.edgerley@…

Attachment: main.log added

Error log file

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Owner: changed from macports-tickets@… to jwa@…
Port: mercurial etc removed
Summary: port upgrade python27python27: destroot fails: error: use of undeclared identifier 'Dl_info'

The relevant error in the log seems to be:

:info:destroot /usr/bin/clang -arch x86_64 -arch i386 -isysroot / -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/db46 -arch x86_64 -arch i386 -DPYTHONFRAMEWORK='"Python"' -o pythonw ./Tools/pythonw.c -I.. -I./../Include ../Python.framework/Versions/2.7/Python
:info:destroot ./Tools/pythonw.c:58:5: error: use of undeclared identifier 'Dl_info'
:info:destroot     Dl_info info;
:info:destroot     ^

This was not a clean build and we would usually ask you to clean and try again, and we may yet do so if the below does not lead to a solution.

I Googled that error message and found one hit, on the fink mailing list, implicating an ancient copy of dlfcn in /usr/local. Do you have either or both of these files?

/usr/local/include/dlfcn.h
/usr/local/lib/libdl.dylib

If so, delete them, clean python27 and try again.

In general, we do not support users having files in /usr/local because of these types of conflicts.

comment:2 Changed 11 years ago by rob.edgerley@…

Well I'm both delighted and frustrated at the same time. I searched all day for a fix, and couldn't find a thing. That did the trick, thanks _very_ much!

Just to summarise the problem and fix:

Problem: Upgrade of py-*, mercurial, kate etc. etc. failed because python27 failed to make the necessary upgrade. Solution: delete† the following file files (if they exist):

/usr/local/include/dlfcn.h
/usr/local/lib/libdl.dylib

Solution: Perform a clean of the ports,

sudo port clean all

Upgrade (with debug information for good measure):

sudo port -d upgrade python27

If everything passes then, upgrade the remaining outdated ports.

sudo port upgrade outdated

Et voila!

Thanks again for the support!

† Take caution when deleting any kind of file. Check that it is safe for you to do so first. In my case, I renamed these files before deleting them, just to be on the safe side.

comment:3 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: invalid
Status: newclosed

Glad that worked!

Note: See TracTickets for help on using tickets.