Re: [Mesa-dev] [PATCH] configure: Check llvm-config --shared-mode
On 15 August 2017 at 15:04, Aaron Watrywrote: > glxinfo works fine afterwords, but I get the following error when I > try to run opencl programs: > CommandLine Error: Option 'help-list' registered more than once! > LLVM ERROR: inconsistency in registered CommandLine options > > I can go back to one of my other build configurations, but it's > looking like something in that is causing multiple > registrations/initializations of some llvm components. > I think the patch merely exposes another existing bug. But first things first - is the message fatal? I think the problem was "introduced" with 7372e3cf5f2df9dd2ec0423a4425baad098bf326 in order to workaround a LLVM bug. While later mesa commit 18b12bf53351e1a902dc1f2e527a94ec8d8f3eff aimed to silence the message. Can someone check which LLVM version has the the original issue resolved so we call LLVMParseCommandLineOptions() only as needed. Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] configure: Check llvm-config --shared-mode
On Tue, Aug 15, 2017 at 7:30 PM, Michel Dänzerwrote: > On 15/08/17 11:04 PM, Aaron Watry wrote: >> On Mon, Aug 14, 2017 at 10:11 PM, Michel Dänzer wrote: >>> On 15/08/17 12:00 PM, Aaron Watry wrote: On Mon, Aug 14, 2017 at 7:54 PM, Michel Dänzer wrote: > From: Michel Dänzer > > https://bugs.llvm.org/show_bug.cgi?id=6823 still affects current LLVM. > llvm-config --libs only reports the single shared library if LLVM was > built with -DLLVM_LINK_LLVM_DYLIB=ON. llvm-config --shared-mode reports > "shared" in that case, "static" otherwise (even if LLVM was built with > -DLLVM_BUILD_LLVM_DYLIB=ON). > > Fixes: 3d8da1f678e1 ("configure: Trust LLVM >= 4.0 llvm-config --libs > for shared libraries") > Signed-off-by: Michel Dänzer Thanks Michel, Fixes a build error I've been encountering tonight with all of the combinations of llvm builds I've tried (VC_REV=on/off, shared_libraries=1/0, dylib=1/0 Tested-by: Aaron Watry FYI: I've settled for now on LLVM_APPEND_VC_REV=ON, BUILD_SHARED_LIBS=1 amongst the rest of my llvm build flags. Previously, I was able to get away with VC_REV=off, LLVM_BULID_LLVM_DYLIB=1. >>> >>> The latter should work again with this patch. I'm using >>> LLVM_BULID_LLVM_DYLIB=ON LLVM_LINK_LLVM_DYLIB=ON, the latter removes the >>> need for LLVM_APPEND_VC_REV=OFF with my patches. >> >> Huh, I just tried to rebuild things with: >> -DLLVM_BUILD_LLVM_DYLIB=1 -DLLVM_LINK_LLVM_DYLIB=1 -DLLVM_APPEND_VC_REV=ON >> >> glxinfo works fine afterwords, but I get the following error when I >> try to run opencl programs: >> CommandLine Error: Option 'help-list' registered more than once! >> LLVM ERROR: inconsistency in registered CommandLine options > > Works for me, at least for the piglit OpenCL tests. > > >> I can go back to one of my other build configurations, but it's >> looking like something in that is causing multiple >> registrations/initializations of some llvm components. > > Right, make sure nothing's still linking the individual LLVM components > for you, either dynamically or statically. Have you run at least make > clean in the Mesa tree since changing the build configuration? Yeah, my usual rebuild includes an out-of-tree rebuild with a full reconfigure. I suspect that I had both static library and .so versions of LLVM installed simultaneously, or something similar. I deleted all of the llvm/clang artifacts out of $prefix, rebuilt LLVM, did a git clean -fdx on my mesa tree (to clear out the configure script, etc), and now things are working for me. Probably just a case of too many local configuration changes in too short a time leading to junk left around my system. Sorry for the noise. --Aaron > > > -- > Earthling Michel Dänzer | http://www.amd.com > Libre software enthusiast | Mesa and X developer ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] configure: Check llvm-config --shared-mode
On 15/08/17 11:04 PM, Aaron Watry wrote: > On Mon, Aug 14, 2017 at 10:11 PM, Michel Dänzerwrote: >> On 15/08/17 12:00 PM, Aaron Watry wrote: >>> On Mon, Aug 14, 2017 at 7:54 PM, Michel Dänzer wrote: From: Michel Dänzer https://bugs.llvm.org/show_bug.cgi?id=6823 still affects current LLVM. llvm-config --libs only reports the single shared library if LLVM was built with -DLLVM_LINK_LLVM_DYLIB=ON. llvm-config --shared-mode reports "shared" in that case, "static" otherwise (even if LLVM was built with -DLLVM_BUILD_LLVM_DYLIB=ON). Fixes: 3d8da1f678e1 ("configure: Trust LLVM >= 4.0 llvm-config --libs for shared libraries") Signed-off-by: Michel Dänzer >>> >>> Thanks Michel, >>> >>> Fixes a build error I've been encountering tonight with all of the >>> combinations of llvm builds I've tried (VC_REV=on/off, >>> shared_libraries=1/0, dylib=1/0 >>> >>> Tested-by: Aaron Watry >>> >>> FYI: I've settled for now on LLVM_APPEND_VC_REV=ON, >>> BUILD_SHARED_LIBS=1 amongst the rest of my llvm build flags. >>> Previously, I was able to get away with VC_REV=off, >>> LLVM_BULID_LLVM_DYLIB=1. >> >> The latter should work again with this patch. I'm using >> LLVM_BULID_LLVM_DYLIB=ON LLVM_LINK_LLVM_DYLIB=ON, the latter removes the >> need for LLVM_APPEND_VC_REV=OFF with my patches. > > Huh, I just tried to rebuild things with: > -DLLVM_BUILD_LLVM_DYLIB=1 -DLLVM_LINK_LLVM_DYLIB=1 -DLLVM_APPEND_VC_REV=ON > > glxinfo works fine afterwords, but I get the following error when I > try to run opencl programs: > CommandLine Error: Option 'help-list' registered more than once! > LLVM ERROR: inconsistency in registered CommandLine options Works for me, at least for the piglit OpenCL tests. > I can go back to one of my other build configurations, but it's > looking like something in that is causing multiple > registrations/initializations of some llvm components. Right, make sure nothing's still linking the individual LLVM components for you, either dynamically or statically. Have you run at least make clean in the Mesa tree since changing the build configuration? -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] configure: Check llvm-config --shared-mode
On 15/08/17 12:00 PM, Aaron Watry wrote: > On Mon, Aug 14, 2017 at 7:54 PM, Michel Dänzerwrote: >> From: Michel Dänzer >> >> https://bugs.llvm.org/show_bug.cgi?id=6823 still affects current LLVM. >> llvm-config --libs only reports the single shared library if LLVM was >> built with -DLLVM_LINK_LLVM_DYLIB=ON. llvm-config --shared-mode reports >> "shared" in that case, "static" otherwise (even if LLVM was built with >> -DLLVM_BUILD_LLVM_DYLIB=ON). >> >> Fixes: 3d8da1f678e1 ("configure: Trust LLVM >= 4.0 llvm-config --libs >> for shared libraries") >> Signed-off-by: Michel Dänzer > > Thanks Michel, > > Fixes a build error I've been encountering tonight with all of the > combinations of llvm builds I've tried (VC_REV=on/off, > shared_libraries=1/0, dylib=1/0 > > Tested-by: Aaron Watry > > FYI: I've settled for now on LLVM_APPEND_VC_REV=ON, > BUILD_SHARED_LIBS=1 amongst the rest of my llvm build flags. > Previously, I was able to get away with VC_REV=off, > LLVM_BULID_LLVM_DYLIB=1. The latter should work again with this patch. I'm using LLVM_BULID_LLVM_DYLIB=ON LLVM_LINK_LLVM_DYLIB=ON, the latter removes the need for LLVM_APPEND_VC_REV=OFF with my patches. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev