[MacPorts] #18848: python26 : no dynamic library built
#18848: python26 : no dynamic library built --------------------------------+------------------------------------------- Reporter: neric27@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: python26 --------------------------------+------------------------------------------- python26 doesn't build any shared library (libpython2.6.dylib). Why is it so ? I mark it as defect, as it's required by other ports (samba4). -- Ticket URL: <http://trac.macports.org/ticket/18848> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18848: python26 : no dynamic library built --------------------------------+------------------------------------------- Reporter: neric27@… | Owner: blb@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: python26 --------------------------------+------------------------------------------- Changes (by macsforever2000@…): * cc: mcalhoun@…, macsforever2000@…, erickt@…, clubjuggler@… (added) * owner: macports-tickets@… => blb@… -- Ticket URL: <http://trac.macports.org/ticket/18848#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18848: python26 : no dynamic library built --------------------------------+------------------------------------------- Reporter: neric27@… | Owner: blb@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: python26 --------------------------------+------------------------------------------- Changes (by macsforever2000@…): * cc: macsforever2000@…, erickt@…, clubjuggler@… (removed) -- Ticket URL: <http://trac.macports.org/ticket/18848#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18848: python26 : no dynamic library built ---------------------------------+------------------------------------------ Reporter: neric27@… | Owner: blb@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Resolution: fixed | Keywords: Port: python26 | ---------------------------------+------------------------------------------ Changes (by blb@…): * status: new => closed * resolution: => fixed Comment: Actually the problem was that python26-config isn't providing quite the right answer; fixed in r48182. -- Ticket URL: <http://trac.macports.org/ticket/18848#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18848: python26 : no dynamic library built ---------------------------------+------------------------------------------ Reporter: neric27@… | Owner: blb@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Resolution: fixed | Keywords: Port: python26 | ---------------------------------+------------------------------------------ Comment(by neric27@…): Hi, I just tried again to build python26 @2.6.1_1 and guess what ? no libpython2.6.dylib :-( There is a static version, but it was also there in python 2.6.1_0 {{{ $ port installed python26 The following ports are currently installed: python26 @2.6.1_0 python26 @2.6.1_1 (active) $ port contents python26 | grep libpython /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config/libpython2.6.a $ port contents python26 | grep dylib /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ctypes/macholib/dylib.py /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ctypes/macholib/dylib.pyc /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ctypes/macholib/dylib.pyo }}} Cheers, -- Ticket URL: <http://trac.macports.org/ticket/18848#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18848: python26 : no dynamic library built ---------------------------------+------------------------------------------ Reporter: neric27@… | Owner: blb@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Resolution: fixed | Keywords: Port: python26 | ---------------------------------+------------------------------------------ Comment(by blb@…): Replying to [comment:4 neric27@…]:
Hi, I just tried again to build python26 @2.6.1_1 and guess what ? no libpython2.6.dylib :-(
Right, there isn't one, but the update fixed what python26-config lists for proper linking flags (eg, what samba4 uses to link to it): {{{ $ python2.6-config --ldflags -L/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config -ldl -lpython2.6 }}} Using those flags will get things to link properly. -- Ticket URL: <http://trac.macports.org/ticket/18848#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18848: python26 : no dynamic library built ---------------------------------+------------------------------------------ Reporter: neric27@… | Owner: blb@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Resolution: fixed | Keywords: Port: python26 | ---------------------------------+------------------------------------------ Comment(by neric27@…): Sorry, but it doesn't work (yes I did port clean !). Here is an excerpt from the configure output : {{{ checking for sys/epoll.h... no checking for epoll_create... no checking for swig... no configure: WARNING: cannot find 'swig' program. You should look at http://www.swig.org checking for python... /opt/local/bin/python checking for a version of Python >= '2.1.0'... yes checking for the distutils Python package... yes checking for Python include path... -I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 checking for Python library path... -L/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 -lpython2.6 checking for Python site-packages path... /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 /site-packages checking python extra libraries... -ldl checking python extra linking flags... -u _PyMac_Error /opt/local/Library/Frameworks/Python.framework/Versions/2.6/Python checking whether to use pthreads... no checking whether to search for setproctitle support... no checking for tv_nsec nanosecond fields in struct stat... }}} And here is the error : {{{ Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_samba4/work/samba-4.0.0alpha2/source" && make all " returned error 2 Command output: Creating bin/ldb_repl_meta_data_init_module.c Compiling bin/ldb_repl_meta_data_init_module.c Linking bin/modules/ldb/repl_meta_data.dylib Compiling dsdb/samdb/ldb_modules/kludge_acl.c dsdb/samdb/ldb_modules/kludge_acl.c: In function 'kludge_acl_search': dsdb/samdb/ldb_modules/kludge_acl.c:328: warning: assignment discards qualifiers from pointer target type dsdb/samdb/ldb_modules/kludge_acl.c:367: warning: passing argument 1 of 'ldb_parse_tree_attr_replace' discards qualifiers from pointer target type Creating bin/ldb_kludge_acl_init_module.c Compiling bin/ldb_kludge_acl_init_module.c Linking bin/modules/ldb/kludge_acl.dylib Compiling dsdb/samdb/ldb_modules/local_password.c Creating bin/ldb_local_password_init_module.c Compiling bin/ldb_local_password_init_module.c Linking bin/modules/ldb/local_password.dylib Compiling dsdb/samdb/ldb_modules/schema.c dsdb/samdb/ldb_modules/schema.c: In function 'schema_check_attributes_syntax': dsdb/samdb/ldb_modules/schema.c:936: warning: assignment discards qualifiers from pointer target type Compiling dsdb/samdb/ldb_modules/schema_syntax.c Creating bin/ldb_schema_init_module.c Compiling bin/ldb_schema_init_module.c Linking bin/modules/ldb/schema.dylib Compiling libcli/security/security_wrap.c libcli/security/security_wrap.c: In function '_wrap_security_descriptor_dacl_del': libcli/security/security_wrap.c:3203: warning: passing argument 2 of 'security_descriptor_dacl_del' from incompatible pointer type libcli/security/security_wrap.c: In function '_wrap_security_descriptor_sacl_del': libcli/security/security_wrap.c:3244: warning: passing argument 2 of 'security_descriptor_sacl_del' from incompatible pointer type Linking bin/python/_security.dylib /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: can't locate file for: -lpython2.6 collect2: ld returned 1 exit status make: *** [bin/python/_security.dylib] Error 1 Warning: the following items did not execute (for samba4): org.macports.activate org.macports.build org.macports.destroot org.macports.archive org.macports.install Error: Status 1 encountered during processing. }}} -- Ticket URL: <http://trac.macports.org/ticket/18848#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18848: python26 : no dynamic library built ---------------------------------+------------------------------------------ Reporter: neric27@… | Owner: blb@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Resolution: fixed | Keywords: Port: python26 | ---------------------------------+------------------------------------------ Comment(by blb@…): That may be a samba4 issue; I tried updating to alpha7 and it fails someplace else entirely, unrelated to python...also note that samba4 doesn't have any python ports as dependencies so that may be another issue with it. -- Ticket URL: <http://trac.macports.org/ticket/18848#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18848: python26 : no dynamic library built ---------------------------------+------------------------------------------ Reporter: neric27@… | Owner: blb@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Resolution: fixed | Keywords: Port: python26 | ---------------------------------+------------------------------------------ Comment(by neric27@…): Please, can you make a clear statement about why no dynamic library is built ? -- Ticket URL: <http://trac.macports.org/ticket/18848#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18848: python26 : no dynamic library built ---------------------------------+------------------------------------------ Reporter: neric27@… | Owner: blb@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Resolution: fixed | Keywords: Port: python26 | ---------------------------------+------------------------------------------ Comment(by mcalhoun@…): Replying to [comment:8 neric27@…]:
Please, can you make a clear statement about why no dynamic library is built ? A dynamic library is being built, but it is not installed in the way samba4 expects.
As has been previously indicated, dynamic libraries can be installed in the form libXYZ.dylib.[[BR]] They are linked in with {{{ gcc ... -L... -lXYZ }}} python26 installs as a Framework.[[BR]] It is inteded to be linked in as {{{ gcc ... -F... -framework Python }}} Although this is only possible if python_select is installed. To be sure to link in the correct library, you simply have to give the full path {{{ gcc ... ${frameworks_dir}/Python.framework/Versions/2.6/Python }}} ${frameworks_dir}/Python.framework/Versions/2.6/Python[[BR]] is the dynamic library, just with the Framework naming convention. You can ask python how to link in the library, and it would give the correct answer.[[BR]] samba4, unfortunately, does not ask python.[[BR]] It simply assumes the -L .. -lxxx structure.[[BR]] This is why the earlier post suggested that it was a samba4 problem. -- Ticket URL: <http://trac.macports.org/ticket/18848#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18848: python26 : no dynamic library built ---------------------------------+------------------------------------------ Reporter: neric27@… | Owner: blb@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Resolution: fixed | Keywords: Port: python26 | ---------------------------------+------------------------------------------ Comment(by blb@…): Note that you can also use the -L... -l... method, if you use what python2.6-config tells you (which is what was fixed in r48182): {{{ $ python2.6-config --ldflags -L/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config -ldl -lpython2.6 }}} which, when all is said and done, ends up causing whatever was being built to be linked against the framework. Note that my attempt at building samba4 alpha7 appeared to respect what python2.6-config said, but I'm not sure how well since it didn't get to the parts using python before it failed. -- Ticket URL: <http://trac.macports.org/ticket/18848#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18848: python26 : no dynamic library built ---------------------------------+------------------------------------------ Reporter: neric27@… | Owner: blb@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Resolution: fixed | Keywords: Port: python26 | ---------------------------------+------------------------------------------ Comment(by neric27@…): OK, thanks you very much for the information : I would never have guessed that Python was in fact the library ! Anyway, by feeding directly the output of `python2.6-config --ldflags` to the configure script, I was able to build samba4@4.0.0alpha2_0. I'll file a ticket against samba4. Thanks again for your time ;-) -- Ticket URL: <http://trac.macports.org/ticket/18848#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18848: python26 : no dynamic library built ---------------------------------+------------------------------------------ Reporter: neric27@… | Owner: blb@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Resolution: fixed | Keywords: Port: python26 | ---------------------------------+------------------------------------------ Comment(by raimue@…): Why don't we provide symlinks /opt/local/include/python2.6 and /opt/local/lib/libpython2.6.dylib? Apple's system version also ships as a framework but still has these symlinks. -- Ticket URL: <http://trac.macports.org/ticket/18848#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18848: python26 : no dynamic library built ---------------------------------+------------------------------------------ Reporter: neric27@… | Owner: blb@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Resolution: fixed | Keywords: Port: python26 | ---------------------------------+------------------------------------------ Comment(by blb@…): I suppose we could to help those ports which don't properly query python for how to link...building the framework definitely causes odd things (eg, libpython2.6.a being symlinked to the framework binary), so links for include and the dylib wouldn't be all that strange. -- Ticket URL: <http://trac.macports.org/ticket/18848#comment:13> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts