-
Notifications
You must be signed in to change notification settings - Fork 2
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
Google test question #206
Comments
This is weird; I don't get this locally or see it on the CIs. We updated the submodule Can you please check that you have the correct commit and a clean submodule by running
and making sure that you only get
|
@CaitlinA What is the status on this issue? |
The googletest folder is pointing to the correct place
I am still unable to run units tests and get the same error as above. |
…tain setups - address issue #206: ``` In file included from googletest/googletest/src/gtest-all.cc:42: googletest/googletest/src/gtest.cc:393:12: error: missing field 'owner_' initializer [-Werror,-Wmissing-field-initializers] GTEST_API_ GTEST_DEFINE_STATIC_MUTEX_(g_linked_ptr_mutex); ``` - this appears to be a problem described here google/googletest#1521 which remains unsolved as of today - another project on github addressed this issue temporarily (advancedtelematic/aktualizr#841) by checking out `googletest` one commit before this problem was introduced with commit google/googletest@87a4cdd, i.e, google/googletest@7888184
Hm, too bad. I cannot replicate and thus cannot debug very well. However, I found an issue description on Another project on github addresses this issue temporarily (advancedtelematic/aktualizr#841) by checking out one commit before this problem was introduced with commit google/googletest@87a4cdd, i.e, google/googletest@7888184 (see branch https://github.com/DrylandEcology/SOILWAT2/tree/bugfix_206 and commit 5baeec0). Does this work for you? |
The problem persists with commit 5baeec0 Additionally, I manually applied the suggested edit in google/googletest#1521 and I now get a different error:
|
however, commit 5baeec0 resolved this error.
|
- addressing #206: both clang and gcc work (at least locally) * CXX=clang++ make clean test test_run * CXX=g++ make clean test test_run - don't overwrite standard flags such as CFLAGS, etc. - ignore errors when cleaning up (prefix commands with a hyphen) - ignore errors arising from deprecated warnings (as c code under clang++) --> remove once #208 is fixed - target `clean` is now a synonym of `cleaner` - first target is now `bin`, i.e., calling `make` will now compile the executable - updated `SW_Output_mock.c`
@CaitlinA Ok, I took the opportunity to clean up the |
Hi Daniel, Thanks for looking at this. I switched to commit 87aea18 and confirmed the googletest submodule is on the master branch (as indicated in the .gitmodules file. Is this correct?). When I run make test, I now receive a warning instead of an error for treating 'c' as 'c++', but now I am running into another error.
I tried running with g++ but I received the same error. |
Which version of clang are you using? You may have an outdated version: this was a bug in clang that was fixed in 2016 (https://reviews.llvm.org/D24990 as explained here https://marc.info/?l=cfe-dev&m=147517413909285&w=2), but Apple has been shipping outdated clang versions, see https://stackoverflow.com/questions/40284307/undefined-symbols-when-using-clangs-undefined-sanitizer -- apparently, you need at least the toolchain from xcode 9.0 (https://developer.apple.com/documentation/code_diagnostics/undefined_behavior_sanitizer) for the --> use target
instead of
|
Running
did allow for the tests to build and run when I was receiving the same errors as above. Luckily, updating my Command Line Tools for Xcode 9.2 has allowed me to build run tests with the normal
I think we can close this issue and merge your pull request for branch bugfix_206. |
closed by PR #209 |
Has anything changed about the way we connect to or use the google test submodule?
Previously, I have cloned and/or checked out any branch on SOILWAT2 and google test would work after the 'make test' command.
I just clean cloned SOILWAT2 and 'make test' is not working. I used the command 'git submodule init' and 'git submodule update --remote'. I received this error:
Maybe I am forgetting something. I can't find anything in the repository documentation.
The text was updated successfully, but these errors were encountered: