LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Can't configure Perl in LFS-SVN (Chapter 5.27). -lgdbm not found (https://www.linuxquestions.org/questions/linux-from-scratch-13/cant-configure-perl-in-lfs-svn-chapter-5-27-lgdbm-not-found-750132/)

corbis_demon 08-25-2009 10:55 AM

Can't configure Perl in LFS-SVN (Chapter 5.27). -lgdbm not found
 
Hi,
I'm repeatedly running into this Perl configure error-

Code:

/mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lgdbm
collect2: ld returned 1 exit status
I can't compile the test program.
You have a BIG problem.  Shall I abort Configure [y]
Ok.  Stopping Configure.

I've never experienced this problem before. Isn't Perl supposed to compile fine with GDBM not installed (or any other db for that matter during this chapter)? I'm using LFS-SVN-20090819. Please advise.

David1357 08-25-2009 11:14 AM

Quote:

Originally Posted by corbis_demon (Post 3656939)
I'm using LFS-SVN-20090819.

You are using a development snapshot. You should probably use the latest stable version: Latest stable version of LFS

corbis_demon 08-25-2009 11:26 AM

I know, but the current stable builds onexactly the same packages as used by the current devel version. In fact LFS-6.5 went stable on the 19th of this month. I don't think this is any reason for the configure to fail.

David1357 08-25-2009 01:00 PM

Quote:

Originally Posted by corbis_demon (Post 3656976)
In fact LFS-6.5 went stable on the 19th of this month.

This is the index of the stable download directory:
Code:

Index of /lfs/downloads/stable

Icon  Name                            Last modified      Size  Description
[DIR] Parent Directory                                      - 
[  ] LFS-BOOK-6.5-HTML.tar.bz2        16-Aug-2009 15:02  175K  tar archive
[  ] LFS-BOOK-6.5-NOCHUNKS.html.bz2  16-Aug-2009 15:02  155K  BZIP2 compressed docum>
[  ] LFS-BOOK-6.5-XML.tar.bz2        16-Aug-2009 15:02  522K  tar archive
[  ] LFS-BOOK-6.5-wget-list          19-Aug-2009 15:52  4.8K 
[  ] LFS-BOOK-6.5.pdf                16-Aug-2009 15:02  1.4M 
[  ] lfs-bootscripts-20090812.tar.bz2 16-Aug-2009 15:04  41K  tar archive
[  ] udev-config-20090523.tar.bz2    16-Aug-2009 15:04  13K  tar archive

Except for the "wget-list", it looks like it went stable on the "16th", not the "19th". Easy to get those confused, though...

corbis_demon 08-25-2009 11:58 PM

My bad. Didn't pay close enough attention to the release dates. But I decided to go for the stable release an still get the same error, although the build process is exactly the same for the devel version. Dunno what I'm doing wrong. I tried using -Dnoextensions flag, but Perl seems to ignore it (or maybe it isn't a valid option). Also, is gdbm a critical dependency for installing Perl? I thought it just gave a warning and continued, if it didn't find a library, instead of exiting with a fatal error. Is there something else I could try? Please advise.

David1357 08-26-2009 10:28 AM

Quote:

Originally Posted by corbis_demon (Post 3657693)
I tried using -Dnoextensions flag, but Perl seems to ignore it (or maybe it isn't a valid option).

Try "-Dnoextensions=GDBM_File"

Here is the relevant text from the INSTALL file in the Perl source:
Code:

By default, Configure will offer to build every extension which appears
to be supported.  For example, Configure will offer to build GDBM_File
only if it is able to find the gdbm library.

To disable certain extensions so that they are not built, use the
-Dnoextensions=... and -Donlyextensions=... options.  They both accept
a space-separated list of extensions.  The extensions listed in
C<noextensions> are removed from the list of extensions to build, while
the C<onlyextensions> is rather more severe and builds only the listed
extensions.  The latter should be used with extreme caution since
certain extensions are used by many other extensions and modules:
examples of such modules include Fcntl and IO.  The order of processing
these options is first C<only> (if present), then C<no> (if present).

Of course, you may always run Configure interactively and select only
the extensions you want.

If you want to build Perl without any extensions, you might try "-Donlyextensions=".

corbis_demon 08-26-2009 01:09 PM

Solved!! Thanks so much David1357. Using -Donlyextensions worked for me.


All times are GMT -5. The time now is 05:00 AM.