#26 OS X 10.6.7 - libz.a no such file or folder

closed-rejected
Cosmin Truta
None
5
2014-08-26
2011-06-22
No

Wish I understood what this all means. But I don't. Stupid brain can't comprehend c++ and other crap like that.
`
macpro:src macpro$ cd /Volumes/Users/macpro/Downloads/optipng-0.6.5
macpro:optipng-0.6.5 macpro$ ls
LICENSE.txt Makefile.in README.txt configure doc lib man prj src
macpro:optipng-0.6.5 macpro$ cd src/
macpro:src macpro$ ls
Makefile.in cbitset.h opngoptim.c opngreduc.h optipng.h osys.h scripts xtra
cbitset.c cexcept.h opngreduc.c optipng.c osys.c proginfo.h tests
macpro:src macpro$
macpro:src macpro$ make
make makedbm makedepend makeinfo makestrs
macpro:src macpro$ make -f scripts/
bcc32.mak gcc.mak gcc.mak.in unix.mak unix.mak.in visualc.mak
macpro:src macpro$ make -f scripts/gcc.mak
gcc -c -O2 -W -Wall -I../lib/zlib -I../lib/libpng -I../lib/pngxtern optipng.c
gcc -c -O2 -W -Wall -I../lib/zlib -I../lib/libpng -I../lib/pngxtern opngoptim.c
opngoptim.c: In function ‘opng_optimize_impl’:
opngoptim.c:1528: warning: argument ‘infile_name’ might be clobbered by ‘longjmp’ or ‘vfork’
gcc -c -O2 -W -Wall -I../lib/zlib -I../lib/libpng -I../lib/pngxtern opngreduc.c
gcc -c -O2 -W -Wall -I../lib/zlib -I../lib/libpng -I../lib/pngxtern cbitset.c
gcc -c -O2 -W -Wall -I../lib/zlib -I../lib/libpng -I../lib/pngxtern osys.c
cd ../lib/zlib; \ make -f Makefile libz.a; \ cd ../../src
make[1]: *** No rule to make target `libz.a'. Stop.
cd ../lib/libpng; \ make -f scripts/makefile.gcc libpng.a; \ cd ../../src
gcc -c -W -Wall -O2 -I../zlib png.c
gcc -c -W -Wall -O2 -I../zlib pngerror.c
pngerror.c: In function ‘png_default_error’:
pngerror.c:255: warning: unused parameter ‘png_ptr’
gcc -c -W -Wall -O2 -I../zlib pngget.c
gcc -c -W -Wall -O2 -I../zlib pngmem.c
gcc -c -W -Wall -O2 -I../zlib pngpread.c
gcc -c -W -Wall -O2 -I../zlib pngread.c
gcc -c -W -Wall -O2 -I../zlib pngrio.c
gcc -c -W -Wall -O2 -I../zlib pngrtran.c
gcc -c -W -Wall -O2 -I../zlib pngrutil.c
gcc -c -W -Wall -O2 -I../zlib pngset.c
gcc -c -W -Wall -O2 -I../zlib pngtrans.c
gcc -c -W -Wall -O2 -I../zlib pngwio.c
gcc -c -W -Wall -O2 -I../zlib pngwrite.c
gcc -c -W -Wall -O2 -I../zlib pngwtran.c
gcc -c -W -Wall -O2 -I../zlib pngwutil.c
ar rcs libpng.a png.o pngerror.o pngget.o pngmem.o pngpread.o pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
/usr/bin/ranlib: file: libpng.a(pngpread.o) has no symbols
ranlib libpng.a
ranlib: file: libpng.a(pngpread.o) has no symbols
cd ../lib/pngxtern; \ make -f scripts/gcc.mak pngxtern.a; \ cd ../../src
gcc -c -W -Wall -O2 -I../zlib -I../libpng pngxio.c
gcc -c -W -Wall -O2 -I../zlib -I../libpng pngxmem.c
pngxmem.c: In function ‘pngx_malloc_rows_extended’:
pngxmem.c:45: warning: comparison is always false due to limited range of data type
gcc -c -W -Wall -O2 -I../zlib -I../libpng pngxset.c
gcc -c -W -Wall -O2 -I../zlib -I../libpng pngxread.c
gcc -c -W -Wall -O2 -I../zlib -I../libpng pngxwrite.c
gcc -c -W -Wall -O2 -I../zlib -I../libpng pngxrbmp.c
gcc -c -W -Wall -O2 -I../zlib -I../libpng pngxrgif.c
gcc -c -W -Wall -O2 -I../zlib -I../libpng pngxrjpg.c
gcc -c -W -Wall -O2 -I../zlib -I../libpng pngxrpnm.c
gcc -c -W -Wall -O2 -I../zlib -I../libpng pngxrtif.c
gcc -c -W -Wall -O2 gif/gifread.c
gcc -c -W -Wall -O2 pnm/pnmin.c
gcc -c -W -Wall -O2 pnm/pnmout.c
gcc -c -W -Wall -O2 pnm/pnmutil.c
gcc -c -W -Wall -O2 minitiff/minitiff.c
gcc -c -W -Wall -O2 minitiff/tiffread.c
gcc -c -W -Wall -O2 minitiff/tiffwrite.c
ar rcs pngxtern.a pngxio.o pngxmem.o pngxset.o pngxread.o pngxwrite.o pngxrbmp.o pngxrgif.o pngxrjpg.o pngxrpnm.o pngxrtif.o gifread.o pnmin.o pnmout.o pnmutil.o minitiff.o tiffread.o tiffwrite.o
/usr/bin/ranlib: file: pngxtern.a(pngxio.o) has no symbols
/usr/bin/ranlib: file: pngxtern.a(pngxwrite.o) has no symbols
/usr/bin/ranlib: file: pngxtern.a(tiffwrite.o) has no symbols
ranlib pngxtern.a
ranlib: file: pngxtern.a(pngxio.o) has no symbols
ranlib: file: pngxtern.a(pngxwrite.o) has no symbols
ranlib: file: pngxtern.a(tiffwrite.o) has no symbols
gcc -o optipng -s optipng.o opngoptim.o opngreduc.o cbitset.o osys.o ../lib/pngxtern/pngxtern.a ../lib/libpng/libpng.a ../lib/zlib/libz.a -lm
i686-apple-darwin10-gcc-4.2.1: ../lib/zlib/libz.a: No such file or directory
make: *** [optipng] Error 1`

Discussion

  • make[1]: *** No rule to make target `libz.a'. Stop. <-- I would guess that's the problem. Wrong gcc makefile?

     
    • assigned_to: nobody --> cosmin
     
  • Warrick Mole
    Warrick Mole
    2011-07-11

    I also am having the same issue:

    make -f scripts/gcc.mak install
    cd ../lib/zlib; \ make -f Makefile libz.a; \ cd ../../src
    make[1]: *** No rule to make target `libz.a'. Stop.
    cd ../lib/libpng; \ make -f scripts/makefile.gcc libpng.a; \ cd ../../src
    make[1]: `libpng.a' is up to date.
    cd ../lib/pngxtern; \ make -f scripts/gcc.mak pngxtern.a; \ cd ../../src
    make[1]: `pngxtern.a' is up to date.
    gcc -o optipng -s optipng.o opngoptim.o opngreduc.o cbitset.o osys.o strutil.o ../lib/pngxtern/pngxtern.a ../lib/libpng/libpng.a ../lib/zlib/libz.a
    i686-apple-darwin10-gcc-4.2.1: ../lib/zlib/libz.a: No such file or directory
    make: *** [optipng] Error 1

     
  • Cosmin Truta
    Cosmin Truta
    2011-09-12

    • status: open --> pending-rejected
     
  • Cosmin Truta
    Cosmin Truta
    2011-09-12

    On Unix system, including Mac OS X, you must run ./configure then make.
    I wish things were easier, but it's how zlib needs to be built. Since zlib is a 3rd-party library, I have little control over that.

    See the build instructions in README.txt.

    On the other hand, I agree that an explicit build error message would be useful.

     
  • Ramona Truta
    Ramona Truta
    2012-03-08

    • status: pending-rejected --> closed-rejected