Linking error in sks-1.1.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Linking error in sks-1.1.0

Sebastian Wieseler-3
Hello.

I've got a problem with compiling sks-1.1.0.
When I do a "make all" (after "make dep" which runs fine) I've got:

[...]
ocamlopt -o sks -I lib -I bdb  -ccopt -Lbdb -dtypes -ccopt -pthread -inline 40 unix.cmxa [...]
update_subkeys.cmx sks_do.cmx unit_tests.cmx sks.cmx

/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -ldb-4.6
collect2: ld returned 1 exit status
Error during linking
make: *** [sks] Error 2



GNU ld (GNU Binutils) 2.18
gcc version 4.1.2 (Gentoo 4.1.2 p1.0.2)
dev-lang/ocaml-3.10.2

Maybe you can help me. :-)
Regards,
        Sebastian Wieseler

--
  ,= ,-_-. =.           /"\
 ((_/)o o(\_))          \ /    ASCII Ribbon Campaign
  `-'(. .)`-'   &&       X      against HTML e-mail
      \_/               / \




_______________________________________________
Sks-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/sks-devel
Reply | Threaded
Open this post in threaded view
|

Re: Linking error in sks-1.1.0

Sebastian Wieseler-3
On Thu, Dec 11, 2008 at 08:40:23AM -0800, Chris Kuethe wrote:
> The error tells you everything you need to know: the linker can't find
> libdb-4.6.* - you need to fix your LDFLAGS to tell it where the
> library is, and possibly fix the db library name in the makefile.


Ahhhhhh. Thanks!
Terrible that db-4.6 isn't yet umasked on Gentoo. :-(

Regards,
         Sebastian Wieseler

--
  ,= ,-_-. =.           /"\
 ((_/)o o(\_))          \ /    ASCII Ribbon Campaign
  `-'(. .)`-'   &&       X      against HTML e-mail
      \_/               / \




_______________________________________________
Sks-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/sks-devel
Reply | Threaded
Open this post in threaded view
|

Re: Linking error in sks-1.1.0

Kiss Gabor (Bitman)
In reply to this post by Sebastian Wieseler-3
> I've got a problem with compiling sks-1.1.0.
> When I do a "make all" (after "make dep" which runs fine) I've got:

> /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -ldb-4.6

You need libdb version 4.6.

Regards

Gabor


_______________________________________________
Sks-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/sks-devel
Reply | Threaded
Open this post in threaded view
|

Re: Linking error in sks-1.1.0

Chris Kuethe
In reply to this post by Sebastian Wieseler-3
On Thu, Dec 11, 2008 at 11:26 AM, Sebastian Wieseler
<[hidden email]> wrote:
> Ahhhhhh. Thanks!
> Terrible that db-4.6 isn't yet umasked on Gentoo. :-(

you could build db 4.6 and install it into /home/sks. then you have
the required library, but you don't pollute the base system

--
GDB has a 'break' feature; why doesn't it have 'fix' too?


_______________________________________________
Sks-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/sks-devel
Reply | Threaded
Open this post in threaded view
|

Re: Linking error in sks-1.1.0

Sebastian Wieseler-3
Hello.

On Thu, Dec 11, 2008 at 12:03:22PM -0800, Chris Kuethe wrote:
> you could build db 4.6 and install it into /home/sks. then you have
> the required library, but you don't pollute the base system

I've done so.
And then run after make dep:

LIBDB=/home/sks/db-4.7.25/build_unix/libdb.a make all
this said:
bdb/libbdb.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status

And no, running ranlib bdb/libbdb.a doesn't make anything better....


Thanks for your help!
Regards,
        Sebastian Wieseler

--
  ,= ,-_-. =.           /"\
 ((_/)o o(\_))          \ /    ASCII Ribbon Campaign
  `-'(. .)`-'   &&       X      against HTML e-mail
      \_/               / \




_______________________________________________
Sks-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/sks-devel
Reply | Threaded
Open this post in threaded view
|

Re: Linking error in sks-1.1.0

Chris Kuethe
and is that .a file really an archive? is it big enough to be a
library? does "file" think it's a library? does "ar t libdb.a" show
any objects? i'm thinking it's some libtool stupidity because it looks
like you're trying to link against the library in the db build
directory, rather than a correctly installed library...

On Thu, Dec 11, 2008 at 3:21 PM, Sebastian Wieseler
<[hidden email]> wrote:

> Hello.
>
> On Thu, Dec 11, 2008 at 12:03:22PM -0800, Chris Kuethe wrote:
>> you could build db 4.6 and install it into /home/sks. then you have
>> the required library, but you don't pollute the base system
>
> I've done so.
> And then run after make dep:
>
> LIBDB=/home/sks/db-4.7.25/build_unix/libdb.a make all
> this said:
> bdb/libbdb.a: could not read symbols: Archive has no index; run ranlib to add one
> collect2: ld returned 1 exit status
>
> And no, running ranlib bdb/libbdb.a doesn't make anything better....
>
>
> Thanks for your help!
> Regards,
>        Sebastian Wieseler
>
> --
>  ,= ,-_-. =.           /"\
>  ((_/)o o(\_))          \ /    ASCII Ribbon Campaign
>  `-'(. .)`-'   &&       X      against HTML e-mail
>      \_/               / \
>
>
>



--
GDB has a 'break' feature; why doesn't it have 'fix' too?


_______________________________________________
Sks-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/sks-devel
Reply | Threaded
Open this post in threaded view
|

Re: Linking error in sks-1.1.0

Sebastian Wieseler-3
On Thu, Dec 11, 2008 at 03:34:24PM -0800, Chris Kuethe wrote:
> and is that .a file

The LIBDB=/home/sks/db-4.7.25/build_unix/libdb.a is

> really an archive? is it big enough to be a
> library?

1724894 Bytes

> does "file" think it's a library?

/home/sks/db-4.7.25/build_unix/.libs/libdb-4.7.a: current ar archive

> does "ar t libdb.a" show any objects?

yes

> i'm thinking it's some libtool stupidity because it looks
> like you're trying to link against the library in the db build
> directory, rather than a correctly installed library...

no...

but the created libbdb.a in sks-1.1.0/bdb
is:
1724962
libbdb.a: current ar archive
and there are now objects shown...



So. Maybe there is an error while you create
the libbdb.a in sks-1.1.0/bdb!?

Regards,
        Sebastian Wieseler

--
  ,= ,-_-. =.           /"\
 ((_/)o o(\_))          \ /    ASCII Ribbon Campaign
  `-'(. .)`-'   &&       X      against HTML e-mail
      \_/               / \




_______________________________________________
Sks-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/sks-devel
Reply | Threaded
Open this post in threaded view
|

Re: Linking error in sks-1.1.0

Sebastian Wieseler-3

Okay... dunno if it is my or your fault :-)

If you do a "ar t" on sks-1.1.0/bdb/libbdb.a:
libdb-4.7.a

If you do a "ar x" you've got *exactly* the same libdb-4.7.a
as it was in db-4.7.25/build_unix/.libs/libdb-4.7.a


So. And for you I did a "make install" so that
liebdbd.a lies now in /home/sks/BerkeleyDB.4.7/lib/libdb.a
with still no luck.


Same error message:
LIBDB=/home/sks/BerkeleyDB.4.7/lib/libdb.a make all
bdb/libbdb.a: could not read symbols: Archive has no index; run ranlib to add one


Regards,
        Sebastian Wieseler

--
  ,= ,-_-. =.           /"\
 ((_/)o o(\_))          \ /    ASCII Ribbon Campaign
  `-'(. .)`-'   &&       X      against HTML e-mail
      \_/               / \




_______________________________________________
Sks-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/sks-devel
Reply | Threaded
Open this post in threaded view
|

Re: Linking error in sks-1.1.0

Sebastian Wieseler-3

