configure problem

A

Alan secker

I am trying to install per 5.8.3 on a Linux Mandrake 9.2 system and
failing at the confiuration stage. It seems that regardless of the
options that I select, I end up with the following:

The command the script builds to run a test file is:

gcc -0 try try.c -lnsl -lndbm -ldb -ldl -lm -lcrypt -lutil -lc ./try

The output:

/usr/lib/libndbm.so undefined reference to 'errno'
collect2: ld returned 1 exit status

Can anyone put me sraight?

TIA

Alan
 
T

Tony Curtis

I am trying to install per 5.8.3 on a Linux Mandrake 9.2
system and failing at the confiuration stage. It seems that
regardless of the options that I select, I end up with the
following:
The command the script builds to run a test file is:
gcc -0 try try.c -lnsl -lndbm -ldb -ldl -lm -lcrypt -lutil
-lc ./try

Are you *sure* that's exactly the attempted command?

Cut-n-paste it, don't try to copy by hand.

OTOH if that *is* the real command, something else is
seriously messed up.
 
A

Alan secker

Tony said:
Are you *sure* that's exactly the attempted command?

Cut-n-paste it, don't try to copy by hand.

OTOH if that *is* the real command, something else is
seriously messed up.

Tony

This is the cut 'n paste as generated at the end of configure:

<START>
I used the command:

gcc -o try -O3 -fno-strict-aliasing -I/usr/local/include
-L/usr/local/lib try.c -lnsl -lndbm -ldb -ldl -lm -lcrypt -lutil -lc
./try

and I got the following output:

/usr/lib/libndbm.so: undefined reference to `errno'
collect2: ld returned 1 exit status
I can't compile the test program.
(The supplied flags or libraries might be incorrect.)

<END>

Alan
 
J

James Willmore

This is the cut 'n paste as generated at the end of configure:

<START>
I used the command:

gcc -o try -O3 -fno-strict-aliasing -I/usr/local/include
-L/usr/local/lib try.c -lnsl -lndbm -ldb -ldl -lm -lcrypt -lutil -lc
./try

and I got the following output:

/usr/lib/libndbm.so: undefined reference to `errno'
collect2: ld returned 1 exit status
I can't compile the test program.
(The supplied flags or libraries might be incorrect.)

<END>

Just a guess ....
Do you have NDBM installed? Is it the most up to date version? How about
the header (development RPM) files installed?

It seems to me that this is where the problem lies. Some distros of Linux
alter the various db libraries in such a way that it takes something short
of an act of God to set things right (Berkeley DB on SuSE comes to mind -
which I had to jump through hoops to get to work right).

Like I said ... it's just a guess.

HTH

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
Forms follow function, and often obliterate it.
 
A

Alan secker

James Willmore wrote:

Just a guess ....
Do you have NDBM installed? Is it the most up to date version? How about
the header (development RPM) files installed?

It seems to me that this is where the problem lies. Some distros of Linux
alter the various db libraries in such a way that it takes something short
of an act of God to set things right (Berkeley DB on SuSE comes to mind -
which I had to jump through hoops to get to work right).

Like I said ... it's just a guess.

HTH

<SNIP/>

I certainly didn't have NDBS installed. In facr after shooting through
25 pages of Google I'd be surprtised if anyone has! It certainly is a
mysterious entity to nail down. I found something called NDBM_file.pl.
is that it?

As for the header files.Which header files would they be?
Sorry to be so dense.

Alan
 
B

Ben Morrow

Alan secker said:
I certainly didn't have NDBS installed.

You do, or at least you have it partly installed. You have
/usr/lib/libndbm.so, which is the NDBM shared library.
In facr after shooting through
25 pages of Google I'd be surprtised if anyone has! It certainly is a
mysterious entity to nail down. I found something called NDBM_file.pl.
is that it?

*Please* be precise. It really matters with this sort of thing. You
(almost certainly) found something called NDBM_File.pm. No, that is
not it: that is the Perl module to interface to the ndbm C library.
As for the header files.Which header files would they be?

The ndbm header files :). Specifically, either /usr/include/ndbm.h or
/usr/include/gdbm/ndbm.h (according to Configure).

1. Do you have either of these files?

2. If you do, is it a symlink to somewhere else? Where?

3. Is /usr/lib/libndbm.so a symlink? Where to?

4. I take it you're using glibc... what do you get if you run
/lib/libc.so.6
(yes, I do mean execute the shared library as an executable)?

5. What do you get from
nm -D /usr/lib/libndbm.so | grep errno
?

6. If you know how, enquire of your package-management system whether
you have ndbm installed... rpm -q ndbm springs to mind, but it's
(thankfully) a long time since I last had to use rpm.
Sorry to be so dense.

