#6804 closed defect (fixed)
BUG: unable to load Pextlib on FreeBSD
Reported by: | cssdev@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 1.0 |
Keywords: | Cc: | pguyot (Paul Guyot) | |
Port: |
Description (last modified by jmpalacios (Juan Manuel Palacios))
Following application of the patches mentioned in BUG #6800 I managed to DarwinPorts compiled on FreeBSD. Unfortunately, I still cannot get it to run properly due to problems with Pextlib. I tried a couple approaches, but I'm wondering whether this is something I'm not doing due to a lack of familiarity with tcl or if it's a larger problem. I have the tcl8.4 port compiled with WITH_PTHREADS=YES on FreeBSD 5.4. I'm using the current CVS version, but the results are the same with the 1.2 tarball.
$ ./configure --prefix=/home/dp --with-tcl=/usr/local/lib/tcl8.4/ --with-tclinclude=/usr/local/include/tcl8.4/ --with-tclpackage=/usr/local/lib/tcl8.4/ --with-curlprefix=/usr/local
Everything built, but any attempt at using 'port' resulted in errors that it could not find Pextlib:
$ /home/dp/bin/port help can't find package Pextlib 1.0 while executing "package_native require Pextlib 1.0" ("eval" body line 1) invoked from within "eval package_native $args" (procedure "package" line 14) invoked from within "package require Pextlib 1.0" (procedure "dportinit" line 310) invoked from within "dportinit ui_options global_options global_variations" Error: /home/dp/bin/port: Failed to initialize ports system, can't find package Pextlib 1.0
Some digging led me to try the individual pextlib test within base, but that failed too:
$ gmake test /usr/local/bin/tclsh8.4 tests/curl.tcl Pextlib.so couldn't load file "Pextlib.so": Shared object "Pextlib.so" not found, required by "tclsh8.4" while executing "load $pextlibname" (procedure "main" line 2) invoked from within "main $argv" (file "tests/curl.tcl" line 54) gmake: *** [test] Error 1
It looks like the shared library handling might be to blame. I tried to set a useful environment variable:
$ export LD_LIBRARY_PATH=.:$HOME/darwinports/base/src/pextlib1.0/ $ gmake test/usr/local/bin/tclsh8.4 tests/curl.tcl Pextlib.so couldn't load file "Pextlib.so": ./Pextlib.so: Undefined symbol "curl_easy_getinfo" while executing "load $pextlibname" (procedure "main" line 2) invoked from within "main $argv" (file "tests/curl.tcl" line 54) gmake: *** [test] Error 1 $ ldd Pextlib.so Pextlib.so: libreadline.so.5 => /lib/libreadline.so.5 (0x28164000) libmd.so.2 => /lib/libmd.so.2 (0x28190000) libncurses.so.5 => /lib/libncurses.so.5 (0x2819a000)
This looks like the shared library isn't liked with libcurl. Also, the installation process didn't do whatever might be needed to get the extra tcl packages working with the port command. I verified that things were installed into the same relative locations on Mac OS X:
$ ls /usr/local/lib/tcl8.4/darwinports1.0/ Darwinports.so darwinports_fastload.tcl darwinports.tcl darwinports_index.tcl darwinports_autoconf.tcl pkgIndex.tcl darwinports_dlist.tcl $ ls /home/dp/share/darwinports/Tcl/ package1.0/ pextlib1.0/ port1.0/ registry1.0/ thread2.6/
Am I missing something extra that might be needed as part of the Tcl configuration?
Change History (8)
comment:1 Changed 19 years ago by cssdev@…
comment:2 Changed 19 years ago by cssdev@…
Cc: | pguyot@… added |
---|
I think the key part of the problem is the fact that the configure scripts do not link Pextlib.so with libcurl. I manually modified Mk/dports.autoconf.mk. It's not added to the LIBS string used by the SHLIB_NAME rule specified in Mk/dports.tea.mk. On Mac OS X, I think this isn't needed. On FreeBSD however, -lcurl must be included with the LIBS when linking Pextlib.so. I'm not exactly sure how to correct the configure.ac to ensure that the library is properly included when linking.
(CCing Paul since he did the libcurl macros.)
comment:3 Changed 19 years ago by pguyot (Paul Guyot)
Was this bug fixed by Landon's latest commits?
comment:4 Changed 19 years ago by cssdev@…
dependson: | → 6800 |
---|
Yes, DP works as long as BUG #6800 is resolved to prevent attempting to build the trace library. I just recompiled and installed from HEAD without any trouble!
comment:5 Changed 19 years ago by olegb@…
Resolution: | → fixed |
---|---|
Status: | new → closed |
freebsd is not a supported platform. Though your patches to make it work are highly appreciated.
closing this keeping #6800 open.
comment:6 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)
Description: | modified (diff) |
---|---|
Milestone: | → MacPorts base bugs |
comment:7 Changed 16 years ago by tobypeterson
Milestone: | MacPorts base bugs → MacPorts Future |
---|
Milestone MacPorts base bugs deleted
comment:8 Changed 15 years ago by jmroot (Joshua Root)
Milestone: | MacPorts Future |
---|
I found another difference... the ${prefix}/share/darwinports/Tcl/*/pkgIndex.tcl files on FreeBSD do not contain the "package ifneeded" commands present in the files on Mac OS X. Maybe pkg_mkIndex didn't work properly, and as a result 'port' is unable to find and load the extra library?