2753536587 / libyuv

Automatically exported from code.google.com/p/libyuv
0 stars 0 forks source link

Can not build Windows x64 configuration #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Checkout sources.
2. follow http://code.google.com/p/libyuv/wiki/GettingStarted instructions
3. run x64 build in visual studio:
"%VS90COMNTOOLS%vsvars32.bat"
devenv -build "Release|x64" libyuv.sln

What is the expected output? What do you see instead?
Expected to get x64 lib. Instead I see linker errors:
Creating library...
..\..\build\Release\obj\libjpeg\jidctflt.obj : fatal error LNK1112: module 
machine type 'x64' conflicts with target machine type 'X86'
Build log was saved at 
"file://c:\libyuv\trunk\build\Release\obj\libjpeg\BuildLog.htm"
libjpeg - 1 error(s), 0 warning(s)

What version of the product are you using? On what operating system?
Windows 7 (x64) \ Windows XP (x86)
Visual Studio 2008

Please provide any additional information below.
I tried to change libjpeg.rules file -- changed -fwin32 to be -f$(PlatformName)
after that library linked okay, but when i tried to use it i got another liker 
errors:
4>libjpeg.lib(jsimd_i386.obj) : error LNK2019: unresolved external symbol 
jpeg_simd_cpu_support referenced in function init_simd
4>libjpeg.lib(jsimd_i386.obj) : error LNK2001: unresolved external symbol 
jconst_rgb_ycc_convert_sse2
4>libjpeg.lib(jsimd_i386.obj) : error LNK2001: unresolved external symbol 
jconst_rgb_gray_convert_sse2
4>libjpeg.lib(jsimd_i386.obj) : error LNK2001: unresolved external symbol 
jconst_ycc_rgb_convert_sse2
4>libjpeg.lib(jsimd_i386.obj) : error LNK2019: unresolved external symbol 
jsimd_rgb_ycc_convert_mmx referenced in function jsimd_rgb_ycc_convert
...
(124 errors)

Original issue reported on code.google.com by nbcW...@gmail.com on 3 Aug 2012 at 9:52

GoogleCodeExporter commented 9 years ago
Thanks for the report.  I'll look into it. 
JPEG is option if you undefine the macro HAVE_JPEG

Original comment by fbarch...@chromium.org on 3 Aug 2012 at 8:12

GoogleCodeExporter commented 9 years ago
64 bit windows is not supported by Chromium.  So support is more difficult.

This is what I'm trying

set GYP_DEFINES=target_arch=x64 enable_sse2=1 branding=Chromium 
ffmpeg_branding=Chrome buildtype=Release

update DEPS
    "/trunk/deps/third_party/libjpeg_turbo@149334",
gclient runhooks
devenv -build "Debug|x64" libyuv.sln

2>Compiling...
1>..\..\build\Release\obj\libjpeg\jidctflt.obj : fatal error LNK1112: module 
machine type 'X86' conflicts with target machine type 'x64'
2>gtest_main.cc

Original comment by fbarch...@google.com on 9 Aug 2012 at 8:15

GoogleCodeExporter commented 9 years ago
Greetings,

Thank you for your bug report.
It seems libyuv uses an older version of libjpeg_turbo, which does not support 
Win64. Is it possible to change the DEPS file of libyuv to use libjpeg_turbo 
r149334? Also, to compile libyuv for Win64, we need to set the GYP_DEFINES 
environment variable before running the 'gclient sync' command as listed below.

 > set GYP_DEFINES=target_arch="x64"
 > gclient config http://libyuv.googlecode.com/svn/trunk
 > gclient sync --force
 > "%VS90COMNTOOLS%vsvars32.bat"
 > devenv -build "Release|x64" libyuv.sln

Regards,

Hironori Bono

Original comment by hb...@chromium.org on 9 Aug 2012 at 9:09

GoogleCodeExporter commented 9 years ago
r317 of libyuv updates DEPS to:
    Var("chromium_trunk") + "/deps/third_party/libjpeg_turbo@149334",

 set GYP_DEFINES=target_arch="x64"
 gclient runhooks --force
 "%VS90COMNTOOLS%vsvars32.bat"
 devenv -build "Release|x64" libyuv.sln
 devenv -build "Release|x64" libyuv_test.sln
 build\release\libyuv_unittest.exe

The tests pass.
[==========] 136 tests from 1 test case ran. (856220 ms total)

64 bit Windows is unoptimized.  The Visual C (2008/2010) compiler does not 
allow inline assembly.
The gcc version supports 64 bit, but cygwin and mingw are not well tested.

Original comment by fbarch...@google.com on 9 Aug 2012 at 6:34

GoogleCodeExporter commented 9 years ago
r318 cleans up a build warning.

Original comment by fbarch...@google.com on 9 Aug 2012 at 9:10