#589922 cannot compile apt statically - static compile fails

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
"J. Random Coder"
Date:
2010-07-23 11:45:03 UTC
Severity:
wishlist
#589922#5
Date:
2010-07-22 08:58:46 UTC
From:
To:
I go:
	export CFLAGS=-static; export CXXFLAGS=-static

and then I go:
	# cd /usr/src
	# dpkg-source -x apt_0.7.20.2+lenny2.dsc
	# cd apt-0.7.20.2+lenny2
	# ./configure

./configure pukes. Its final lines of output:

	checking for stdint.h... yes
	checking for unistd.h... yes
	checking db.h usability... no
	checking db.h presence... no
	checking for db.h... no
	checking for curl_easy_init in -lcurl... no
	configure: error: failed: I need CURL due https support

I am trying to build apt statically for use in a miniature 'system
within a system' I am constructing inside a chroot jail for a project. I
do NOT want to have to litter the system with all of the various
libraries that apt depends upon. I want static binaries of apt-get and
all of the other apt programs.

#589922#10
Date:
2010-07-23 10:41:00 UTC
From:
To:
severity 589922 wishlist
thanks
I don't care, you don't tell us your real name and supporting a
statically compiled APT is not of interest for Debian.

#589922#17
Date:
2010-07-23 11:41:35 UTC
From:
To:
Hi Mr. Random ;)

2010/7/22 J. Random Coder <jrandomcoder@gmail.com>:

That is the first of many errors you will encounter unfortunately.
APT in its current (buildsystem)state simple can't be statical linked
(anymore - i think it worked at some point in the [distant] past).
Feel free to make it work again, it shouldn't be too hard as some
code to handle it is already included with ONLYSTATICLIBS.

apt depends on libc6, libgcc1 and libstdc++6
(In the experimental version libz is added to the list)
The not required apt-utils additional on libdb{4.{6,7,8,9},5.0}
depending on in which environment you will compile it.
(libcurl is needed only for the optional apt-transport-https)

I think it will be really hard to omit these libraries even on a
miniature system as a lot of core packages depend on these libs
so compiling APT static will most likely bring nothing beside
increased size requirements…


Best regards,

David Kalnischkies