Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 104727 - app-arch/pbzip2-0.9.4 does not compile with USE="static"
Summary: app-arch/pbzip2-0.9.4 does not compile with USE="static"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo LiveCD Package Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-03 09:29 UTC by Peter Gantner (a.k.a. nephros)
Modified: 2006-01-04 07:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Gantner (a.k.a. nephros) 2005-09-03 09:29:58 UTC
See topic.
The make fails, but emerge tries to continue, installing nothing.

>>> Unpacking source...
>>> Unpacking pbzip2-0.9.4.tar.gz to /var/tmp/portage/pbzip2-0.9.4/work
>>> Source unpacked.
make: *** No rule to make target `libbz2.a', needed by `pbzip2-static'.  Stop.
>>> Test phase [not enabled]: app-arch/pbzip2-0.9.4

>>> Install pbzip2-0.9.4 into /var/tmp/portage/pbzip2-0.9.4/image/ category app-
arch
>>> dobin: making pbzip2 executable...
install: cannot stat `pbzip2': No such file or directory
dodoc: *.txt does not exist
man:

This is in accordance to the README file:
If you would like to build pbzip2 with a statically linked
libbzip2 library, download the bzip2 source from the above site,
compile it, and copy the libbz2.a file into the pbzip2 source
directory.  Then type `make pbzip2-static'.

I think the ebulid should therefore symlink the .a before compiling.

I did something else though.
I removed the target and added -static:
-pbzip2-static: libbz2.a pbzip2.cpp
-       $(CC) -O3 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o pbzip2 pbzip2.
cpp -pthread -lpthread -I. -L. -lbz2
-
+pbzip2-static: pbzip2.cpp
+       $(CC) -O3 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o pbzip2 pbzip2.
cpp -pthread -lpthread -I. -L. -lbz2 -static
+

One question though:
I don't speak make or ld, am I correct that this now does something completely 
different, namely producing a statically linked executable, while the original 
make recipe would try to build a static lib?
IMO doing the former is more what users of USE="static" expect no? (It is what I 
expect in any case that's why I did it this way.)
 I seem to remember a recent discussion on -devel about splitting the static 
useflag into static-lib and static-bin, so this package might be a candidate 
supporting this.


Reproducible: Always
Steps to Reproduce:





Portage 2.0.51.22-r2 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r1, 2.6.
12.5-sc1 i686)
=================================================================
System uname: 2.6.12.5-sc1 i686 AMD Athlon(TM) MP 1800+
Gentoo Base System version 1.12.0_pre7
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) 
[disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-w -mtune=athlon-mp -march=athlon-mp -O2 -pipe -fomit-frame-pointer -
momit-leaf-frame-pointer -msse -m3dnow -mfpmath=sse,387 -frename-registers -
malign-functions=4 -fweb -ftracer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/
share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /
usr/lib/mozilla/defaults/pref /usr/share/config /var/bind /var/qmail/alias /var/
qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /usr/X11R6/lib/
X11/xkb;/usr/X11R6/lib/X11/locale /etc/env.d"
CXXFLAGS="-w -mtune=athlon-mp -march=athlon-mp -O2 -pipe -fomit-frame-pointer -
momit-leaf-frame-pointer -msse -m3dnow -mfpmath=sse,387 -frename-registers -
malign-functions=4 -fweb -ftracer -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig candy ccache distlocks fixpackages sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/
distributions/gentoo"
LANG="C"
LINGUAS="en"
MAKEOPTS="-j3 -s"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/internet /usr/local/overlays/local"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext X aalib acl acpi alsa apache2 avi bash-completion berkdb 
bitmap-fonts cairo cdr crypt cups curl dga dvd dvdr eds emboss encode fam flac 
foomaticdb fortran gd gdbm gif glitz gphoto2 gpm gstreamer gtk gtk2 icc icc-pgo 
imagemagick imlib innodb java jikes joystick jpeg junit kde kdeenablefinal 
kdexdeltas ldap libg++ libwww mikmod mmx mmx2 mmxext motif mozilla mp3 mpeg 
mysql ncurses nocardbus nptl odbc ogg oggvorbis openal opengl oss pam pdflib 
perl pic pie plotutils png psyco python qt qtmt quicktime readline samba sasl 
scanner sdl skey slang speex spell sqlite sse ssl stroke svga svgalib tcpd tetex 
theora tiff truetype truetype-fonts type1-fonts usb v4l vhosts vorbis wmf xine 
xml xml2 xmms xprint xv xvid zlib linguas_en userland_GNU kernel_linux 
elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS
Comment 1 Chris Gianelloni (RETIRED) gentoo-dev 2006-01-04 07:09:48 UTC
I just fixed this in CVS...