You are not logged in.

#1 2007-09-10 19:00:15

BartVG
Member
Registered: 2007-09-10
Posts: 11

Compiling Pacman

I've been trying to compile Pacman on a Slackware system, but I get the following messages while running make

creating pacman
/bin/sh ../../libtool --tag=CC   --mode=link gcc -D_GNU_SOURCE -g -O2 -Wall -std=c99   -all-static  -o pacman.static add.o conf.o deptest.o downloadprog.o log.o package.o pacman.o query.o remove.o sync.o trans.o upgrade.o util.o ../../lib/libalpm/.libs/libalpm.la -ldownload
gcc -D_GNU_SOURCE -g -O2 -Wall -std=c99 -static -o pacman.static add.o conf.o deptest.o downloadprog.o log.o package.o pacman.o query.o remove.o sync.o trans.o upgrade.o util.o  ../../lib/libalpm/.libs/libalpm.a -larchive -lm -ldownload
/usr/local/lib/libarchive.a(libarchive_la-archive_write_disk_set_standard_lookup.o)(.text+0xf0): In function `lookup_gid':
libarchive/archive_write_disk_set_standard_lookup.c:121: warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/local/lib/libarchive.a(libarchive_la-archive_write_disk_set_standard_lookup.o)(.text+0x1b0): In function `lookup_uid':
libarchive/archive_write_disk_set_standard_lookup.c:158: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/i486-slackware-linux/4.1.2/../../../libdownload.a(common.o)(.text+0xec0): In function `_download_netrc_auth':
/root/downloads/libdownload-1.1/common.c:662: warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/i486-slackware-linux/4.1.2/../../../libdownload.a(common.o)(.text+0x31b): In function `_download_bind':
/root/downloads/libdownload-1.1/common.c:254: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/i486-slackware-linux/4.1.2/../../../libdownload.a(common.o)(.text+0x1e1): In function `_download_default_port':/root/downloads/libdownload-1.1/common.c:190: warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/local/lib/libarchive.a(libarchive_la-archive_read_support_compression_bzip2.o)(.text+0x12c): In function `init':
libarchive/archive_read_support_compression_bzip2.c:206: undefined reference to `BZ2_bzDecompressInit'
/usr/local/lib/libarchive.a(libarchive_la-archive_read_support_compression_bzip2.o)(.text+0x1c7):libarchive/archive_read_support_compression_bzip2.c:212: undefined reference to `BZ2_bzDecompressInit'
/usr/local/lib/libarchive.a(libarchive_la-archive_read_support_compression_bzip2.o)(.text+0x367): In function `finish':
libarchive/archive_read_support_compression_bzip2.c:325: undefined reference to `BZ2_bzDecompressEnd'
/usr/local/lib/libarchive.a(libarchive_la-archive_read_support_compression_bzip2.o)(.text+0x43d): In function `drive_decompressor':
libarchive/archive_read_support_compression_bzip2.c:384: undefined reference to `BZ2_bzDecompress'
/usr/local/lib/libarchive.a(libarchive_la-archive_read_support_compression_gzip.o)(.text+0xd2): In function `init':
libarchive/archive_read_support_compression_gzip.c:178: undefined reference to `crc32'
/usr/local/lib/libarchive.a(libarchive_la-archive_read_support_compression_gzip.o)(.text+0x142):libarchive/archive_read_support_compression_gzip.c:220: undefined reference to `inflateInit2_'
/usr/local/lib/libarchive.a(libarchive_la-archive_read_support_compression_gzip.o)(.text+0x357): In function `finish':
libarchive/archive_read_support_compression_gzip.c:330: undefined reference to `inflateEnd'
/usr/local/lib/libarchive.a(libarchive_la-archive_read_support_compression_gzip.o)(.text+0x55a): In function `drive_decompressor':
libarchive/archive_read_support_compression_gzip.c:512: undefined reference to `inflate'
/usr/local/lib/libarchive.a(libarchive_la-archive_read_support_compression_gzip.o)(.text+0x570):libarchive/archive_read_support_compression_gzip.c:516: undefined reference to `crc32'
/usr/local/lib/libarchive.a(libarchive_la-archive_read_support_format_zip.o)(.text+0x8fa): In function `zip_read_data_deflate':
libarchive/archive_read_support_format_zip.c:541: undefined reference to `inflateReset'
/usr/local/lib/libarchive.a(libarchive_la-archive_read_support_format_zip.o)(.text+0x968):libarchive/archive_read_support_format_zip.c:582: undefined reference to `inflate'
/usr/local/lib/libarchive.a(libarchive_la-archive_read_support_format_zip.o)(.text+0xa3e):libarchive/archive_read_support_format_zip.c:543: undefined reference to `inflateInit2_'
/usr/local/lib/libarchive.a(libarchive_la-archive_read_support_format_zip.o)(.text+0xbe8): In function `archive_read_format_zip_cleanup':
libarchive/archive_read_support_format_zip.c:680: undefined reference to `inflateEnd'
collect2: ld returned 1 exit status
make[3]: *** [pacman.static] Error 1
make[3]: Leaving directory `/root/downloads/pacman-3.0.0/src/pacman'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/downloads/pacman-3.0.0/src/pacman'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/downloads/pacman-3.0.0'
make: *** [all] Error 2

How can I solve this?

Last edited by BartVG (2007-09-11 05:45:03)

Offline

#2 2007-09-10 19:07:25

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: Compiling Pacman

I'm at work for the moment, so all I can do for you right now is clarify the error a bit.
libarchive can't seem to find the symbols:

(for bz2 support)
BZ2_bzDecompressInit, BZ2_bzDecompressEnd, BZ2_bzDecompress,

(for gzip support)
crc32, inflateEnd, inflate

(for zip support)
inflateReset, inflateEnd

This would suggest to me that whatever libarchive uses for bzip2, gzip, and zip isn't installed, or that slackware has a version of libarchive that pacman can't use (ie. too old?)

Offline

#3 2007-09-11 06:01:37

BartVG
Member
Registered: 2007-09-10
Posts: 11

Re: Compiling Pacman

I downloaded libarchive 2.2.7 from http://people.freebsd.org/~kientzle/libarchive/ and "./configure; make; make install"-ed it. That should be te latest version according to this site. I don't know where it's been installed, so maybe /usr/local/lib/libarchive.a (see the screen dump in my first post) is not the freshly installed version.

I also see something about libdownload, which I also installed anew

Offline

#4 2007-09-11 06:32:42

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Compiling Pacman

I suggest looking at the pkgbuilds that arch has for libdownload and libarchive.
I am pretty sure aaron had to port libdownload to glibc.

libdownload
libarchive
pacman

most notably, look at the pkgbuilds for each of them.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#5 2007-09-11 16:18:48

BartVG
Member
Registered: 2007-09-10
Posts: 11

Re: Compiling Pacman

Too bad I'm not using Archlinux

Offline

#6 2007-09-12 17:55:42

BartVG
Member
Registered: 2007-09-10
Posts: 11

Re: Compiling Pacman

I downloaded libdownload from http://www.archlinux.org/packages/12101/.
Since there's no configure script, I started with make, then make install. I suppose this should suffice.
I could try to install the latest version of glibc (it has been mentioned in this thread), maybe that
will help.

Offline

#7 2007-09-12 18:12:29

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Compiling Pacman

BartVG wrote:

Too bad I'm not using Archlinux

BartVG, you shouldn't need archlinux to look at the build() section of the pkgbuild script, and see what options were being specified to build, and the "depends" fields to see what the dependencies are. That is what I was implying by providing the links.

wink


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#8 2007-09-12 18:38:25

BartVG
Member
Registered: 2007-09-10
Posts: 11

Re: Compiling Pacman

OK cool

But where can I find those pkgbuild scripts?

Offline

#9 2007-09-12 18:40:27

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: Compiling Pacman

Click "View CVS Entries" on the package info page.

Offline

#10 2007-09-12 19:53:03

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Compiling Pacman

ahh. I understand the disconnect now.
Yes. Cerebral is right. Click the 'view cvs entries' link, and then click the number next to the filename, to see the contents of the current version (specified by the number) of that file.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#11 2007-09-13 05:49:44

BartVG
Member
Registered: 2007-09-10
Posts: 11

Re: Compiling Pacman

I installed zlib, bzip2 and acl (which  libarchive depends on), but I still get the same error while compiling pacman.

The pkgbuild script for libarchive shows this:

# The libarchive .a static lib isn't linked correctly, so pacman.static
#   build fails unless we keep the libtool files
#options=(!libtool)

Could this have something to do with it?

I'm almost giving up. It's almost as if I have to go through this process of failure one more time before I could use Pacman (i.e. install software easily).

Offline

#12 2007-09-13 05:51:02

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: Compiling Pacman

don't run libtool on libarchive... you may have to edit the makefile for that (or pass it as a configure option).

Offline

#13 2007-10-24 16:59:48

juras256
Member
Registered: 2007-10-02
Posts: 3

Re: Compiling Pacman

I tried compile pacman on my (B)LFS system and got the same error.
It was necessery to add -lbz2 -lz to linking instructions for pacman.static.

There seem to be an error in the Makefile.ac in src/pacman directory.
I wonder how it was possible to build the package. The PKGBUILD does nothing about that.

Offline

#14 2007-10-24 17:32:33

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Compiling Pacman

juras256 wrote:

I tried compile pacman on my (B)LFS system and got the same error.
It was necessery to add -lbz2 -lz to linking instructions for pacman.static.

There seem to be an error in the Makefile.ac in src/pacman directory.
I wonder how it was possible to build the package. The PKGBUILD does nothing about that.

Please report a bug on bugs.archlinux.org then.

Edit : Wait, did you read what tardo said 2 posts above?

Last edited by shining (2007-10-24 17:40:53)


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#15 2007-10-24 20:03:21

juras256
Member
Registered: 2007-10-02
Posts: 3

Re: Compiling Pacman

shining wrote:

Edit : Wait, did you read what tardo said 2 posts above?

Yes, I did.

tardo wrote:

don't run libtool on libarchive... you may have to edit the makefile for that (or pass it as a configure option).

There is no option in configure to prevent Makefile from using libtool (just libtool-lock - that has nothing to do with this problem).

As far as I understand, options=(!libtool) just removes the .la files from the pkg directory.
I did that for my installation - no use.
Options=(!libtool) is commented out in libarchive PKGBUILD anyway.

I don't dare to report a bug @ bugs.archlinux.org, because I compiled pacman in another environment. Not in Archlinux.
May be in Arch environment it is all OK.

I just metioned that it was necessary to "fiddle" with the Makefies in the pacman-3.0.6/src/pacman/
to get pacman.static compiled from the vanilla pacman sources.
Just to let you know and to hear from someone from the ArchLinux Community, that I am {right|wrong} smile

[OT] I am going to try packman as the package manager for my system [/OT]

EDIT:
Instead of hacking Makefiles (.am or .in) it is enough  to invoke:

make LIBS="-lbz2 -lz"

This variable defines the missing libraries. It looks like the building environment in Arch includes this variable.

Last edited by juras256 (2007-10-26 06:22:04)

Offline

#16 2007-10-24 20:19:44

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Compiling Pacman

juras256 wrote:

I don't dare to report a bug @ bugs.archlinux.org, because I compiled pacman in another environment. Not in Archlinux.
May be in Arch environment it is all OK.

There is a pacman section of the bugtracker for pacman bugs. Pacman is an arch project, but it is a package manager too...so issues with regard to portability are relevant indeed. Just make sure you provide as much information as you can regarding your environment, steps you took that resulted in the issue, etc.

I would suggest posting to the pacman mailing list (pacman-dev), as apposed to the forum, because that is where the pacman developers 'hang out', not on the forums.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#17 2007-10-24 20:37:31

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Compiling Pacman

cactus wrote:

There is a pacman section of the bugtracker for pacman bugs. Pacman is an arch project, but it is a package manager too...so issues with regard to portability are relevant indeed. Just make sure you provide as much information as you can regarding your environment, steps you took that resulted in the issue, etc.

Well said.

And he is right. While pacman is an Arch project, Dan and I are both VERY interested in making sure it works on other non-Arch systems as well - it's Step 3 in that World Domination plan of ours.

Offline

Board footer

Powered by FluxBB