[pacman-dev] Unable to compile pacman in ubuntu-11.10

Dave Reisner d at falconindy.com
Thu Mar 29 08:17:51 EDT 2012


On Thu, Mar 29, 2012 at 04:42:04AM -0700, Talespin Kit wrote:
> Some improvement over the build by providing --without-gpgme arg to
> ./configure script .
> 
> The complete steps is mentioned below
> 
> 
> $ git clean -xfd; ./autogen.sh && ./configure --without-gpgme && make
> 
> ..........
> make[3]: Leaving directory `/home/user/tmp/pacman/lib/libalpm'
> make[2]: Leaving directory `/home/user/tmp/pacman/lib/libalpm'
> Making all in src/util
> make[2]: Entering directory `/home/user/tmp/pacman/src/util'
>   CC     vercmp.o
>   CCLD   vercmp
>   CC     testpkg.o
>   CCLD   testpkg
> ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Init'
> ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Final'
> ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Init'
> ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Update'
> ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Update'
> ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Final'
> 
> 
> The actual command executed while tryint to linking is found by running dry make (make -n )
> 
> cd pacman/src/util
> 
> $ /bin/bash ../../libtool --silent --tag=CC   --mode=link gcc -std=gnu99 -pedantic -D_GNU_SOURCE -g -O2 -Wall   -o testpkg testpkg.o ../../lib/libalpm/.libs/libalpm.la -lssl -larchive -lm
> ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Init'
> ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Final'
> ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Init'
> ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Update'
> ../../lib/libalpm/.libs/libalpm.so: undefined reference to `MD5_Update'
> ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Final'
> collect2: ld returned 1 exit status
> 
> 
> Now finding which library contains **MD5_Init** symbol using the below 
> 
> bash commands
> 
> for i in `find /usr/lib -type f -name '*.so.*'`;
> do
>      nm -D $i | grep MD5_Init;
>      if [ $? -eq 0 ]; 
> 
>      then 
> 
>           echo $i;
>      fi;
> done
> 
> 
> Output:-
> 
> ======
> 00004320 T MD5_Init
> /usr/lib/i386-linux-gnu/libgnutls-openssl.so.26.16.14

No, that's the wrong library -- we link against openssl's libcrypto.
Is libssl-dev installed?

NB: I've yet to be able to build pacman successfully against anything
involving gnutls, and i've even had build failures when libarchive
linked to gnutls (though that may have been resolved by binutils 2.22).

> 
> Now linking with the libgnutls-openssl library 
> 
> 
> $ /bin/bash ../../libtool --silent --tag=CC   --mode=link gcc -std=gnu99 -pedantic -D_GNU_SOURCE -g -O2 -Wall   -o testpkg testpkg.o ../../lib/libalpm/.libs/libalpm.la -lssl -larchive -lm -lgnutls-openssl
> ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Init'
> ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Update'
> ../../lib/libalpm/.libs/libalpm.so: undefined reference to `SHA256_Final'
> collect2: ld returned 1 exit status
> 
> 
> Only MD5_* symbols are able to find by ld.
> 
> Problem with SHA256_* symbols. Finding the **SHA256_Init** symbol
> using the above bash commands outputs.
> 
> 00187db0 T SHA256_Init
> /usr/lib/libgs.so.9.04

This is ghostscript... I assure you we don't link against this. It
should all be covered by openssl.

> 
> Trying to link with the libgs.so.9.04 library gives the following error. 
> 
> 
> $ /bin/bash ../../libtool --silent --tag=CC   --mode=link gcc -std=gnu99 -pedantic -D_GNU_SOURCE -g -O2 -Wall   -o testpkg testpkg.o ../../lib/libalpm/.libs/libalpm.la -lssl -larchive -lm -lgnutls-openssl -lgs
> /usr/bin/ld: cannot find -lgs
> collect2: ld returned 1 exit status
> 
> 
> No idea why the linker fails to find the libgs library.
> 


More information about the pacman-dev mailing list