Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
chromium-58.0.3029.81 + clang-4.0.0 = build fail
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
davidshen84
Apprentice
Apprentice


Joined: 09 Aug 2008
Posts: 257

PostPosted: Sat Apr 29, 2017 2:39 pm    Post subject: chromium-58.0.3029.81 + clang-4.0.0 = build fail Reply with quote

Hi,

I know Gentoo is still on the way to fully support Clang, and I would like to be a pioneer to try it out.

I had not set Clang as my default compiler. I am using the 'package.en' file to set per package environment.

My system is Gentoo x64, and has Clang 4.0.0. And I have llvm build by clang.

After the Chromium emerge started, I can confirm from the command line that clang/clang++ is used. The compilation failed in a few minutes, and I believe this is the killer:

Code:

[10114/25569] ../../../../../../../../../usr/bin/clang++ -MMD -MF clang_x64/obj/components/tracing/tools/proto_zero_plugin/proto_zero_plugin/proto_zero_plugin.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DDISABLE_NACL -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DCR_CLANG_REVISION=\"296320-1\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -I../.. -Iclang_x64/gen -I../../third_party/protobuf/src -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -fcolor-diagnostics -m64 -march=x86-64 -pthread -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-block-capture-autoreleasing -Wno-unused-lambda-capture -Wno-user-defined-warnings -O2 -fno-ident -fdata-sections -ffunction-sections -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../components/tracing/tools/proto_zero_plugin/proto_zero_plugin.cc -o clang_x64/obj/components/tracing/tools/proto_zero_plugin/proto_zero_plugin/proto_zero_plugin.o
FAILED: clang_x64/obj/components/tracing/tools/proto_zero_plugin/proto_zero_plugin/proto_zero_plugin.o
../../../../../../../../../usr/bin/clang++ -MMD -MF clang_x64/obj/components/tracing/tools/proto_zero_plugin/proto_zero_plugin/proto_zero_plugin.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DDISABLE_NACL -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DCR_CLANG_REVISION=\"296320-1\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -I../.. -Iclang_x64/gen -I../../third_party/protobuf/src -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -fcolor-diagnostics -m64 -march=x86-64 -pthread -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-block-capture-autoreleasing -Wno-unused-lambda-capture -Wno-user-defined-warnings -O2 -fno-ident -fdata-sections -ffunction-sections -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../components/tracing/tools/proto_zero_plugin/proto_zero_plugin.cc -o clang_x64/obj/components/tracing/tools/proto_zero_plugin/proto_zero_plugin/proto_zero_plugin.o
/bin/sh: ../../../../../../../../../usr/bin/clang++: No such file or directory



The build.log file is 14 MB, so I am not going to upload it. I searched through the file, and this is the only place that try to refer clang++ by using a relative path.

Is it a bug in the build script?


Thanks.

[Moderator edit: changed [quote] tags to [code] tags to preserve output layout. -Hu]
_________________
David Shen
Back to top
View user's profile Send private message
grumblebear
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2008
Posts: 133

PostPosted: Sat Apr 29, 2017 9:04 pm    Post subject: Reply with quote

I also use clang to compile chromium for some time now and faced the same error since clang-4.0. The reason is simply that clang is not installed in a standard location, what would cause clang and clang++ to appear in /usr/bin. Somewhere in the chromium build scripts there must be an error which does not pick up the right path for clang.

The solution for a successful compilation is simple: ln -s /usr/lib/llvm/4/bin/clang /usr/lib/llvm/4/bin/clang++ /usr/bin
Edit: chromium-59 also needs llvm-ar: ln -s /usr/lib/llvm/4/bin/llvm-ar /usr/bin

I have not filed a bug yet. Someone should...
Back to top
View user's profile Send private message
davidshen84
Apprentice
Apprentice


Joined: 09 Aug 2008
Posts: 257

PostPosted: Tue May 23, 2017 1:23 am    Post subject: Reply with quote

OK. I created a bug https://bugs.chromium.org/p/chromium/issues/detail?id=725318. Hope they will address it soon.
_________________
David Shen
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum