Closed dalance closed 4 years ago
Those symbols look like libstdc++ symbols. Can you verify that libstdc++ is installed on the host? There should be a version that matches your g++ version.
Thanks. The version of libstdc++ is the same as g++. This issue may be related to bazel's issue https://github.com/bazelbuild/bazel/issues/10327.
I tried some workarounds.
RUN gcc --version; cd verible; BAZEL_LINKOPTS="-static-libstdc++:-lm" BAZEL_LINKLIBS="-l%:libstdc++.a" bazel build --sandbox_debug --cxxopt='-std=c++17' //...
The link error was resolved, but another compile error happened.
[0 / 93] [Prepa] Creating source manifest for //common/parser:move_yacc_stack_symbols
[119 / 519] Compiling external/com_google_googletest/googlemock/src/gmock-internal-utils.cc; 2s processwrapper-sandbox ... (32 actions, 31 running)
[224 / 534] Compiling external/com_google_googletest/googletest/src/gtest.cc; 5s processwrapper-sandbox ... (32 actions, 31 running)
[505 / 803] CcConfigureMakeRule bazel/m4/include [for host]; 3s processwrapper-sandbox ... (32 actions, 31 running)
[1,197 / 1,700] CcConfigureMakeRule bazel/m4/include [for host]; 7s processwrapper-sandbox ... (32 actions, 31 running)
ERROR: /verible/common/formatting/BUILD:242:1: C++ compilation of rule '//common/formatting:line_wrap_searcher_test' failed (Exit 1) process-wrapper failed: error executing command
(cd /root/.cache/bazel/_bazel_root/74978e9359729ba3edce57df66847b47/sandbox/processwrapper-sandbox/486/execroot/com_google_verible && \
exec env - \
LD_LIBRARY_PATH=/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib \
PATH=/opt/rh/devtoolset-8/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
PWD=/proc/self/cwd \
TMPDIR=/tmp \
/root/.cache/bazel/_bazel_root/install/be94b975a405b1ff4c8f3e1c55c94af6/process-wrapper '--timeout=0' '--kill_delay=15' /opt/rh/devtoolset-8/root/usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -MD -MF bazel-out/k8-fastbuild/bin/common/formatting/_objs/line_wrap_searcher_test/line_wrap_searcher_test.pic.d '-frandom-seed=bazel-out/k8-fastbuild/bin/common/formatting/_objs/line_wrap_searcher_test/line_wrap_searcher_test.pic.o' -fPIC -D__CLANG_SUPPORT_DYN_ANNOTATION__ -iquote . -iquote bazel-out/k8-fastbuild/bin -iquote external/com_google_absl -iquote bazel-out/k8-fastbuild/bin/external/com_google_absl -iquote external/com_google_googletest -iquote bazel-out/k8-fastbuild/bin/external/com_google_googletest -iquote external/bazel_tools -iquote bazel-out/k8-fastbuild/bin/external/bazel_tools -isystem external/com_google_googletest/googlemock -isystem bazel-out/k8-fastbuild/bin/external/com_google_googletest/googlemock -isystem external/com_google_googletest/googlemock/include -isystem bazel-out/k8-fastbuild/bin/external/com_google_googletest/googlemock/include -isystem external/com_google_googletest/googletest -isystem bazel-out/k8-fastbuild/bin/external/com_google_googletest/googletest -isystem external/com_google_googletest/googletest/include -isystem bazel-out/k8-fastbuild/bin/external/com_google_googletest/googletest/include '-std=c++17' -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c common/formatting/line_wrap_searcher_test.cc -o bazel-out/k8-fastbuild/bin/common/formatting/_objs/line_wrap_searcher_test/line_wrap_searcher_test.pic.o)
In file included from external/com_google_googletest/googletest/include/gtest/gtest.h:62,
from external/com_google_googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:47,
from external/com_google_googletest/googlemock/include/gmock/gmock-actions.h:51,
from external/com_google_googletest/googlemock/include/gmock/gmock.h:59,
from common/formatting/line_wrap_searcher_test.cc:19:
common/formatting/line_wrap_searcher_test.cc: In member function 'virtual void verible::{anonymous}::SearchLineWrapsTestFixture_DisplayEquallyOptimalWrappings_Test::TestBody()':
common/formatting/line_wrap_searcher_test.cc:357:21: error: 'StrContains' is not a member of 'absl'
EXPECT_TRUE(absl::StrContains(stream.str(), "Found 2 equally good"));
^~~~~~~~~~~
common/formatting/line_wrap_searcher_test.cc:358:21: error: 'StrContains' is not a member of 'absl'
EXPECT_TRUE(absl::StrContains(stream.str(), "============"));
^~~~~~~~~~~
INFO: Elapsed time: 37.080s, Critical Path: 11.38s
INFO: 520 processes: 520 processwrapper-sandbox.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
If it is bazel's issue, I'll wait until it is fixed.
BTW, verible is not used on RHEL/CentOS7? In my understanding, RHEL/CentOS7 is the most major platform supported by commercial EDA vendors.
Long story short, Verible grew up in a non-EDA-tool-friendly, non-RHEL/Centos environment, and is only recently being tested against 'foreign' environments and toolchains. Bear with us, as we shake out these early portability issues. The compile error you see is probably attributed to a symbol that is available in our internal version of the absl library but not yet released.
Ok, I have a fix for absl::StrContains
in the pipeline. Expect it to land some time tomorrow, after it is (manually) pushed to master.
OK. I understand the current status. I'll try the next revision tomorrow.
Looks like the absl::StrContains
issue was replicated on Ubuntu at https://travis-ci.com/SymbiFlow/conda-packages/jobs/262914281
This is a case where internally, we get a dependency transitively, but externally we do not, due to outbound transformations. We have tools to detect and fix this. We also have yet to connect internal presubmits to external presubmits.
The latest revision was successfully compiled. Thank you.
The final Dockerfile becomes below:
FROM centos:7
ADD https://copr.fedorainfracloud.org/coprs/vbatts/bazel/repo/epel-7/vbatts-bazel-epel-7.repo /etc/yum.repos.d
RUN yum install -y centos-release-scl
RUN yum install -y \
devtoolset-8 \
git \
wget \
bazel
SHELL [ "scl", "enable", "devtoolset-8"]
RUN git clone https://github.com/google/verible
RUN gcc --version; cd verible; BAZEL_LINKOPTS="-static-libstdc++:-lm" BAZEL_LINKLIBS="-l%:libstdc++.a" bazel build --cxxopt='-std=c++17' //...
great to hear! @hzeller @mithro Would it be appropriate to include a Dockerfile in our source tree and add this to our CI?
I think having docker builds seems like a good idea. Only issue is there is too many options to choose from here! :-P - The options as I see them are;
Google Cloud Build is probably the fastest option. Travis CI is probably the most usable by people who fork the repository.
The pull request at #168 should provide prebuilt binaries for;
I tried to build on RHEL/CentOS 7 environment, but the build was failed. The environment can reproduce by the following Dockerfile.
The execution result is below:
I tried
devtoolset-7
( gcc 7.3.1 ) too. It failed at the similar error.