Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FFmpeg does not build #21

Open
albertz opened this issue Nov 6, 2013 · 7 comments
Open

FFmpeg does not build #21

albertz opened this issue Nov 6, 2013 · 7 comments

Comments

@albertz
Copy link
Contributor

albertz commented Nov 6, 2013

*** 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
Copy link
Contributor

amnonbb commented Dec 14, 2013

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

@ljxt523
Copy link

ljxt523 commented May 10, 2014

thanks to amnonbb, i succeed.

@jmcbee
Copy link

jmcbee commented Dec 9, 2014

/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
Copy link
Contributor Author

albertz commented Dec 9, 2014

@fbm-static Maybe try with -fPIC?

@mondain
Copy link

mondain commented Jun 7, 2016

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
Copy link
Owner

zimbatm commented Jun 7, 2016

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

@mondain
Copy link

mondain commented Jun 7, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants