[Mesa-dev] [Mesa-stable] [PATCH] Scons: swr: fix LLVM >= 7 build
Liviu Prodea
liviuprodea at yahoo.com
Thu Oct 11 13:26:34 UTC 2018
I looked at bugs 108308 and 108310 and tested the attached patch
https://bugs.freedesktop.org/attachment.cgi?id=141969
It seams to be a lot better than patchwork series 50108:
- it doesn't have build system specific code;
- no extra libraries so that Meson limitation regarding dependency modules addition based on dependency version is no longer hit;
- no LLVM modules requirements changes. Which means no build break with Scons or Meson and linking break between osmesa and swr. Needs testing with LLVM 6.0.1.
On Sunday, October 7, 2018, 6:35:26 AM GMT+3, Hota, Alok <alok.hota at intel.com> wrote:
#yiv8833351369 #yiv8833351369 -- _filtered #yiv8833351369 {panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv8833351369 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #yiv8833351369 {panose-1:0 0 0 0 0 0 0 0 0 0;}#yiv8833351369 #yiv8833351369 p.yiv8833351369MsoNormal, #yiv8833351369 li.yiv8833351369MsoNormal, #yiv8833351369 div.yiv8833351369MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:New serif;}#yiv8833351369 a:link, #yiv8833351369 span.yiv8833351369MsoHyperlink {color:blue;text-decoration:underline;}#yiv8833351369 a:visited, #yiv8833351369 span.yiv8833351369MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv8833351369 span.yiv8833351369EmailStyle17 {font-family:sans-serif;color:#1F497D;}#yiv8833351369 .yiv8833351369MsoChpDefault {font-size:10.0pt;} _filtered #yiv8833351369 {margin:1.0in 1.0in 1.0in 1.0in;}#yiv8833351369 div.yiv8833351369WordSection1 {}#yiv8833351369
Thanks for the patch!
And thanks for describing the linking error; we will look further into it. This patch should be a good starting point for resolving it.
-Alok
From: mesa-dev [mailto:mesa-dev-bounces at lists.freedesktop.org]On Behalf Of Liviu Prodea
Sent: Saturday, October 6, 2018 3:09 PM
To: mesa-dev at lists.freedesktop.org
Cc: mesa-stable at lists.freedesktop.org
Subject: [Mesa-dev] [Mesa-stable] [PATCH] Scons: swr: fix LLVM >= 7 build
Well I am more used with the merge / pull request model of sending patches so I am going to link it instead of inlining:
https://raw.githubusercontent.com/pal1000/mesa-dist-win/master/patches/upstream/scons-swr-llvm7.patch
This patch depends onseries 50108 to be effective but it can be safely merged either before or after it.
Unfortunately this patch doesn't help osmesa linking with swr when using llvm >= 7 which is also an issue unaddressed by series 50108.
If you try to build both swr and osmesa together when using LLVM 7.0 with Scons you get this after applying this patch otherwise would be way more unresolved symbols. This patch cuts 41 unresolved symbols resulting in successful build when not building osmesa.
Generating code
Finished generating code
Finished generating code
Finished generating code
Archiving build\windows-x86_64\gallium\drivers\swr\swr.lib ...
Linking build\windows-x86_64\gallium\targets\osmesa\osmesa.dll ...
Linking build\windows-x86_64\gallium\targets\libgl-gdi\opengl32.dll ...
Creating library build\windows-x86_64\gallium\targets\osmesa\osmesa.lib and object build\windows-x86_64\gallium\targets\osmesa\osmesa.exp
Creating library build\windows-x86_64\gallium\targets\libgl-gdi\opengl32.lib and object build\windows-x86_64\gallium\targets\libgl-gdi\opengl32.exp
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createPGOInstrumentationUseLegacyPass(class llvm::StringRef)" (?createPGOInstrumentationUseLegacyPass at llvm@@YAPEAVModulePass at 1@VStringRef at 1@@Z)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createPGOInstrumentationGenLegacyPass(void)" (?createPGOInstrumentationGenLegacyPass at llvm@@YAPEAVModulePass at 1@XZ)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::FunctionPass * __cdecl llvm::createPGOMemOPSizeOptLegacyPass(void)" (?createPGOMemOPSizeOptLegacyPass at llvm@@YAPEAVFunctionPass at 1@XZ)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createPGOIndirectCallPromotionLegacyPass(bool,bool)" (?createPGOIndirectCallPromotionLegacyPass at llvm@@YAPEAVModulePass at 1@_N0 at Z)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createInstrProfilingLegacyPass(struct llvm::InstrProfOptions const &)" (?createInstrProfilingLegacyPass at llvm@@YAPEAVModulePass at 1@AEBUInstrProfOptions at 1@@Z)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "public: static struct llvm::GCOVOptions __cdecl llvm::GCOVOptions::getDefault(void)" (?getDefault at GCOVOptions@llvm@@SA?AU12 at XZ)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::FunctionPass * __cdecl llvm::createBoundsCheckingLegacyPass(void)" (?createBoundsCheckingLegacyPass at llvm@@YAPEAVFunctionPass at 1@XZ)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createGCOVProfilerPass(struct llvm::GCOVOptions const &)" (?createGCOVProfilerPass at llvm@@YAPEAVModulePass at 1@AEBUGCOVOptions at 1@@Z)
build\windows-x86_64\gallium\targets\libgl-gdi\opengl32.dll : fatal error LNK1120: 8 unresolved externals
scons: *** [build\windows-x86_64\gallium\targets\libgl-gdi\opengl32.dll] Error 1120
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createPGOInstrumentationUseLegacyPass(class llvm::StringRef)" (?createPGOInstrumentationUseLegacyPass at llvm@@YAPEAVModulePass at 1@VStringRef at 1@@Z)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createPGOInstrumentationGenLegacyPass(void)" (?createPGOInstrumentationGenLegacyPass at llvm@@YAPEAVModulePass at 1@XZ)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::FunctionPass * __cdecl llvm::createPGOMemOPSizeOptLegacyPass(void)" (?createPGOMemOPSizeOptLegacyPass at llvm@@YAPEAVFunctionPass at 1@XZ)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createPGOIndirectCallPromotionLegacyPass(bool,bool)" (?createPGOIndirectCallPromotionLegacyPass at llvm@@YAPEAVModulePass at 1@_N0 at Z)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createInstrProfilingLegacyPass(struct llvm::InstrProfOptions const &)" (?createInstrProfilingLegacyPass at llvm@@YAPEAVModulePass at 1@AEBUInstrProfOptions at 1@@Z)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "public: static struct llvm::GCOVOptions __cdecl llvm::GCOVOptions::getDefault(void)" (?getDefault at GCOVOptions@llvm@@SA?AU12 at XZ)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::FunctionPass * __cdecl llvm::createBoundsCheckingLegacyPass(void)" (?createBoundsCheckingLegacyPass at llvm@@YAPEAVFunctionPass at 1@XZ)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createGCOVProfilerPass(struct llvm::GCOVOptions const &)" (?createGCOVProfilerPass at llvm@@YAPEAVModulePass at 1@AEBUGCOVOptions at 1@@Z)
build\windows-x86_64\gallium\targets\osmesa\osmesa.dll : fatal error LNK1120: 8 unresolved externals
scons: *** [build\windows-x86_64\gallium\targets\osmesa\osmesa.dll] Error 1120
scons: building terminated because of errors.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181011/93d085be/attachment.html>
More information about the mesa-dev
mailing list