Discussion:
[Mesa-dev] [Bug 106209] [opencl] [llvm-svn] build failure undefined reference to `clang::FrontendTimesIsEnabled'
b***@freedesktop.org
2018-04-24 13:48:33 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=106209

Bug ID: 106209
Summary: [opencl] [llvm-svn] build failure undefined
reference to `clang::FrontendTimesIsEnabled'
Product: Mesa
Version: git
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Other
Assignee: mesa-***@lists.freedesktop.org
Reporter: ***@xs4all.nl
QA Contact: mesa-***@lists.freedesktop.org

mesa-git rev c2e159d050
llvm-svn rev r330683

using autotools,

./configure \
--prefix=/usr \
--sysconfdir=/etc \
--with-gallium-drivers=r300,r600,radeonsi,nouveau,svga,swrast,virgl \
--with-dri-drivers=i915,i965,r200,radeon,nouveau \
--with-platforms=x11,drm,surfaceless \
--with-vulkan-drivers=intel,radeon \
--enable-texture-float \
--enable-gallium-osmesa \
--enable-xa \
--enable-nine \
--disable-xvmc \
--enable-vdpau \
--enable-omx-bellagio \
--enable-opencl \
--enable-opencl-icd \
--enable-glx-tls \
--enable-libglvnd


omitting --enable-opencl and --enable-opencl-icd allows build to succeed .
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
b***@freedesktop.org
2018-04-24 13:49:49 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=106209

--- Comment #1 from LoneVVolf <***@xs4all.nl> ---
Created attachment 139055
--> https://bugs.freedesktop.org/attachment.cgi?id=139055&action=edit
autoreconf output
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
b***@freedesktop.org
2018-04-24 13:50:33 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=106209

--- Comment #2 from LoneVVolf <***@xs4all.nl> ---
Created attachment 139056
--> https://bugs.freedesktop.org/attachment.cgi?id=139056&action=edit
configure / make output
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
b***@freedesktop.org
2018-04-24 17:10:59 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=106209

Aaron Watry <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Blocks| |99553


Referenced Bugs:

https://bugs.freedesktop.org/show_bug.cgi?id=99553
[Bug 99553] Tracker bug for runnning OpenCL applications on Clover
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
b***@freedesktop.org
2018-04-25 01:22:55 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=106209

--- Comment #3 from Jan Vesely <***@rutgers.edu> ---
Looks like we don't link to libclangFrontend, which is required since r330571.
This should, however, be handled by llvm/clang when listing libraries required
for components.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
b***@freedesktop.org
2018-04-28 14:02:08 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=106209

Kai <***@dev.carbon-project.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@dev.carbon-project.org