And if I say in sks-1.1.0/Makefile.local:
LIBDB=-L/home/sks/BerkeleyDB.4.6/lib/

I'll get ...

catchup.cmx reconserver.cmx update_subkeys.cmx sks_do.cmx unit_tests.cmx sks.cmx
bdb/libbdb.a(bdb_stubs.o): In function `caml_cursor_dup':
bdb_stubs.c:(.text+0x120b): undefined reference to `db_strerror'
bdb/libbdb.a(bdb_stubs.o): In function `caml_cursor_count':
bdb_stubs.c:(.text+0x12a8): undefined reference to `db_strerror'
bdb/libbdb.a(bdb_stubs.o): In function `caml_cursor_del':
bdb_stubs.c:(.text+0x132f): undefined reference to `db_strerror'
bdb/libbdb.a(bdb_stubs.o): In function `caml_cursor_get_keyonly':
bdb_stubs.c:(.text+0x14bf): undefined reference to `db_strerror'
[...]


And yes, I tried db-4.6 and db-4.7... both with no luck.
Any ideas? :-(

    Sebastian Wieseler

--
  ,= ,-_-. =.           /"\
 ((_/)o o(\_))          \ /    ASCII Ribbon Campaign
  `-'(. .)`-'   &&       X      against HTML e-mail
      \_/               / \




_______________________________________________
Sks-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/sks-devel
Reply | Threaded
Open this post in threaded view
|

Re: Linking error in sks-1.1.0

John Clizbe-3
Sebastian Wieseler wrote:

> And if I say in sks-1.1.0/Makefile.local:
> LIBDB=-L/home/sks/BerkeleyDB.4.6/lib/
>
> I'll get ...
>
> catchup.cmx reconserver.cmx update_subkeys.cmx sks_do.cmx unit_tests.cmx sks.cmx
> bdb/libbdb.a(bdb_stubs.o): In function `caml_cursor_dup':
> bdb_stubs.c:(.text+0x120b): undefined reference to `db_strerror'
> bdb/libbdb.a(bdb_stubs.o): In function `caml_cursor_count':
> bdb_stubs.c:(.text+0x12a8): undefined reference to `db_strerror'
> bdb/libbdb.a(bdb_stubs.o): In function `caml_cursor_del':
> bdb_stubs.c:(.text+0x132f): undefined reference to `db_strerror'
> bdb/libbdb.a(bdb_stubs.o): In function `caml_cursor_get_keyonly':
> bdb_stubs.c:(.text+0x14bf): undefined reference to `db_strerror'
> [...]
>
>
> And yes, I tried db-4.6 and db-4.7... both with no luck.
> Any ideas? :-(

-L specifies the directory where to look for the library

-l specifies the library to search

Try

LIBDB='-L/home/sks/BerkeleyDB.4.6/lib/ -ldb-4.6'


--
John P. Clizbe                      Inet:John (a) Mozilla-Enigmail.org
You can't spell fiasco without SCO. hkp://keyserver.gingerbear.net  or
     mailto:[hidden email]?subject=HELP

Q:"Just how do the residents of Haiku, Hawai'i hold conversations?"
A:"An odd melody / island voices on the winds / surplus of vowels"


_______________________________________________
Sks-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/sks-devel
Reply | Threaded
Open this post in threaded view
|

Re: Linking error in sks-1.1.0

Sebastian Wieseler-3
On Fri, Dec 12, 2008 at 01:47:05PM -0600, John Clizbe wrote:
> Try
>
> LIBDB='-L/home/sks/BerkeleyDB.4.6/lib/ -ldb-4.6'


W0000000000000000t!!111oneoneone!!!11!!eleven
It works! :-)
Yeah! :-)

Thank you sooooooooo much! :-)
      Sebastian Wieseler, totaly happy,

--
  ,= ,-_-. =.           /"\
 ((_/)o o(\_))          \ /    ASCII Ribbon Campaign
  `-'(. .)`-'   &&       X      against HTML e-mail
      \_/               / \




_______________________________________________
Sks-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/sks-devel