Opened 8 years ago

Closed 4 years ago

#10565 closed Bugs (obsolete)

Boost test seg faults when -mmacosx-version-min=10.6 on OS X 10.9 system

Reported by: llaswell@… Owned by: Gennadiy Rozental
Milestone: To Be Determined Component: test
Version: Boost 1.51.0 Severity: Problem
Keywords: Cc:

Description

When I build the following program:

#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MAIN #include <boost/test/unit_test.hpp> #include <boost/test/debug.hpp>

BOOST_AUTO_TEST_CASE (simple) {

BOOST_REQUIRE ( 1 + 1 == 2 );

}

Here are the build commands:

llaswell2-ltm:leebuild llaswell$ make VERBOSE=1 "/Applications/CMake 2.8-12.app/Contents/bin/cmake" -H/Users/llaswell/src/llaswell_mac2/dev/lib/Messaging/unitTest/src -B/Users/llaswell/src/llaswell_mac2/dev/lib/Messaging/unitTest/src/leebuild --check-build-system CMakeFiles/Makefile.cmake 0 "/Applications/CMake 2.8-12.app/Contents/bin/cmake" -E cmake_progress_start /Users/llaswell/src/llaswell_mac2/dev/lib/Messaging/unitTest/src/leebuild/CMakeFiles /Users/llaswell/src/llaswell_mac2/dev/lib/Messaging/unitTest/src/leebuild/CMakeFiles/progress.marks /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/simpleTest.dir/build.make CMakeFiles/simpleTest.dir/depend cd /Users/llaswell/src/llaswell_mac2/dev/lib/Messaging/unitTest/src/leebuild && "/Applications/CMake 2.8-12.app/Contents/bin/cmake" -E cmake_depends "Unix Makefiles" /Users/llaswell/src/llaswell_mac2/dev/lib/Messaging/unitTest/src /Users/llaswell/src/llaswell_mac2/dev/lib/Messaging/unitTest/src /Users/llaswell/src/llaswell_mac2/dev/lib/Messaging/unitTest/src/leebuild /Users/llaswell/src/llaswell_mac2/dev/lib/Messaging/unitTest/src/leebuild /Users/llaswell/src/llaswell_mac2/dev/lib/Messaging/unitTest/src/leebuild/CMakeFiles/simpleTest.dir/DependInfo.cmake --color= /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/simpleTest.dir/build.make CMakeFiles/simpleTest.dir/build "/Applications/CMake 2.8-12.app/Contents/bin/cmake" -E cmake_progress_report /Users/llaswell/src/llaswell_mac2/dev/lib/Messaging/unitTest/src/leebuild/CMakeFiles 1 [100%] Building CXX object CMakeFiles/simpleTest.dir/simpleTest.o /usr/bin/c++ -mmacosx-version-min=10.6 -g -I/Users/llaswell/src/llaswell_mac2/dev/lib/Messaging/unitTest/src/src -I/Users/llaswell/src/llaswell_mac2/external/boost/boost-1.51.0/include -o CMakeFiles/simpleTest.dir/simpleTest.o -c /Users/llaswell/src/llaswell_mac2/dev/lib/Messaging/unitTest/src/simpleTest.cpp Linking CXX executable simpleTest "/Applications/CMake 2.8-12.app/Contents/bin/cmake" -E cmake_link_script CMakeFiles/simpleTest.dir/link.txt --verbose=1 /usr/bin/c++ -mmacosx-version-min=10.6 -g -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/simpleTest.dir/simpleTest.o -o simpleTest /Users/llaswell/src/llaswell_mac2/external/boost/boost-1.51.0/lib/macosx/libboost_unit_test_framework.dylib /Users/llaswell/src/llaswell_mac2/external/boost/boost-1.51.0/lib/macosx/libboost_regex.dylib "/Applications/CMake 2.8-12.app/Contents/bin/cmake" -E cmake_progress_report /Users/llaswell/src/llaswell_mac2/dev/lib/Messaging/unitTest/src/leebuild/CMakeFiles 1 [100%] Built target simpleTest "/Applications/CMake 2.8-12.app/Contents/bin/cmake" -E cmake_progress_start /Users/llaswell/src/llaswell_mac2/dev/lib/Messaging/unitTest/src/leebuild/CMakeFiles 0

The OS is OS X 10.9

If I omit the -mmacosx-version-min=10.6 flag or use -mmacosx-version-min=10.9, it works fine.

As built above, I get:

llaswell2-ltm:leebuild llaswell$ ./simpleTest Segmentation fault: 11

Change History (2)

comment:1 by Raffi Enficiaud, 7 years ago

I am not sure what library you are linking to, and how this library was built. How did you compile boost.test?

comment:2 by Raffi Enficiaud, 4 years ago

Resolution: obsolete
Status: newclosed

I am closing this as the ticket is too old and I cannot reproduce on my end. Feel free to create a new ticket if needed.

Note: See TracTickets for help on using tickets.