[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Bug #82418




On Wednesday, January 22, 2003, at 06:11 AM, Jeff Johnson wrote:


You're linking the set of libraries needed to use rpm. That means
that you will need to link
	librpm
	librpmdb
	librpmio
	libpopt
	libbz2
	libz
	libpthread
	librt
in approximately that order.

gcc -Wall -I/usr/include/rpm -g -O2 -o program /usr/lib/librpm.a /usr/lib/librpmdb.a /usr/lib/librpmio.a /usr/lib/libpopt.a /usr/lib/libbz2.a /usr/lib/libz.a /usr/lib/libpthread.a /usr/lib/librt.a /usr/lib/libwrap.a program.o /usr/lib/libwrap.a
program.o: In function `cleanup':
/dir/dir/src/program/src/program.c:72: undefined reference to `rpmtsFree'
program.o: In function `process_requests':
/dir/dir/src/program/src/program.c:90: undefined reference to `rpmtsCreate'
/dir/dir/src/program/src/program.c:120: undefined reference to `rpmtsSetRootDir'
/dir/dir/src/program/src/program.c:246: undefined reference to `rpmReadPackageFile'
/dir/dir/src/program/src/program.c:247: undefined reference to `rpmtsAddInstallElement'
/dir/dir/src/program/src/program.c:260: undefined reference to `rpmtsRun'
/dir/dir/src/program/src/program.c:277: undefined reference to `rpmtsEmpty'
/dir/dir/src/program/src/program.c:262: undefined reference to `rpmlogMessage'
collect2: ld returned 1 exit status
make: *** [program] Error 1



Don't use libtool or don't statically link are your choices atm.

Not using libtool is certainly fine, except that it will require me re-working my entire source tree since I now have to split of my convienience libraries into separate trees with separate configure.in, but I can do that.


The second options is pretty untenable, since I can't realistically expect my customers to install rpm-devel-4.1, and it's dependencies (python 2.2 for one), on their servers. If I don't link the program statically, how can I distribute it to my customers and still have it run? The primary thrust of this whole thing is that I am doing my development on my 8.0 development box, and then moving the compiled executables over to my 7.3 server for execution. What other way can I accomplish this, without having to install rpm-4.1 packages on my 7.3 box?

ahp

Attachment: PGP.sig
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []