Skip to content

Avoid accidentally using the "check" macro on OSX#342

Closed
erichkeane wants to merge 1 commit into
USCiLab:masterfrom
erichkeane:fix_check
Closed

Avoid accidentally using the "check" macro on OSX#342
erichkeane wants to merge 1 commit into
USCiLab:masterfrom
erichkeane:fix_check

Conversation

@erichkeane
Copy link
Copy Markdown
Contributor

Fix for #341, #273, and #104. Replace usages of "check(" with
"(check)(", which will prevent us from colliding with the macro defined
in OSX's Assert macros.

Fix for #341, #273, and #104.  Replace usages of "check(" with
"(check)(", which will prevent us from colliding with the macro defined
in OSX's Assert macros.
@erichkeane
Copy link
Copy Markdown
Contributor Author

@astrodroid , if you coudl validate this on OSX, it woudl be greatly appreciated.

@AzothAmmo
Copy link
Copy Markdown
Contributor

Will merge as soon as someone on OSX can test.

@astrodroid
Copy link
Copy Markdown

@erichkeane, I will be away for most of today, I can test this pull request this evening or tomorrow.

@astrodroid
Copy link
Copy Markdown

Hi although it works fine for me, I haven't been able to run any unit tests as I haven't found a way to run all of them automatically. Is there a script that I missed or do I have to call each test case?

@erichkeane
Copy link
Copy Markdown
Contributor Author

There is a CMake file in the root directory, and the unit tests all build (and I think run?) when doing 'make' after that.

Do something like this from the root of Cereal (assuming you have cmake installed):
mkdir Build
cd Build
cmake ../
make

@astrodroid
Copy link
Copy Markdown

astrodroid commented Sep 9, 2016

Thanks @erichkeane, I have cmake installed.

I did run cmake with the cmake_file.txt modified as here so that boost will be found:

set(Boost_USE_STATIC_LIBS TRUE)
set (BOOST_ROOT /Users/andreas/Documents/Development/build/)
set(Boost_INCLUDE_DIR /Users/andreas/Documents/Development/boost)
set(Boost_LIBRARY_DIR /Users/andreas/Documents/Development/boost/build/lib)

but I get link time error, appearing something has gone wrong in the setting up of the environmental variables.

Linking CXX executable test_array
Undefined symbols for architecture x86_64:
  "boost::unit_test::unit_test_main(bool (*)(), int, char**)", referenced from:
      _main in array.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [unittests/test_array] Error 1
make[1]: *** [unittests/CMakeFiles/test_array.dir/all] Error 2
make: *** [all] Error 2

If some of you has access to a mac it might be faster than me solving my issues with boost...

@astrodroid
Copy link
Copy Markdown

OK I managed to run the tests.

It passes all of them except the portability_test 32 and 64 bit which returns segmentation fault: 11.

But that was present even before and I haven't tried to look up what's causing it.

@AzothAmmo AzothAmmo added this to the v1.2.2 milestone Sep 21, 2016
AzothAmmo added a commit that referenced this pull request Oct 10, 2016
@AzothAmmo
Copy link
Copy Markdown
Contributor

Merged into develop.

The portability tests are probably because you don't have a 32bit compiler installed, you can safely compile with those tests turned off (SKIP_PORTABILITY_TEST=ON) for CMAKE.

@AzothAmmo AzothAmmo closed this Oct 10, 2016
@erichkeane erichkeane deleted the fix_check branch October 10, 2016 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants