Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#1 | Link |
Registered User
Join Date: Oct 2008
Location: Chennai India
Posts: 31
|
Compiling x264 on Fedora9 for windows
Hi
I am able to compile x264 for linux. i wish to cross compile x264 for windows from linux. I have installed mingw the cross compiler is located at /usr/local/mingw/bin/i586-mingw32msvc-gcc The script i used has: CC=/usr/local/mingw/bin/i586-mingw32msvc-gcc \ ./configure --host=i586-mingw32msvc --disable-pthread --disable-avis-input the output is Platform: X86 System: MINGW avis input: no mp4 output: no pthread: no gtk: no debug: no gprof: no PIC: no shared: no visualize: no then when i run "make" i am getting this error yasm -O2 -f win32 -DPREFIX -DHAVE_SSE3 -Icommon/i386/ -o common/i386/dct-a.o common/i386/dct-a.asm strip:common/i386/dct-a.o: File format not recognized make: [common/i386/dct-a.o] Error 1 (ignored) yasm -O2 -f win32 -DPREFIX -DHAVE_SSE3 -Icommon/i386/ -o common/i386/cpu-a.o common/i386/cpu-a.asm strip:common/i386/cpu-a.o: File format not recognized make: [common/i386/cpu-a.o] Error 1 (ignored) yasm -O2 -f win32 -DPREFIX -DHAVE_SSE3 -Icommon/i386/ -o common/i386/pixel-a.o common/i386/pixel-a.asm strip:common/i386/pixel-a.o: File format not recognized make: [common/i386/pixel-a.o] Error 1 (ignored) yasm -O2 -f win32 -DPREFIX -DHAVE_SSE3 -Icommon/i386/ -o common/i386/mc-a.o common/i386/mc-a.asm strip:common/i386/mc-a.o: File format not recognized make: [common/i386/mc-a.o] Error 1 (ignored) yasm -O2 -f win32 -DPREFIX -DHAVE_SSE3 -Icommon/i386/ -o common/i386/mc-a2.o common/i386/mc-a2.asm strip:common/i386/mc-a2.o: File format not recognized make: [common/i386/mc-a2.o] Error 1 (ignored) yasm -O2 -f win32 -DPREFIX -DHAVE_SSE3 -Icommon/i386/ -o common/i386/predict-a.o common/i386/predict-a.asm strip:common/i386/predict-a.o: File format not recognized make: [common/i386/predict-a.o] Error 1 (ignored) yasm -O2 -f win32 -DPREFIX -DHAVE_SSE3 -Icommon/i386/ -o common/i386/pixel-sse2.o common/i386/pixel-sse2.asm strip:common/i386/pixel-sse2.o: File format not recognized make: [common/i386/pixel-sse2.o] Error 1 (ignored) yasm -O2 -f win32 -DPREFIX -DHAVE_SSE3 -Icommon/i386/ -o common/i386/quant-a.o common/i386/quant-a.asm strip:common/i386/quant-a.o: File format not recognized make: [common/i386/quant-a.o] Error 1 (ignored) yasm -O2 -f win32 -DPREFIX -DHAVE_SSE3 -Icommon/i386/ -o common/i386/deblock-a.o common/i386/deblock-a.asm strip:common/i386/deblock-a.o: File format not recognized make: [common/i386/deblock-a.o] Error 1 (ignored) ar rc libx264.a common/mc.o common/predict.o common/pixel.o common/macroblock.o common/frame.o common/dct.o common/cpu.o common/cabac.o common/common.o common/mdate.o common/csp.o common/set.o common/quant.o encoder/analyse.o encoder/me.o encoder/ratecontrol.o encoder/set.o encoder/macroblock.o encoder/cabac.o encoder/cavlc.o encoder/encoder.o encoder/eval.o common/i386/mc-c.o common/i386/predict-c.o common/i386/dct-a.o common/i386/cpu-a.o common/i386/pixel-a.o common/i386/mc-a.o common/i386/mc-a2.o common/i386/predict-a.o common/i386/pixel-sse2.o common/i386/quant-a.o common/i386/deblock-a.o ranlib libx264.a /usr/local/mingw/bin/i586-mingw32msvc-gcc -o x264.exe x264.o matroska.o muxers.o libx264.a -s libx264.a: could not read symbols: Archive has no index; run ranlib to add one make: *** [x264.exe] Error 1 i used nasm and got similar error. I tried make AS=i586-mingw32msvc-as but i says i586-mingw32msvc-as -O2 -f elf -DHAVE_SSE3 -Icommon/i386/ -o common/i386/dct-a.o common/i386/dct-a.asm i586-mingw32msvc-as: unrecognized option '-O2' make: *** [common/i386/dct-a.o] Error 1 i also tried make AS=i586-mingw32msvc-as ASFLAGS="-f win32" i am getting common/i386/dct-a.asm:710: Warning: rest of line ignored; first ignored character is ` ' where am i going wrong? Thank you |
![]() |
![]() |
![]() |
#3 | Link |
Registered User
Join Date: Oct 2008
Location: Chennai India
Posts: 31
|
I am using the latest source code, downloaded using git
I could not locate much details at http://x264dev.multimedia.cx/ can u please direct me when I used mingw's ar, ranlib, strip and gcc, i was able to compile the code. But the exe is not working on windows. it crashes without any error message. only the "submit error report" dialog box appears. I was able to compile x246 on cygwin in windows. but when i run that exe, that exe also behaves in a similar manner. please give the standard way to compile x264 on linux for windows so that i can integrate it with VLC and use it on windows Thank you |
![]() |
![]() |
![]() |
#6 | Link |
Registered User
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
|
Since March, actually. (I suspect DS is in the future and sends patches back in time.)
|
![]() |
![]() |
![]() |
#7 | Link | |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#8 | Link |
Registered User
Join Date: Oct 2008
Location: Chennai India
Posts: 31
|
latest x264 crashes while using MMX/SSE capabilities
I downloaded the source from ftp://ftp.videolan.org/pub/videolan/...1-2245.tar.bz2 and compiled it on FC9 using Mingw. On windows When i encode a file using x264.exe it crashes. If i manually remove the "-DHAVE_MMX" from the configure script and compile it, it works. Is there a fix
Last edited by ramprasad85; 12th November 2008 at 15:11. |
![]() |
![]() |
![]() |
#9 | Link |
Compiling Encoder
Join Date: Jan 2007
Posts: 1,348
|
that means the ASM is broken,
thus why it crashes from the start when you try and execute. so depending on what you were trying to build: A. an x64 binrary or B. an x86 binary the situation is as follows: A. x264 does not have win x64 asm support, so you have to use the --disable-asm flag in the ./configure to get a compile that does not crash. And without asm, the x64 version is a complete turtle to x86 w/ asm. B. cross-compiler failure. since it works fine on windows through the standard cygwin and msys/mingw methods. |
![]() |
![]() |
![]() |
#10 | Link |
Registered User
Join Date: Oct 2008
Location: Chennai India
Posts: 31
|
Success!
I downloaded the latest code and noticed the x86 folder. The code compiled. But when i executed the exe on windows it crashes. looking at the disassembly, i figured out that it is trying to use MMX registers. So i manually deleted the -DHAVE_MMX from the configure script and compiled. Now it works. In fact VLC 0.9.6 which uses x264 also crashes when i use H264 codec. I tested the exe on 3 computers. Is there a fix for this. Thank you |
![]() |
![]() |
![]() |
#12 | Link |
Registered User
Join Date: Oct 2008
Location: Chennai India
Posts: 31
|
[ramprasad@localhost ~]$ cat /proc/cpuinfo
processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 4 model name : Intel(R) Pentium(R) 4 CPU 2.40GHz stepping : 1 cpu MHz : 2400.260 cache size : 1024 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 5 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc up pebs bts pni monitor ds_cpl cid xtpr bogomips : 4803.24 clflush size : 64 My CPU has MMX and SSE support, |
![]() |
![]() |
![]() |
#13 | Link |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Deleting -DHAVE_MMX is equivalent to disabling assembly. If it works without assembly, I suspect you have borked something relating to the assembler.
Would it happen that your Linux is 64-bit and Windows is 32-bit, for example? Or your Windows is 64-bit? |
![]() |
![]() |
![]() |
#14 | Link |
Registered User
Join Date: Oct 2008
Location: Chennai India
Posts: 31
|
I have windows and Linux on the same system (dual boot) on a intel P4
i downloaded x264 source, compiled it using Mingw32 compiler by setting 'CC=' and used Mingw32's ar ranlib and strip by modifying Make file. when i run the exe on windows 1. send error report box appears 2. when debug button is clicked, Visual studio says (unhandled exception) 3. When i click ok the faulting instruction has some thing to do with mm0 which i believe is something to do with MMX. when i run the same exe with --no-asm it runs perfectly For more info have a look at the attached images Thank you |
![]() |
![]() |
![]() |
#16 | Link |
Compiling Encoder
Join Date: Jan 2007
Posts: 1,348
|
i don't think his processor has the EM64T instruction set, so it shouldn't even be capable of either x64 linux or windows.
It seems that his processor is the original p4 line, so best he has is SSE2, no SSE3 or EM64T. so it is probably the fact he's on a really old revision and the -DHAVE_SSE3 in the ASFLAGS is fubarring it up. since x264 is trying to use SSE3 instructions with that in there and he doesn't have them, would explain the crash when ran normally and no crash with --no-asm. @ramprasad85 try the following see if x264 runs fine with adding --asm sse2 to your commandline (i think it existed back then) if that works then remake x264 with the following make ASFLAGS="-O2 -f win32 -DPREFIX" with whatever else you're using to get it to make right; just ASFLAGS needs to be what i have there. Last edited by kemuri-_9; 13th November 2008 at 15:48. |
![]() |
![]() |
![]() |
Tags |
crosscompile, mingw, x264 |
Thread Tools | Search this Thread |
Display Modes | |
|
|