That's fine: these things are not easy to understand. It is important
to be accurate, though.

Ben
 
S

Sisyphus

Alan said:
<START>
I used the command:

gcc -o try -O3 -fno-strict-aliasing -I/usr/local/include
-L/usr/local/lib try.c -lnsl -lndbm -ldb -ldl -lm -lcrypt -lutil -lc
./try

You mean you actually entered the above line ??

Normally you just do as per instructions in the 'INSTALL' file (which
can be found in the top level directory of the source distro).

Building perl that way was trivial for me on Mandrake-9.1.

Cheers,
Rob
 
B

Ben Morrow

Sisyphus said:
You mean you actually entered the above line ??

I would guess that the 'I' there is Configure, not Alan: this is an
extract from Configure's log.

Ben
 
S

Sisyphus

Ben said:
I would guess that the 'I' there is Configure, not Alan: this is an
extract from Configure's log.

Aaaah, yes .... I think that's a good guess :)

Cheers,
Rob
 
A

Alan Secker

Sisyphus said:
You mean you actually entered the above line ??

Normally you just do as per instructions in the 'INSTALL' file (which
can be found in the top level directory of the source distro).

Building perl that way was trivial for me on Mandrake-9.1.

Cheers,
Rob

No I didn't key it in, the configure script informed that that is what
it did. Very impressive the way that interfaces with the user. On the
whole very user friendly. As t how I did it, I used the instructions
unbundled along with everything else (from the .tar, gz, .rpm etc) I'm
not in front of my machine right now, which is why I'm vague on that point.

I will follow up Ben Morrow's points within the next couple of hours.

Thanks for your help.
Alan
 
A

Alan Secker

You do, or at least you have it partly installed. You have
/usr/lib/libndbm.so, which is the NDBM shared library.
<ENDSNIP>

Quite right, I do.

The ndbm header files :). Specifically, either /usr/include/ndbm.h or
/usr/include/gdbm/ndbm.h (according to Configure).

1. Do you have either of these files?

No, I definitely do not have those files.
2. If you do, is it a symlink to somewhere else? Where?

3. Is /usr/lib/libndbm.so a symlink? Where to?

Yes, it points to libdb.so which in turn points to libdb.so.2.0.0
4. I take it you're using glibc... what do you get if you run
/lib/libc.so.6
(yes, I do mean execute the shared library as an executable)?

GNU C Library stable release version 2.3.2, by Roland McGrath et al.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.3.1 (Mandrake Linux 9.2 3.3.1-1mdk).
Compiled on a Linux 2.4.22 system on 2003-08-29.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
linuxthreads-0.10 by Xavier Leroy
BIND-8.2.3-T5B
libthread_db work sponsored by Alpha Processor Inc
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Report bugs using the `glibcbug' script to said:
5. What do you get from
nm -D /usr/lib/libndbm.so | grep errno
?
U errno
w __errno_location
6. If you know how, enquire of your package-management system whether
you have ndbm installed... rpm -q ndbm springs to mind, but it's
(thankfully) a long time since I last had to use rpm.

package ndbm is not installed

Is the above helping?
TIA

Alan
 
B

Ben Morrow

Quite right, I do.



No, I definitely do not have those files.


Yes, it points to libdb.so which in turn points to libdb.so.2.0.0


GNU C Library stable release version 2.3.2, by Roland McGrath et al.
linuxthreads-0.10 by Xavier Leroy
U errno
w __errno_location

Right... at least on my system, which has the same version of glibc
(with threads) and has ndbm a symlink to db the same, ndbm.so *doesn't*
have the symbol errno but does have __errno_location... this is as it
were the threadsafe version of errno.
package ndbm is not installed

I think the answer is to reinstall the 'db' or 'berkeley-db' or 'db2'
package along with the corresponding '-dev' package. Sorry I can't be
more specific: I'm not familiar with how Mdk names things.

Ben
 
A

Alan Secker

Ben said:
(e-mail address removed) wrote:
Right... at least on my system, which has the same version of glibc
(with threads) and has ndbm a symlink to db the same, ndbm.so *doesn't*
have the symbol errno but does have __errno_location... this is as it
were the threadsafe version of errno.
I think the answer is to reinstall the 'db' or 'berkeley-db' or 'db2'
package along with the corresponding '-dev' package. Sorry I can't be
more specific: I'm not familiar with how Mdk names things.

Ben
<SNIP\>

Ben

Thank you. I think you've cracked it for me. I found:
http://rpm.pbone.net/index.php3/sta...ivier Thauvin <thauvin_aerov_jussieu_fr>.html
thank provides, what looks like the answer. I'll check it out later.
Anyway, I'm very grateful.

Regards

Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,146
Messages
2,570,832
Members
47,374
Latest member
anuragag27

Latest Threads

Top