[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Shared libraries dependancies



enrico@debian.org writes:

> marvin:/usr/lib# ldd libgdome.so.0.6.9
> 	libc.so.6 => /lib/libc.so.6 (0x40041000)
> 	/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

That's because libgdome.so.0.6.9 was wrongly compiled ...
> 
> Now, discussing with another developer he noted that when libgdome.so is
> compiled, the switches -shared and -lxml2 are not present, and this could
> be the cause for the missing dependancies.

Exactly. On platforms supporting inter-library dependencies (like
ELF/Linux), shared libs should "link in" other shared libs they depend
on. This will make the ldd output correct.

As a rule of thumb, "gcc libgdome.so.0.6.9" should only gripe about a
missing "main", no other missing symbols, unless you've forgotten some
dependencies.

> What should gdome2 do?

Something like
  gcc -shared -o libgdome.so.0.6.9 -Wl,-soname,$(SONAME) -lxml2 $(OBJS)
should do the trick. If upstream wants to be portable, they should
look into libtool.

-- 
Robbe

Attachment: signature.ng
Description: PGP signature


Reply to: