You are not logged in.
Hi,
I am trying to compile pacman on a Debian system. I get the following error:
/bin/sh ../../libtool --tag=CC --mode=compile gcc -std=gnu99 -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I../.. -pedantic -D_GNU_SOURCE -fvisibility=internal -g -O2 -Wall -MT package.lo -MD -MP -MF .deps/package.Tpo -c -o package.lo package.c
gcc -std=gnu99 -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I../.. -pedantic -D_GNU_SOURCE -fvisibility=internal -g -O2 -Wall -MT package.lo -MD -MP -MF .deps/package.Tpo -c package.c -fPIC -DPIC -o .libs/package.o
package.c: In function 'alpm_pkg_changelog_open':
package.c:529: warning: implicit declaration of function 'archive_read_open_filename'
package.c: In function 'alpm_pkg_changelog_close':
package.c:597: error: void value not ignored as it ought to be
make[1]: *** [package.lo] Error 1
make[1]: Leaving directory `/root/pacman-3.1.2/lib/libalpm'
make: *** [all-recursive] Error 1
I tried a couple different versions of pacman and I always get this error. What could this be?
Thanks!
nagoola
Last edited by nagoola (2008-05-14 09:55:05)
Offline
What version of libarchive and gcc do you have installed? From the error message, it looks like the function archive_read_finish is returning a void instead of an int.
Offline
Hi,
I have libarchive 1.2.53 and gcc 4.1.2.
Thanks,
nagoola
Offline
It looks like you need libarchive > 2. See this part of archive.c in v2.4.17
#if ARCHIVE_API_VERSION > 1
int archive_read_finish(struct archive *);
#else
/* Temporarily allow library to compile with either 1.x or 2.0 API. */
/* Erroneously declared to return void in libarchive 1.x */
void archive_read_finish(struct archive *);
#endif
So there was a change in the declaration of the function used on the offending line between libarchive versions.
Offline
Hi,
Allan, thanks a lot! I just compiled libarchive 2.4.x and pacman seems to work just fine!
Thanks,
nagoola
Offline
Yeah, we've based our pacman code around the libarchive 2.X API. It has been out since March 2007, tell Debian to update.
Offline