View previous topic :: View next topic |
Author |
Message |
davidshen84 Guru
Joined: 09 Aug 2008 Posts: 314
|
Posted: Sat Apr 29, 2017 2:39 pm Post subject: chromium-58.0.3029.81 + clang-4.0.0 = build fail |
|
|
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 |
|
|
grumblebear Apprentice
Joined: 26 Feb 2008 Posts: 202
|
Posted: Sat Apr 29, 2017 9:04 pm Post subject: |
|
|
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 |
|
|
davidshen84 Guru
Joined: 09 Aug 2008 Posts: 314
|
|
Back to top |
|
|
|