Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Testing and Deployment

Reply
Contributor
Georgechr
Posts: 42
Registered: ‎06-28-2013
My Device: Z10
My Carrier: None

Momentics unit tests not building

Hello,

 

I have installed the momentics unit testing plugin as per the instructions on this wiki https://github.com/blackberry/MomenticsUnitTestingPlugin/wiki .

 

The plugin installs fine and I can add the unit tests. Problem is when I try to build the project i get the following error in the logs:

09:19:04 **** Incremental Build of configuration Unit Tests for project Tests ****
make all 
-- The C compiler identification is GNU 4.6.3
-- The CXX compiler identification is GNU 4.4.0
-- Check for working C compiler: C:/bbndk/host_10_1_0_237/win32/x86/usr/bin/CC.exe
-- Check for working C compiler: C:/bbndk/host_10_1_0_237/win32/x86/usr/bin/CC.exe -- broken
-- Configuring incomplete, errors occurred!
CMake Error at c:/deps/CMake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "C:/bbndk/host_10_1_0_237/win32/x86/usr/bin/CC.exe" is not
  able to compile a simple test program.
 
  It fails with the following output:
 
   Change Dir: <path_to_workspace>/Tests/unittests/CMakeFiles/CMakeTmp
 
  
 
  Run Build Command:C:/bbndk/host_10_1_0_237/win32/x86/usr/bin/make.exe
  "cmTryCompileExec658511828/fast"
 
  make.exe[1]: Entering directory
  ` <path_to_workspace>/Tests/unittests/CMakeFiles/CMakeTmp'
 
 
  C:/bbndk/host_10_1_0_237/win32/x86/usr/bin/make.exe -f
  CMakeFiles/cmTryCompileExec658511828.dir/build.make
  CMakeFiles/cmTryCompileExec658511828.dir/build
 
 
  make.exe[2]: Entering directory
  ` <path_to_workspace>/Tests/unittests/CMakeFiles/CMakeTmp'
 
 
  c:/deps/CMake/bin/cmake.exe -E cmake_progress_report
   <path_to_workspace>/Tests/unittests/CMakeFiles/CMakeTmp/CMakeFiles
  1
 
 
  Building C object
  CMakeFiles/cmTryCompileExec658511828.dir/testCCompiler.c.obj
 
  C:/bbndk/host_10_1_0_237/win32/x86/usr/bin/CC.exe -o
  CMakeFiles/cmTryCompileExec658511828.dir/testCCompiler.c.obj -c
   <path_to_workspace>/Tests/unittests/CMakeFiles/CMakeTmp/testCCompiler.c
 
 
 
  Linking C executable cmTryCompileExec658511828.exe
 
  c:/deps/CMake/bin/cmake.exe -E remove -f
  CMakeFiles/cmTryCompileExec658511828.dir/objects.a
 
 
  C:/deps/mingw/bin/ar.exe cr
  CMakeFiles/cmTryCompileExec658511828.dir/objects.a
  @CMakeFiles/cmTryCompileExec658511828.dir/objects1.rsp
 
 
  C:/bbndk/host_10_1_0_237/win32/x86/usr/bin/CC.exe -Wl,--whole-archive
  CMakeFiles/cmTryCompileExec658511828.dir/objects.a -Wl,--no-whole-archive
  -o cmTryCompileExec658511828.exe
  -Wl,--out-implib,libcmTryCompileExec658511828.dll.a
  -Wl,--major-image-version,0,--minor-image-version,
 
 
  C:\bbndk\host_10_1_0_237\win32\x86\usr\bin\ntox86-ld: unrecognized option
  '--out-implib'
 
 
  C:\bbndk\host_10_1_0_237\win32\x86\usr\bin\ntox86-ld: use the --help option
  for usage information
 
 
  cc: C:/bbndk/host_10_1_0_237/win32/x86/usr/bin/ntox86-ld caught signal 1
 
 
  make.exe[2]: *** [cmTryCompileExec658511828.exe] Error 1
 
 
  make.exe[2]: Leaving directory
  ` <path_to_workspace>/Tests/unittests/CMakeFiles/CMakeTmp'
 
 
  make.exe[1]: *** [cmTryCompileExec658511828/fast] Error 2
 
 
  make.exe[1]: Leaving directory
  ` <path_to_workspace>/Tests/unittests/CMakeFiles/CMakeTmp'
 
 
  
 
  
 
  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:72 (PROJECT)
 
 
make: *** [cmake_check_build_system] Error 1
 
09:19:05 Build Finished (took 828ms)
 
Please use plain text.
Contributor
Georgechr
Posts: 42
Registered: ‎06-28-2013
My Device: Z10
My Carrier: None

Re: Momentics unit tests not building

Just to make this above trace clearer: I think the error is somewhere in this chunk:

 C:/bbndk/host_10_1_0_237/win32/x86/usr/bin/CC.exe -Wl,--whole-archive
  CMakeFiles/cmTryCompileExec658511828.dir/objects.a -Wl,--no-whole-archive
  -o cmTryCompileExec658511828.exe
  -Wl,--out-implib,libcmTryCompileExec658511828.dll.a
  -Wl,--major-image-version,0,--minor-image-version,
 
 
  C:\bbndk\host_10_1_0_237\win32\x86\usr\bin\ntox86-ld: unrecognized option
  '--out-implib'
 
 
  C:\bbndk\host_10_1_0_237\win32\x86\usr\bin\ntox86-ld: use the --help option
  for usage information
 
 
  cc: C:/bbndk/host_10_1_0_237/win32/x86/usr/bin/ntox86-ld caught signal 1
 
Something in the make files is trying to run ntox86-ld with parameters --out-implib which are unrecognized.
I have tried different host versions with no success..
 
Anyone tried to run the unit tests before?? I followed the video tutorial but it doesn't seem to build. I've uninstalled and installed everything but no luck!
Please use plain text.