Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors When Compiling on Ubuntu 22.04 #187

Open
ghost opened this issue Jul 20, 2022 · 8 comments
Open

Errors When Compiling on Ubuntu 22.04 #187

ghost opened this issue Jul 20, 2022 · 8 comments

Comments

@ghost
Copy link

ghost commented Jul 20, 2022

I am getting these errors while compiling, on Ubuntu 22.04:

In file included from /home/krixano/LucenePlusPlus/src/test/gtest/googletest/src/gtest-all.cc:42:
/home/krixano/LucenePlusPlus/src/test/gtest/googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’:
/home/krixano/LucenePlusPlus/src/test/gtest/googletest/src/gtest-death-test.cc:1301:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
 1301 |   StackLowerThanAddress(&dummy, &result);
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/home/krixano/LucenePlusPlus/src/test/gtest/googletest/src/gtest-death-test.cc:1290:13: note: by argument 1 of type ‘const void*’ to ‘void testing::internal::StackLowerThanAddress(const void*, bool*)’ declared here
 1290 | static void StackLowerThanAddress(const void* ptr, bool* result) {
      |             ^~~~~~~~~~~~~~~~~~~~~
/home/krixano/LucenePlusPlus/src/test/gtest/googletest/src/gtest-death-test.cc:1299:7: note: ‘dummy’ declared here
 1299 |   int dummy;
      |       ^~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [src/test/gtest/googletest/CMakeFiles/gtest.dir/build.make:76: src/test/gtest/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:882: src/test/gtest/googletest/CMakeFiles/gtest.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Gcc Version: gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0

@LocutusOfBorg
Copy link
Contributor

Hello, just don't use the gtest? there is one available with apt, or just apt-get source lucene++ and build from there. There are few patches and configuration switches.

@ghost
Copy link
Author

ghost commented Feb 20, 2023

@LocutusOfBorg It is not my job to fix other people's build systems. If things don't compile correctly using the provided build files, then the programming team needs to fix that, not the users who don't want to waste time fixing other people's mistakes.

The programming team should also not be so slow to read and respond to these issues. I've already found a solution and moved on.

@alanw
Copy link
Collaborator

alanw commented Feb 20, 2023

I guess "the programming team" in this case is me?

I certainly don't want to waste your time, but at the same time I don't have access to Ubuntu or the time to deep dive into this particular problem, apologies.

@LocutusOfBorg
Copy link
Contributor

@krixano using bundled libraries is considered bad pratice in Debian and Ubuntu, this is why I suggested you to just use system provided googletest.
Or just build with -DENABLE_TEST=OFF

@LocutusOfBorg
Copy link
Contributor

Also, works for me in the very same Ubuntu version, as well as Debian, so unless you provide build flags, and steps to reproduce, I guess there is not much we can do.

@kmatheussen
Copy link
Contributor

kmatheussen commented Feb 20, 2023 via email

@kmatheussen
Copy link
Contributor

kmatheussen commented Feb 20, 2023 via email

@LocutusOfBorg
Copy link
Contributor

Well, OTOH updating googletest to latest version will indeed fix this and other problems
google/googletest@4679637

V1.13.0 has the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants