Opened 10 years ago
Closed 10 years ago
#45870 closed defect (fixed)
python3*: configuration issue breaks anjuta +python34
Reported by: | dbevans (David B. Evans) | Owned by: | dbevans (David B. Evans) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.2 |
Keywords: | Cc: | ||
Port: | anjuta |
Description
anjuta +python34 fails trying to link to the python34 library:
:info:build libtool: link: /usr/bin/clang -Wl,-undefined -Wl,dynamic_lookup -o .libs/libanjuta-python-loader.so -bundle .libs/plugin.o -L/opt/local/lib ../../libanjuta/.libs/libanjuta-3.dylib -lgthread-2.0 -lgmodule-2.0 -lxml2 -lgdl-3 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpangoft2-1.0 -lpango-1.0 -lm -lfontconfig -lfreetype -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl -ldl -framework CoreFoundation -lpython3.4m -arch x86_64 -Os -arch x86_64 -Wl,-headerpad_max_install_names -arch x86_64 -framework CoreFoundation :info:build ld: library not found for -lpython3.4m :info:build clang: error: linker command failed with exit code 1 (use -v to see invocation) :info:build make[3]: *** [libanjuta-python-loader.la] Error 1 :info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_macports_users_devans_GNOME-3_stable_dports_gnome_anjuta/anjuta/work/anjuta-3.14.0/plugins/python-loader' :info:build make[2]: *** [all-recursive] Error 1 :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_macports_users_devans_GNOME-3_stable_dports_gnome_anjuta/anjuta/work/anjuta-3.14.0/plugins' :info:build make[1]: *** [all-recursive] Error 1 :info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_macports_users_devans_GNOME-3_stable_dports_gnome_anjuta/anjuta/work/anjuta-3.14.0' :info:build make: *** [all] Error 2 :info:build make: Leaving directory `/opt/local/var/macports/build/_opt_macports_users_devans_GNOME-3_stable_dports_gnome_anjuta/anjuta/work/anjuta-3.14.0'
Indeed, /opt/local/lib/libpython3.4m is not provided by python34.
However, anjuta +python27 succeeds due to the fact that python27 installs a symbolic link to the python27 library for this purpose in post-destroot
post-destroot { set framewpath ${frameworks_dir}/Python.framework set framewdir ${framewpath}/Versions/${branch} foreach dir { Headers Resources Python Versions/Current } { file delete ${destroot}${framewpath}/${dir} } ln -s ${framewdir}/share/man/man1/python${branch}.1 ${destroot}${prefix}/share/man/man1/ ln -s ${framewdir}/Python ${destroot}${prefix}/lib/libpython${branch}.dylib foreach unversionedFile {2to3 2to3-2 idle idle2 pydoc pydoc2 python python2 python-config python2-config pythonw pythonw2 smtpd.py smtpd2.py} { delete ${destroot}${prefix}/bin/${unversionedFile} } # remove -arch flags from the config reinplace -E {s|-arch [a-z0-9_]+||g} \ ${destroot}${framewdir}/lib/python${branch}/config/Makefile \ ${destroot}${framewdir}/lib/python${branch}/_sysconfigdata.py }
The python34 (and the python3* ports in general) skip this link
post-destroot { set framewpath ${frameworks_dir}/Python.framework set framewdir ${framewpath}/Versions/${branch} foreach dir { Headers Resources Python Versions/Current } { file delete ${destroot}${framewpath}/${dir} } ln -s ${framewdir}/share/man/man1/python${branch}.1 ${destroot}${prefix}/share/man/man1/ # Without this, LINKFORSHARED is set to # ... $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) # (this becomes Python.framework/Versions/3.2/Python) which doesn't # quite work (see ticket #15099); instead specifically list the # full path to the proper Python framework file (which becomes # ${prefix}/Library/Frameworks/Python.framework/Versions/3.2/Python) reinplace {s|^\(LINKFORSHARED=.*\)$(PYTHONFRAMEWORKDIR).*$|\1 $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)|} ${destroot}${framewdir}/lib/python${branch}/$confdir/Makefile # remove -arch flags from the config reinplace -E {s|-arch [a-z0-9_]+||g} \ ${destroot}${framewdir}/lib/python${branch}/$confdir/Makefile foreach unversioned {2to3 idle3 pydoc3 python3 python3-config pyvenv} { delete ${destroot}${prefix}/bin/${unversioned} } }
Manually creating the link fixes the problem. Is there any reason, that this action should not be added to the python3 post-destroot phase?
Change History (3)
comment:1 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Owner: | changed from jwa@… to devans@… |
---|---|
Port: | anjuta added; python34 python33 python32 python31 removed |
comment:2 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Yep. configure.ac has:
configure.ac: PYTHON_LIBS=`$PYTHON$PYTHON_VERSION-config --libs` configure.ac: AC_SUBST(PYTHON_LIBS)
anjuta isn't trying to link with the correct ldflags.
comment:3 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Seems to be a build issue with anjuta. I suspect they're using --libs rather than --ldflags: