0

I have an application that is used unittest, written with gtest. My application work fine on Windows platform, several days ago i try run application on linux platform. Linux that is used have following configuration:

cat /etc/*-release    
Cluster Manager v7.2
slave
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Red Hat Enterprise Linux Server release 6.7 (Santiago)
Red Hat Enterprise Linux Server release 6.7 (Santiago)

I start build my application, for build we use cmake, that also include cmake from gcc:

add_subdirectory(/path/gtest/ ${PROJECT_BINARY_DIR}) 
add_executable(myApplication ${SOURCES}) 
add_dependencies(myApplication tinyxml2 gtest)
target_link_libraries(myApplication tinyxml2 gtest ${CMAKE_DL_LIBS})         

During application build I do not have any error. After build i try execute application and have an error: Segmentation fault During analysis i found that myApplication and gtest have different OS/ABI version:

  1. myApplication: UNIX - System V
  2. gtest: UNIX - Linux
  3. tinyXML2: UNIX - System V
  4. other binary and library also have: UNIX - System V

Do you know how i can fix this problem?

GCC version: 4.8.2

Andriy Mytroshyn
  • 221
  • 1
  • 5
  • 14
  • I'd say that it's not related. Make sure that it's compiled in the debug mode and run `valgrind` on it to see the problem (or use GDB to get a backtrace). If you really want to compile gtest differently, tell us where you've got it or how you've compiled it. – Velkan Jul 15 '16 at 18:55
  • You may want to consider [this answer](http://stackoverflow.com/a/31622855/1938798) for incorporating googletest into your build. It specifically addresses inconsistencies like yours. – Craig Scott Jul 16 '16 at 02:34

0 Answers0