--- Comment #4 from Kai <***@dev.carbon-project.org> ---
(In reply to Jan Vesely from comment #3)
Post by b***@freedesktop.org
Looks like we don't link to libclangFrontend, which is required since
r330571.
This should, however, be handled by llvm/clang when listing libraries
required for components.
That doesn't seem to be right. I'm seeing this build error with LLVM SVN
revision 331085 (basically a build of the source package from [0]). But when I
Post by b***@freedesktop.org
libtool: link: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/7/crtbeginS.o -Wl,--whole-archive ../../../../src/gallium/auxiliary/pipe-loader/.libs/libpipe_loader_dynamic.a ../../../../src/gallium/state_trackers/clover/.libs/libclover.a ../../../../src/gallium/auxiliary/.libs/libgallium.a ../../../../src/util/.libs/libmesautil.a -Wl,--no-whole-archive -L/usr/lib/llvm-7/lib -ldrm -lz -lexpat -lelf -ldl -lclangFrontendTool -lclangFrontend -lclangDriver -lclangSerialization -lclangCodeGen -lclangParse -lclangSema -lclangAnalysis -lclangAST -lclangEdit -lclangLex -lclangBasic -lLLVM-7 -lpthread -L/usr/lib/gcc/x86_64-linux-gnu/7 -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/7/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/7/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/crtn.o -g -O2 -fstack-protector-strong -march=native -mfpmath=sse -Wl,--gc-sections -Wl,--no-undefined -Wl,--version-script=../../../../../src/gallium/targets/opencl/opencl.sym -Wl,-z -Wl,relro -pthread -pthread -Wl,-soname -Wl,libMesaOpenCL.so.1 -o .libs/libMesaOpenCL.so.1.0.0
(.text._ZN5clang15BackendConsumer18HandleTopLevelDeclENS_12DeclGroupRefE[_ZN5clang15BackendConsumer18HandleTopLevelDeclENS_12DeclGroupRefE]+0x50): undefined reference to `clang::FrontendTimesIsEnabled'
(.text._ZN5clang15BackendConsumer10InitializeERNS_10ASTContextE[_ZN5clang15BackendConsumer10InitializeERNS_10ASTContextE]+0xc): undefined reference to `clang::FrontendTimesIsEnabled'
(.text._ZN5clang15BackendConsumer30HandleInlineFunctionDefinitionEPNS_12FunctionDeclE[_ZN5clang15BackendConsumer30HandleInlineFunctionDefinitionEPNS_12FunctionDeclE]+0x3c): undefined reference to `clang::FrontendTimesIsEnabled'
(.text._ZN5clang15BackendConsumer21HandleInterestingDeclENS_12DeclGroupRefE[_ZN5clang15BackendConsumer21HandleInterestingDeclENS_12DeclGroupRefE]+0x77): undefined reference to `clang::FrontendTimesIsEnabled'
(.text._ZN5clang13CodeGenAction17CreateASTConsumerERNS_16CompilerInstanceEN4llvm9StringRefE+0x2f1): undefined reference to `clang::FrontendTimesIsEnabled'
/usr/lib/llvm-7/lib/libclangCodeGen.a(CodeGenAction.cpp.o):(.text._ZN5clang13CodeGenAction17CreateASTConsumerERNS_16CompilerInstanceEN4llvm9StringRefE+0x4a8): more undefined references to `clang::FrontendTimesIsEnabled' follow
collect2: error: ld returned 1 exit status
make[5]: *** [Makefile:700: libMesaOpenCL.la] Error 1
which clearly includes "-lclangFrontend" and I verified, that
Post by b***@freedesktop.org
U llvm::DisableABIBreakingChecks
0000000000000000 V llvm::VerifyDisableABIBreakingChecks
0000000000000000 B clang::FrontendTimesIsEnabled
Or am I misreading something here?

[0] <https://llvm-jenkins.debian.net/job/llvm-toolchain-source/1729/>
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
b***@freedesktop.org
2018-05-01 12:17:23 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=106209

--- Comment #5 from Kai <***@dev.carbon-project.org> ---
Created attachment 139244
--> https://bugs.freedesktop.org/attachment.cgi?id=139244&action=edit
Proposed patch

The attached patch fixes the issue for me. I've sent it to mesa-dev as well,
though it'll take some time to show up there because of Greylisting.
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
b***@freedesktop.org
2018-05-01 12:30:55 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=106209

--- Comment #6 from Kai <***@dev.carbon-project.org> ---
Patch on the list at https://patchwork.freedesktop.org/patch/219763/
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
b***@freedesktop.org
2018-05-01 15:03:48 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=106209

--- Comment #7 from Jan Vesely <***@rutgers.edu> ---
Right. Thanks! I didn't realize we list clang libraries explicitly.
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
b***@freedesktop.org
2018-05-10 11:25:46 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=106209

Pavel Ondračka <***@email.cz> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@email.cz
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2018-05-15 05:05:40 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=106209

Kai <***@dev.carbon-project.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED

--- Comment #8 from Kai <***@dev.carbon-project.org> ---
This should be fixed by the following commit in Mesa master:

commit b691d9192c436aba5a76577b7d772a791283a2e2
Author: Kai WasserbÀch <***@dev.carbon-project.org>
Date: Tue May 1 14:14:46 2018 +0200

opencl: autotools: Fix linking order for OpenCL target

Otherwise the build fails with an undefined reference to
clang::FrontendTimesIsEnabled.

Bugzilla: https://bugs.freedesktop.org/106209
Cc: Jan Vesely <***@rutgers.edu>
Cc: mesa-***@lists.freedesktop.org
Signed-off-by: Kai WasserbÀch <***@dev.carbon-project.org>
Acked-by: Jan Vesely <***@rutgers.edu>
Tested-by: Aaron Watry <***@gmail.com>
Tested-by: Dieter NÃŒtzel <***@nuetzel-hh.de>
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
Loading...