On Sun, Feb 24, 2019 at 01:51:52PM -0800, Pei Jia wrote: > > To whom it may concern: > > Actually, I've already posted my question at > https://www.linuxquestions.org/questions/linux-from-scratch-13/perl-5-28-1-failed-to-build-while-installing-basic-system-software-4175648992/ > . > > > I just strictly followed this page: > http://www.linuxfromscratch.org/lfs/view/systemd/chapter06/perl.html > > while running the configuration, > [CODE]sh Configure -des -Dprefix=/usr \ > -Dvendorprefix=/usr \ > -Dman1dir=/usr/share/man/man1 \ > -Dman3dir=/usr/share/man/man3 \ > -Dpager="/usr/bin/less -isR" \ > -Duseshrplib \ > -Dusethreads[/CODE] > > I got the following [B]ERROR[/B] message > > [CODE]What libraries to use? [-lpthread -lgdbm -ldl -lm -lcrypt -lutil > -lc -lgdbm_compat] > What optimizer/debugger flag should be used? [-O2] > Any additional cc flags? [-D_REENTRANT -D_GNU_SOURCE -fwrapv > -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include] > Let me guess what the preprocessor flags are... > Any additional ld flags (NOT including libraries)? [ > -fstack-protector-strong -L/usr/local/lib] > Checking your choice of C compiler and flags for coherency... > I've tried to compile and run the following simple program: > > #include <stdio.h> > int main() { printf("Ok\n"); return(0); } > > I used the command: > > cc -o try -O2 -D_REENTRANT -D_GNU_SOURCE -fwrapv > -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include > -fstack-protector-strong -L/usr/local/lib try.c -lpthread -lgdbm -ldl > -lm -lcrypt -lutil -lc -lgdbm_compat > ./try > > and I got the following output: > > ./try: error while loading shared libraries: libgdbm.so.6: cannot open > shared object file: No such file or directory > The program compiled OK, but exited with status 127. > You have a problem. Shall I abort Configure [y] > Ok. Stopping Configure.[/CODE] > > And it seems all required libraries have already been installed under > [B]/usr/lib[/B]: > > [CODE](lfs chroot) root:/sources/cpan/perl-5.28.1# ls /usr/lib [...] > bash libbfd.so libgdbm.la > liblsan.so.0.0.0 libnss_compat.so libstdc++.a > bfd-plugins libbz2.a libgdbm.so > liblsan_preinit.o libnss_db.so libstdc++.la > crt1.o libbz2.so libgdbm.so.6 > libltdl.a libnss_dns.so libstdc++.so > crti.o libc.a libgdbm.so.6.0.0 > libltdl.la libnss_files.so libstdc++.so.6 > crtn.o libc.so libgdbm_compat.la > libltdl.so libnss_hesiod.so libstdc++.so.6.0.25 > gcc libc_nonshared.a libgdbm_compat.so > libltdl.so.7 libopcodes-2.32.so libstdc++fs.a > gconv libcap.so libgdbm_compat.so.4 > libltdl.so.7.3.1 libopcodes.a libstdc++fs.la > gcrt1.o libcc1.la libgdbm_compat.so.4.0.0 > libm-2.29.a libopcodes.la libsupc++.a [...] > > Can anybody give me a hint ?? > > Cheers > Pei >
It maybe links to something on the host system which is not available in chroot. Use ldd to find what it links to. ldd libgdbm.so.6 But that library should only be linking to the vdso (part of the running kernel), libc, and ld-linux. If those were broken I would expect serious problems long before this, Or perhaps the symlink has become damaged. It should be pointing to libgdbm.so.6.0.0 which should be an executable file. ls -l /usr/lib/libgdbm* ĸen -- The beauty of reading a page of de Selby is that it leads one inescapably to the conclusion that one is not, of all nincompoops, the greates. -- du Garbandier -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
