Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 403171 - app-arch/pbzip2[static] should DEPEND on || ( <app-arch/bzip2-1.0.6-r3 app-arch/bzip2[static-libs] )
Summary: app-arch/pbzip2[static] should DEPEND on || ( <app-arch/bzip2-1.0.6-r3 app-ar...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Dror Levin (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-11 14:54 UTC by Gerald
Modified: 2012-08-06 23:11 UTC (History)
1 user (show)

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 Gerald 2012-02-11 14:54:54 UTC
gentoo-x86 / # emerge -pv1 pbzip2
[ebuild  N    ~] app-arch/pbzip2-1.1.6  USE="static -symlink" 0 kB

gentoo-x86 / # emerge -1 pbzip2

>>> Emerging (1 of 1) app-arch/pbzip2-1.1.6
 * pbzip2-1.1.6.tar.gz RMD160 SHA1 SHA256 size ;-) ...                                                                                                [ ok ]
>>> Unpacking source...
>>> Unpacking pbzip2-1.1.6.tar.gz to /var/tmp/portage/app-arch/pbzip2-1.1.6/work
>>> Source unpacked in /var/tmp/portage/app-arch/pbzip2-1.1.6/work
>>> Preparing source in /var/tmp/portage/app-arch/pbzip2-1.1.6/work/pbzip2-1.1.6 ...
 * Applying pbzip2-1.1.6-makefile.patch ...                                                                                                           [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-arch/pbzip2-1.1.6/work/pbzip2-1.1.6 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-arch/pbzip2-1.1.6/work/pbzip2-1.1.6 ...
make -j3
i686-pc-linux-gnu-g++  -O2 -march=i686 -pipe -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_POSIX_PTHREAD_SEMANTICS -DUSE_STACKSIZE_CUSTOMIZATION -pthread -Wl,-O1 -Wl,--as-needed -static pbzip2.cpp BZ2StreamScanner.cpp ErrorContext.cpp -lbz2 -lpthread -o pbzip2
pbzip2.cpp: In function 'int directdecompress(const char*, const char*)':
pbzip2.cpp:2426:66: warning: ignoring return value of 'size_t fwrite(const void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
pbzip2.cpp:2447:63: warning: ignoring return value of 'size_t fwrite(const void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
/usr/lib/gcc/i686-pc-linux-gnu/4.5.3/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lbz2
collect2: ld returned 1 exit status
make: *** [pbzip2] Error 1
 * ERROR: app-arch/pbzip2-1.1.6 failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of 'emerge --info =app-arch/pbzip2-1.1.6',
 * the complete build log and the output of 'emerge -pqv =app-arch/pbzip2-1.1.6'.
 * The complete build log is located at '/var/tmp/portage/app-arch/pbzip2-1.1.6/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-arch/pbzip2-1.1.6/temp/environment'.
 * S: '/var/tmp/portage/app-arch/pbzip2-1.1.6/work/pbzip2-1.1.6'

---

This is from an x86 system, but it fails the same way also on an amd64 system.
Without use flag 'static' everything compiles fine, but I would like a static build :-)

Also doesn't work for older ebuilds ob pbzip2.

Reproducible: Always

Steps to Reproduce:
1. USE=static emerge -1 pbzip2
2. watch it fail



Expected Results:  
Compile and built a static version of pbzip2
Comment 1 Gerald 2012-02-11 15:11:11 UTC
I found the reason why compiling fails: If you want to be able to emerge pbzip2 with the use flag 'static' you need to already have emerged 

app-arch/bzip2 with use flag 'static-libs'

otherwise it won't work because pbzip2 seems to needs those static libs.

Could someone please add this as a requirement to the pbzip2 ebuild so emerge can then complain that the use flag for bzip2 needs to be changed when trying to emerge pbzip2 with USE="static"? That would be much better than failing with a strange compiler error :)

Thanks!
Comment 2 Tim Harder gentoo-dev 2012-08-06 23:11:11 UTC
Fixed in CVS a few weeks ago.