Hi, I am building a LFS system and I'd like to use pkgutils on it. Since I failed to build it on my LFS box I tried to build it on my Slackware box. Here is what I did:
$ git clone git://crux.nu/tools/pkgutils.git
$ cd pkgutils
And as the README states:
$ make
$ make install
I issued make and this is what I got:
Code:
pedro@darkstar:~/Downloads/slackware/pkgutils$ make
g++ -DNDEBUG -O2 -Wall -pedantic -D_GNU_SOURCE -DVERSION=\"5.35.6\" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -MM main.cc pkgutil.cc pkgadd.cc pkgrm.cc pkginfo.cc > .depend
g++ -DNDEBUG -O2 -Wall -pedantic -D_GNU_SOURCE -DVERSION=\"5.35.6\" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c -o main.o main.cc
g++ -DNDEBUG -O2 -Wall -pedantic -D_GNU_SOURCE -DVERSION=\"5.35.6\" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c -o pkgutil.o pkgutil.cc
g++ -DNDEBUG -O2 -Wall -pedantic -D_GNU_SOURCE -DVERSION=\"5.35.6\" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c -o pkgadd.o pkgadd.cc
g++ -DNDEBUG -O2 -Wall -pedantic -D_GNU_SOURCE -DVERSION=\"5.35.6\" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c -o pkgrm.o pkgrm.cc
g++ -DNDEBUG -O2 -Wall -pedantic -D_GNU_SOURCE -DVERSION=\"5.35.6\" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c -o pkginfo.o pkginfo.cc
g++ main.o pkgutil.o pkgadd.o pkgrm.o pkginfo.o -o pkgadd -static -larchive -lnettle -lacl -lattr -llzo2 -llzma -lbz2 -lxml2 -lz -lm -ldl
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: cannot find -larchive
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: cannot find -lnettle
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: cannot find -llzo2
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: cannot find -llzma
pkgutil.o: In function `pkgutil::pkg_footprint(std::string&) const':
pkgutil.cc:(.text+0x7576): warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
pkgutil.cc:(.text+0x7519): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status
make: ** [pkgadd] Erro 1
Thanks for the attention.
EDIT: By the way I would be glad if any of you could try to build it too, being LFS/Slackware or not.
EDIT2: The user Berzerkula from #lfs-support solved this
Quote:
20:19 < Berzerkula> it's wanting to link to static libs
20:19 < Berzerkula> change LIBARCHIVELIBS in Makefile to this:
20:20 < Berzerkula> LIBARCHIVELIBS := $(shell pkg-config --libs libarchive)
20:20 < Berzerkula> LDFLAGS += $(LIBARCHIVELIBS)
20:20 < Berzerkula> that way it is linking to the shared libs
|