You are not logged in.

#1 2008-05-14 08:50:08

nagoola
Member
From: Germany / Ahrensburg
Registered: 2004-03-15
Posts: 52

Compiling Pacman on Debian System [SOLVED]

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

#2 2008-05-14 09:10:06

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: Compiling Pacman on Debian System [SOLVED]

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

#3 2008-05-14 09:13:10

nagoola
Member
From: Germany / Ahrensburg
Registered: 2004-03-15
Posts: 52

Re: Compiling Pacman on Debian System [SOLVED]

Hi,

I have libarchive 1.2.53 and gcc 4.1.2.

Thanks,
nagoola

Offline

#4 2008-05-14 09:17:40

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: Compiling Pacman on Debian System [SOLVED]

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

#5 2008-05-14 09:56:08

nagoola
Member
From: Germany / Ahrensburg
Registered: 2004-03-15
Posts: 52

Re: Compiling Pacman on Debian System [SOLVED]

Hi,

Allan, thanks a lot! I just compiled libarchive 2.4.x and pacman seems to work just fine!

Thanks,
nagoola

Offline

#6 2008-05-14 12:02:30

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: Compiling Pacman on Debian System [SOLVED]

Yeah, we've based our pacman code around the libarchive 2.X API. It has been out since March 2007, tell Debian to update. tongue

Offline

Board footer

Powered by FluxBB