Log in

View Full Version : Can't compile x264 64 bit, 32 bit is fine


minaust
29th July 2014, 10:39
Hi everybody!

By reading various threads here and simply entering ./configure --help, I was cranking out 32-bit builds for myself and friends, CPU optimized. But I never saw a need for a 64-bit build.

My build environment: A working compiler-free msys environment acquired by running mingw-get and unchecking all the compilers. I then go to Komisar's site and download the latest mingw and appropriate libpack. Unzip and drop them into my mingw folder, and I'm off to the races. I've done 64-bit builds of my own personal-use utils. Here's what I tried:
./configure --extra-cflags="-march=bdver2" --disable-gpac --enable-strip
Works great for 32-bit. But
./configure --cross-prefix=x86_64-w64-mingw32- --host=x86_64-pc-mingw32
gets me the error message "no working c compiler found".

Is there a problem with my configure options, or is my build environment borked? :confused:

LoRd_MuldeR
29th July 2014, 11:23
I don't think you need the "--cross-prefix" stuff with the Komisar's "multilib" MinGW build.

Anyway, if configure fails, have a look at your "config.log" and see what exactly went wrong!

See also:
http://forum.doom9.org/showthread.php?p=1687794#post1687794

minaust
29th July 2014, 12:55
I don't think you need the "--cross-prefix" stuff with the Komisar's "multilib" MinGW build.

Anyway, if configure fails, have a look at your "config.log" and see what exactly went wrong!

That "--cross-prefix" stuff was what was wrong. You were right - it isn't needed. It pointed configure to a folder that exists, but holds nothing but libs and include files.

./configure --host=x86_64-pc-mingw32 --extra-cflags="-march=bdver2" --disable-gpac --enable-strip
Works, but the resulting .exe is tiny - the 64-bit libraries weren't found. They are there, just weren't found. The 32-bit libraries were found and of course skipped. How do I point configure to the right ones? I'm assuming the header files are identical.

EDIT: Never mind, I figured it out after a little research. This is my new configure line:

./configure --host=x86_64-pc-mingw32 --extra-cflags="-march=bdver2 -I/c/mingw/x86_64-w64-mingw32/include -L/c/mingw/x86_64-w64-mingw32/lib" --extra-ldflags="-I/c/mingw/x86_64-w64-mingw32/include -L/c/mingw/x86_64-w64-mingw32/lib" --disable-gpac --enable-strip
Does the trick. Sheesh. And thanks for the help.

jpsdr
30th July 2014, 07:50
Oh... Thanks for this information about the 64 lib. I've also the same issue, but live with it, because i'm not using them, but if they can be include...

minaust
30th July 2014, 12:50
Oh... Thanks for this information about the 64 lib. I've also the same issue, but live with it, because i'm not using them, but if they can be include...
Keep in mind that this applies to Komisar's build. Using another GCC build, the line I posted in the original post may well be appropriate.I had to tell configure which libraries to use, then I had to tell the linker as well so it could link to the right libraries.