zimbatm / ffmpeg-static

Scripts to build ffmpeg with all the deps statically (webm + h264 included)
ISC License
497 stars 249 forks source link

libpng not building #20

Open albertz opened 10 years ago

albertz commented 10 years ago
...
clangclang: : warning: warning: argument unused during compilation: '-L/Users/az/Programmierung/ffmpeg-static/target/lib'argument unused during compilation: '-L/Users/az/Programmierung/ffmpeg-static/target/lib'

In file included from pngerror.c:19:
./pngpriv.h:768:4: error: ZLIB_VERNUM != PNG_ZLIB_VERNUM "-I (include path) error: see the notes in pngpriv.h"
In file included from png.c:14:
./pngpriv.h:768:4: error: ZLIB_VERNUM != PNG_ZLIB_VERNUM "-I (include path) error: see the notes in pngpriv.h"
#  error ZLIB_VERNUM != PNG_ZLIB_VERNUM \
   ^
#  error ZLIB_VERNUM != PNG_ZLIB_VERNUM \
   ^
1 error generated.
make[1]: *** [pngerror.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
1 error generated.
make[1]: *** [png.lo] Error 1
make: *** [all] Error 2

I guess it includes the wrong zlib.h? But why?

zimbatm commented 10 years ago

Probably because clang is ignoring some of the flags ? clangclang: : warning: warning: argument unused during compilation I don't know why though

albertz commented 10 years ago

Well that is an -L, so only relevant for linking. This would need more debugging.

I would also watch the related Homebrew formula. You will find all needed patches/options there. However, they are using libpng 1.5.14 (that is where I get the link from). The formula is here. But maybe we just wait and adopt from there.

zimbatm commented 10 years ago

Agreed. Let's leave that issue open until someone finds the time to debug the issue.

marksolaris commented 10 years ago

You need to set your CPPFLAGS variable to the zlib headers location... I use

    setenv LDFLAGS "-L/usr/local/lib -R/usr/local/lib"
    setenv CFLAGS "-I/usr/local/include"
    setenv CPPFLAGS "-I/usr/local/include"