#77 When compiling with postgres support linkage is incomplete

0.13
open
nobody
5
2009-10-28
2009-10-28
Anonymous
No

Compiling aide 0.13.1 with --with-psql on Solaris 8 Sparc with Sun Studio 11 with autodetected libmhash results in a link error to symbols from libgcrypt:

/opt/studio/SOS11/SUNWspro/bin/cc -xO3 -xarch=v8 -I/opt/csw/postgresql/include -I/opt/csw/include -xO3 -xarch=v8 -I/opt/csw/postgresql/include -I/opt/csw/include -xarch=v8 -L/opt/csw/lib -L/opt/csw/postgresql/lib -xarch=v8 -L/opt/csw/lib -L/opt/csw/postgresql/lib -o aide conf_yacc.o conf_lex2.o getopt.o getopt1.o gnu_regex.o error.o md.o db.o commandconf.o db_file.o db_disk.o db_lex2.o db_sql.o gen_list.o list.o do_md.o base64.o symboltable.o compare_db.o be.o util.o snprintf.o fopen.o aide.o -lm -lmhash -lpq -lz
Undefined first referenced
symbol in file
gpg_err_code_from_errno db_sql.o
gcry_md_get_algo_dlen db_sql.o
gpg_err_code_from_syserror db_sql.o

Linking with -lgcrypt resolves the issue. However, in my understanding it is either libmhash used or libgcrypt, not both. As libmhash is preferred I would think the linking against libgcrypt should not be necessary.

Discussion