Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 16585

Summary: zlib does not build with shared library support
Product: Gentoo Linux Reporter: Martin Allchin <mallchin>
Component: [OLD] LibraryAssignee: Stefan Jones (RETIRED) <cretin>
Status: RESOLVED INVALID    
Severity: normal CC: mmc
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Martin Allchin 2003-02-28 15:58:58 UTC
Whilst compiling zlib I noticed it wasn't  building with shared library support:

>>> Source unpacked.
Checking for shared library support...
No shared library suppport; try without defining CC and CFLAGS
Building static library libz.a version 1.1.4 with gcc.
Checking for unistd.h... No.

Commenting out CFLAGS in make.conf builds with shared library support enabled.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.



Expected Results:  
When no CFLAGS are defined:

>>> Source unpacked.
Checking for shared library support...
Building shared library libz.so.1.1.4 with gcc.
Checking for unistd.h... Yes.


I have the following CFLAGS setting:

CFLAGS="-march=athlon-xp -03 -pipe"
Comment 1 SpanKY gentoo-dev 2003-02-28 16:16:03 UTC
what if you do: 
`env CFLAGS="-O3 -pipe" emerge zlib` 
`env CFLAGS="-march=athlon-xp" emerge zlib` 
 
if any fail, please review the config.log file in the build dir and post it here if need be 
Comment 2 Martin Allchin 2003-03-04 16:30:41 UTC
I had an invalid CFLAGS setting with a zero (-'zero'3 and not -'oh'3).

Yes I do feel silly. Sorry guys (& gals).
Comment 3 Michal Maruska 2004-03-05 11:35:06 UTC
it seems to me, that the CFLAGS value must end with space. otherwise it doesn't build shared.
I have CFLAGS="-mcpu=pentium2 -march=pentium2 -O3 -pipe"  
and doesn't build. If I change in  "...-pipe "  it works ok.
Comment 4 Michal Maruska 2004-03-05 12:02:43 UTC
sorry, that was incorrect. I use distcc and i get some random results.
The story about the final space is untrue.