amitchhabra / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Illegal Instruction(core dumped) error when I run google-test framework for powerpc(PPC) architecture #409

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For the unit testing of C++/C code on PowerPC(PPC) architecture we chose the 
googletest framework. 
We successfully cross-compiled the google-test framework for the PPC 
architecture but when we run the sample1_unittest on the  powerpc I got the 
following message
"Illegal instruction(core dumped)"

Following are the set of instructions followed for cross-compiling the 
google-test framework using CMake for the PPC architecture.

1. Tool-chain directory is present in mine home directory.
2. Make Changes to the CMakeLists.txt for the purpose of cross-compilation(find 
attached CMakeLists.h)
3. Run the following command in $GTEST_DIR
       $>> cmake .
4. Run the following command to build libgtest.a in directory $GTEST_DIR   
      $>> make 
5. Compile sample1_unittest(GoogleTest sample unit tests) using the following 
command.
$>>/home/wajeeha/iods-ntgr-bld/toolkit/gsm73xx/bin/ppc-linux-g++ 
-I/home/wajeeha/iods-ntgr-bld/linux-2.6.26.7/include -I${GTEST_DIR}/include 
libgtest.a sample1_unittest.cc sample1.cc  -o my_test -lpthread

6. To see target information of executable enter the following command
    $>>file my_test 
   Output: 
   my_test: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), not stripped

But when I ran the executable my_test on powerpc architecture I get the 
following error message 
$>>"Illegal instruction(core dumped)"

Thanks in advance,
From WajeehaJ

Original issue reported on code.google.com by wajeeha....@gmail.com on 27 Apr 2012 at 11:12

Attachments:

GoogleCodeExporter commented 9 years ago
We don't officially support Google Test on PPC as we have neither access to 
hardware nor expertise in the architecture. You best shot at help is to post 
your question to the mailing list. People there may be able to help you. Be 
sure to include details that will make it possible for them to understand the 
problem. At the very least build with the debug info and post the messages 
stack dumps from the crash.

Original comment by vladlosev on 27 Apr 2012 at 6:05