when trying to compile perl 5.8.2 form ports, those errors occurs: ------------------------------------------------------------------ [...] Couldn't link /usr/local/bin/perl5.8.2 to /usr/local/bin/perl: No such file or directory /usr/local/bin/perl Couldn't copy /usr/local/bin/perl5.8.2 to /usr/local/bin/perl: No such file or directory [...] /usr/local/man/man1/s2p.1 /usr/libexec/elf/strip: /usr/local/bin/perl: No such file or directory *** Error code 1 Stop in /usr/ports/lang/perl5.8. *** Error code 1 Stop in /usr/ports/lang/perl5.8. ** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade13052.0 make reinstall egrep: /var/db/pkg/perl-5.8.1_2/+CONTENTS: No such file or directory ---> Restoring the old version [...] ** Fix the installation problem and try again. [Updating the pkgdb <format:bdb1_btree> in /var/db/pkg ... - 201 packages found (-0 +1) . done] ** The following packages were not installed or upgraded (*:skipped / !:failed) ! lang/perl5.8 (perl-5.8.1_2) (install error) ------------------------------------------------------------------ Fix: no known. How-To-Repeat: Do perl upgrade : portupgrade perl-5.8.1_2
Responsible Changed From-To: freebsd-ports-bugs->tobez Working with the originator on this one.
On Tue, Nov 11, 2003 at 07:49:25PM +0100, Shobaki sam. wrote: > when trying to compile perl 5.8.2 form ports, those errors occurs: > > ------------------------------------------------------------------ > [...] > Couldn't link /usr/local/bin/perl5.8.2 to /usr/local/bin/perl: No such file or directory > /usr/local/bin/perl > Couldn't copy /usr/local/bin/perl5.8.2 to /usr/local/bin/perl: No such file or directory > [...] > /usr/local/man/man1/s2p.1 > /usr/libexec/elf/strip: /usr/local/bin/perl: No such file or directory > *** Error code 1 I don't know what is the exact reason why portupgrade is not happy. It might be a side effect of the _real_ problem. You gave me build logs I requested, and: On Tue, Nov 11, 2003 at 08:57:39PM +0100, Shobaki Sam. wrote: > Here are the files you asked for. [...] > LD_LIBRARY_PATH=/usr/ports/lang/perl5.8/work/perl-5.8.2:/usr/lib:/usr/local/lib:/usr/X11R6/lib:/compat/linux/lib:/compat/linux/usr/lib:/compat/linux/usr/X11R6/lib cc -Wl,-E -L/usr/local/lib -o miniperl miniperlmain.o opmini.o -L. -lperl -lm -lcrypt -lutil -lc [...] > /usr/libexec/ld-elf.so.1: /usr/local/bin/perl: Undefined symbol "PL_exit_flags" > *** Error code 1 This is your problem, I think. Here is what I get in my test jail: # unset LD_LIBRARY_PATH # /usr/local/bin/perl -v This is perl, v5.8.2 built for i386-freebsd [...] # LD_LIBRARY_PATH=/usr/lib ; export LD_LIBRARY_PATH # /usr/local/bin/perl -v /usr/libexec/ld-elf.so.1: /usr/local/bin/perl: Undefined symbol "PL_exit_flags" Explanation: Perl binary is compiled with "-Wl,-R/usr/local/lib/perl5/5.8.2/mach/CORE", so that it knows how to find its own (correct). -Rdirectory is equivalent to -rpath directory in GNU ld, which incidentally is FreeBSD ld(1). The funny thing is that the manual page for ld(1) says that -rpath takes precedence over LD_LIBRARY_PATH, but it looks like it is not really the case on FreeBSD 4.9. Indeed, looking at src/libexec/rtld-elf/rtld.c on a -stable system, we can see, near the find_library() function, the following comment: * The search order is: * rpath in the referencing file * LD_LIBRARY_PATH * ldconfig hints * /usr/lib Which follows by the following conflicting code: if ((pathname = search_library_path(name, ld_library_path)) != NULL || (refobj != NULL && (pathname = search_library_path(name, refobj->rpath)) != NULL) || (pathname = search_library_path(name, gethints())) != NULL || (pathname = search_library_path(name, STANDARD_LIBRARY_PATH)) != NULL) return pathname; If you don't grok C: this means that LD_LIBRARY_PATH is searched first, and it should not. Oh, by the way, -CURRENT has the same problem. So, either rtld or rtld's docs need to be fixed, but an obvious workaround for _your_ problem would be to unset LD_LIBRARY_PATH globally, or at _least_ remove /usr/lib from it. It is not needed there anyway. Cheers, \Anton. -- If I did know the future of Perl, and if I told you, you'd probably run away screaming. -- Larry Wall
Ok, adding to that, the change of the search order was deliberate, please see PR/28191 , http://www.freebsd.org/cgi/query-pr.cgi?pr=28191. The documentation should be fixed. You should stop using LD_LIBRARY_PATH indiscriminately (for the same global effect with lower precedence just play with ldconfig at boot time). Cheers, \Anton. -- If I did know the future of Perl, and if I told you, you'd probably run away screaming. -- Larry Wall
After sorting out the LD_LIBRARY_PATH problem, it turned out that, if perl5.8.2 symlink already exists in ${PREFIX}/bin, the port fails to actually install the binary. I have committed a fix, please test it in your setup. \Anton. -- If I did know the future of Perl, and if I told you, you'd probably run away screaming. -- Larry Wall
State Changed From-To: open->closed The originator confirms that the latest commit has fixed the problem. Thanks for your report!