[Mesa-dev] Building Mesa and LLVM cross compiling Linux to Windows issue
Jose Fonseca
jfonseca at vmware.com
Thu Mar 17 20:56:50 UTC 2016
On 17/03/16 18:42, Roland Scheidegger wrote:
> I suspect you simply ran into an issue with old mesa and new llvm.
> Unfortunately some usage of the c++ abi of llvm is unavoidable, and the
> abi is unstable, thus breaking quite often. And we do not generally
> backport such fixes to older mesa releases (if only mostly because
> nobodoy would actually test them).
> So you have 3 choices:
> a) use newer mesa version
> b) use older llvm version
I recommend this, b)
FWIW, we still use a slightly patched LLVM 3.3. But I think if you take
stock LLVM 3.5 or LLVM 3.6 it should work well.
Jose
> c) backport whatever is necessary on your own.
> If you really want to try c), you might actually be lucky, since it only
> was a link error, it might not be an abi issue - it is possible picking
> a5256012ef8ea31bc8025fc72193a9772372c9a1 from mesa git master (which
> adds LLVMInstrumentation to the libs in scons/llvm.py) will do the
> trick. But don't quote me on that, the other errors might be something
> else entirely (c++11 abi issue? cross-compile issue?) I'm definitely no
> expert on this.
>
> Roland
>
>
> Am 17.03.2016 um 10:46 schrieb Jason Anderssen:
>> Hi all,
>>
>> I have been trying to compile LLVM 3.8 and Mesa 11.0.7, and I have the
>> final last hurdle I think to get past
>>
>> scons: Building targets ...
>>
>> Linking build/windows-x86_64/gallium/targets/libgl-gdi/opengl32.dll ...
>>
>> /home/janderssen/mesa_win64/llvm-3.8.build/lib/libLLVMCodeGen.a(Passes.o):Passes.cpp:(.text+0x2239):
>> undefined reference to `llvm::createSafeStackPass(llvm::TargetMachine
>> const*)'
>>
>> /home/janderssen/mesa_win64/llvm-3.8.build/lib/libLLVMSupport.a(Path.o):Path.cpp:(.text+0x8e5):
>> undefined reference to `__imp_CoTaskMemFree'
>>
>> /home/janderssen/mesa_win64/llvm-3.8.build/lib/libLLVMSupport.a(Path.o):Path.cpp:(.rdata$.refptr.FOLDERID_Profile[.refptr.FOLDERID_Profile]+0x0):
>> undefined reference to `FOLDERID_Profile'
>>
>> /home/janderssen/mesa_win64/llvm-3.8.build/lib/libLLVMSupport.a(Path.o):Path.cpp:(.rdata$.refptr.FOLDERID_LocalAppData[.refptr.FOLDERID_LocalAppData]+0x0):
>> undefined reference to `FOLDERID_LocalAppData'
>>
>> collect2: error: ld returned 1 exit status
>>
>> scons: *** [build/windows-x86_64/gallium/targets/libgl-gdi/opengl32.dll]
>> Error 1
>>
>> scons: building terminated because of errors.
>>
>>
>> I Managed to get this far, and would like to finalise it.
>>
>> LLVM Version 3.8
>>
>> Mesa 11.0.7
>>
>>
>> LVVM Configure line :
>>
>> ../*configure* -C --prefix=$HOME/mesa_win64/llvm-3.8.build
>> --host=x86_64-w64-mingw32 --enable-optimized --disable-assertions
>> --disable-pthreads --enable-targets=x86_64 --enable-bindings=none
>> --disable-libffi --with-c-include-dirs=/usr/x86_64-w64-mingw32
>> --with-gcc-toolchain=/usr/x86_64-w64-mingw32
>> --with-default-sysroot=/usr/x86_64-w64-mingw32
>>
>>
>> Mesa Compile line :
>>
>> LDFLAGS="-static -s" CXXFLAGS="-std=c++11" scons build=release
>> platform=windows toolchain=crossmingw machine=x86_64 libgl-gdi
>>
>>
>> Any ideas of what I am doing wrong ?
>>
>>
>> Cheers and thanks in advance for your help.
>>
>>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
More information about the mesa-dev
mailing list