You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a machine based on CPU with e2k (Elbrus) architecture, and it is supplied with EDG-based LCC compiler, which is mainly compatible with GCC, but not exactly. Specifically, it has different warning causes and (as of version 1.25) does not support __attribute__((optimize("no-optimize-sibling-calls"))) (the same as with NVC, which has a specific workaround in googletest's code). Due to this, googletest can't be built with LCC on this machine without warnings and errors, unless patched correspondingly. And even then, after running CTest, the googletest-list-tests-unittest test fails.
I expect the build of googletest be successful and warningless with LCC that can fix these issues), and all CTest tests to pass. I'm ready to submit a PR which does that, from my fork of googletest.
Instead, I see a lot of unexpected warnings of -Wunused-variable, -Wunused-but-set-variable, -Wunused-function, -Wshadow that don't exist on GCC@x86_64, and, if building with lcc-1.25, the following error:
lcc: "/srv/home/molchan_i/googletest-master/googletest/googletest/src/gtest.cc", line 1166: error: unrecognized argument to attribute "optimize"
Steps to reproduce the problem
Use the e2k-based machine with LCC compiler. If you don't have one, I can provide user-mode ssh access to it (welcome here, the machine of a subject is yukari).
Configure the project: mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=Release -Dgmock_build_tests=ON -Dgtest_build_samples=ON -Dgtest_build_tests=ON -DBUILD_SHARED_LIBS=ON ../googletest
Build it: make -j32 (you may specify different number of processes).
You'll find a lot of build warnings.
Optionally, run ctest -j32 after build: you'll find googletest-list-tests-unittest test to fail.
If you proceed with LCC 1.25, you can't build gmock and gtest tests successfully (there are a lot of errors like no instance of overloaded function "testing::ElementsAreArray" matches the argument list, and compiling googletest-printers-test.cc segfaults--it looks like a known bug that was fixed in LCC 1.26), so configure string may look like this:
cmake -DCMAKE_BUILD_TYPE=Release -Dgmock_build_tests=OFF -Dgtest_build_samples=ON -Dgtest_build_tests=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_C_COMPILER=lcc-1.25 -DCMAKE_CXX_COMPILER=l++-1.25 ../googletest`.
Describe the issue
I have a machine based on CPU with e2k (Elbrus) architecture, and it is supplied with EDG-based LCC compiler, which is mainly compatible with GCC, but not exactly. Specifically, it has different warning causes and (as of version 1.25) does not support
__attribute__((optimize("no-optimize-sibling-calls")))
(the same as with NVC, which has a specific workaround in googletest's code). Due to this, googletest can't be built with LCC on this machine without warnings and errors, unless patched correspondingly. And even then, after running CTest, thegoogletest-list-tests-unittest
test fails.I expect the build of googletest be successful and warningless with LCC that can fix these issues), and all CTest tests to pass. I'm ready to submit a PR which does that, from my fork of googletest.
Instead, I see a lot of unexpected warnings of
-Wunused-variable
,-Wunused-but-set-variable
,-Wunused-function
,-Wshadow
that don't exist on GCC@x86_64, and, if building with lcc-1.25, the following error:Steps to reproduce the problem
yukari
).git clone https://github.com/google/googletest
mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=Release -Dgmock_build_tests=ON -Dgtest_build_samples=ON -Dgtest_build_tests=ON -DBUILD_SHARED_LIBS=ON ../googletest
make -j32
(you may specify different number of processes).ctest -j32
after build: you'll findgoogletest-list-tests-unittest
test to fail.If you proceed with LCC 1.25, you can't build gmock and gtest tests successfully (there are a lot of errors like
no instance of overloaded function "testing::ElementsAreArray" matches the argument list
, and compilinggoogletest-printers-test.cc
segfaults--it looks like a known bug that was fixed in LCC 1.26), so configure string may look like this:cmake -DCMAKE_BUILD_TYPE=Release -Dgmock_build_tests=OFF -Dgtest_build_samples=ON -Dgtest_build_tests=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_C_COMPILER=lcc-1.25 -DCMAKE_CXX_COMPILER=l++-1.25 ../googletest`.
What version of GoogleTest are you using?
I use current
main
, commit ff233bd.What operating system and version are you using?
My
/etc/os-release
:What compiler and version are you using?
lcc:1.25.20:Nov-17-2021:e2k-v4-linux gcc (GCC) 7.3.0 compatible
)lcc:1.26.22:Jan-10-2024:e2k-v4-linux gcc (GCC) 9.3.0 compatible
)What build system are you using?
I use cmake version 3.28.0.
Additional context
No response
The text was updated successfully, but these errors were encountered: