zimbatm / ffmpeg-static

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

FFmpeg does not build #21

Open albertz opened 10 years ago

albertz commented 10 years ago
*** Building FFmpeg ***
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
gcc is unable to create an executable file.
If gcc is a cross-compiler, use the --enable-cross-compile option.
Only do this if you know what cross compiling means.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.

config.log:

...
check_cc
BEGIN /var/folders/fk/mt9zfm3n2853v1pcy0q3y25h0000gp/T//ffconf.iqXjAyiA.c
    1   int main(void){ return 0; }
END /var/folders/fk/mt9zfm3n2853v1pcy0q3y25h0000gp/T//ffconf.iqXjAyiA.c
gcc -I/Users/az/Programmierung/ffmpeg-static/target/include -I/Users/az/Programmierung/ffmpeg-static/target/include -static --static -c -o /var/folders/fk/mt9zfm3n2853v1pcy0q3y25h0000gp/T//ffconf.pZYEfFwm.o /var/folders/fk/mt9zfm3n2853v1pcy0q3y25h0000gp/T//ffconf.iqXjAyiA.c
gcc -L/Users/az/Programmierung/ffmpeg-static/target/lib -lm -L/Users/az/Programmierung/ffmpeg-static/target/lib -lm -static -o /var/folders/fk/mt9zfm3n2853v1pcy0q3y25h0000gp/T//ffconf.9l7nvoI1 /var/folders/fk/mt9zfm3n2853v1pcy0q3y25h0000gp/T//ffconf.pZYEfFwm.o
ld: library not found for -lcrt0.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
C compiler test failed.
amnonbb commented 10 years ago

"-Bstatic" option instead of "-static" solved the issue

ljxt523 commented 10 years ago

thanks to amnonbb, i succeed.

jmcbee commented 9 years ago
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: ./libvpx.a(vp9_subpel_variance.asm.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
./libvpx.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
src/ffmpeg-static/build/libvpx-v1.3.0/libs.mk:480: recipe for target 'test_libvpx' failed
make[1]: *** [test_libvpx] Error 1
Makefile:17: recipe for target '.DEFAULT' failed
make: *** [.DEFAULT] Error 2
albertz commented 9 years ago

@fbm-static Maybe try with -fPIC?

mondain commented 8 years ago

I've got similar errors like fbm-static and from what I've read, static "linking" isn't possible on Linux unless the base libraries are also compiled with -fPIC, building ffmpeg with it doesn't resolve the issue.

zimbatm commented 8 years ago

Maybe we need a simple feature-detection script to guide these flags. The start of autohell :)

mondain commented 8 years ago

Totally, but as long as it "just works" would be great. Sorta related, I hope to get some traction over on ask ubuntu http://askubuntu.com/questions/784018/building-static-ffmpeg-libraries-on-amd64-where-libc-isnt-compiled-with-fpic