Find the answer to your Linux question:
Results 1 to 2 of 2
alright.. here goes.. i decided to do an emerge -Uu world on my gentoo system and when it tries to compile the first program it gives the following output/errors: Code: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer
    Join Date
    Sep 2003
    Location
    Knoxhell, TN
    Posts
    1,078

    zlib 1.1.4-r2 compile errors


    alright.. here goes.. i decided to do an emerge -Uu world on my gentoo system and when it tries to compile the first program it gives the following output/errors:
    Code:
    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.
    Checking whether to use vsnprintf() or snprintf()... using snprintf()
    Checking for snprintf() in stdio.h... No.
      WARNING: snprintf() not found, falling back to sprintf().  zlib
      can build but will be open to possible buffer-overflow security
      vulnerabilities.  See README.vsnprintf for more info.
    
    Checking for return value of sprintf()... No.
      WARNING: apparently sprintf() does not return a value.  zlib
      can build but will be open to possible string-format security
      vulnerabilities.  See README.vsnprintf for more info.
    
    Checking for errno.h...  No.
    Checking for mmap support... No.
    
    <compiling attempt>
    
    ./libz.a&#40;gzio.o&#41;&#40;.text+0x31f&#41;&#58; In function `check_header'&#58;
    &#58; undefined reference to `errno'
    ./libz.a&#40;gzio.o&#41;&#40;.text+0x383&#41;&#58; In function `check_header'&#58;
    &#58; undefined reference to `errno'
    ./libz.a&#40;gzio.o&#41;&#40;.text+0x3ed&#41;&#58; In function `check_header'&#58;
    &#58; undefined reference to `errno'
    ./libz.a&#40;gzio.o&#41;&#40;.text+0x459&#41;&#58; In function `check_header'&#58;
    &#58; undefined reference to `errno'
    ./libz.a&#40;gzio.o&#41;&#40;.text+0x4c5&#41;&#58; In function `check_header'&#58;
    &#58; undefined reference to `errno'
    ./libz.a&#40;gzio.o&#41;&#40;.text+0x531&#41;&#58; more undefined references to `errno' follow
    collect2&#58; ld returned 1 exit status
    make&#58; *** &#91;example&#93; Error 1
    make&#58; *** Waiting for unfinished jobs....
    I checked that the file errno.h exists using the 'find' command and found it in several places.. this error occurs every time i try to upgrade zlib... any ideas?
    Their code will be beautiful, even if their desks are buried in 3 feet of crap. - esr

  2. #2
    Linux Engineer
    Join Date
    Sep 2003
    Location
    Knoxhell, TN
    Posts
    1,078
    ok.. figured it out.. seems my CFLAGS were a bit too aggressive for that particular library.. i backed them off to -O3 -march=athlon -pipe and it worked fine..
    Their code will be beautiful, even if their desks are buried in 3 feet of crap. - esr

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •