Hi all,

I try to build my program with cmake on Solaris using cc (suncc).
The problem is when activating "-xtarget=ultra -xarch=v9" I get linker errors 
"wrong ELF class: ELFCLASS64".
I created a simple hello world example to reproduce the problem.
It consists of a simple hello-library and a test program that links against 
it. Both should be compiled with the same settings, so I don't understand
why this linker error occurs.
Does cmake configure any 32bit settings that may conflict with xarch=v9 ?

Output:
Scanning dependencies of target helloworld                                      
                                                                             
[100%] Building CXX object test/CMakeFiles/helloworld.dir/main.cpp.o            
                                                                             
"/home/sag/OPC.UA/hello/test/main.cpp", line 1: Warning: Last line in file 
"/home/sag/OPC.UA/hello/hello/hello.h" is not terminated with a newline.        
  
1 Warning(s) detected.                                                          
                                                                             
Linking CXX executable helloworld                                               
                                                                             
ld: fatal: file CMakeFiles/helloworld.dir/main.cpp.o: wrong ELF class: 
ELFCLASS64                                                                      
      
ld: fatal: File processing errors. No output written to helloworld              
                                                                             
*** Error code 1                                                                
                                                                             
The following command caused the error:                                         
                                                                             
cd /home/sag/OPC.UA/hello/build/test && /home/sag/cmake-2.6.2-SunOS-
sparc/bin/cmake -E cmake_link_script CMakeFiles/helloworld.dir/link.txt --
verbose=       
make: Fatal error: Command failed for target `test/helloworld'                  
                                                                             
Current working directory /home/sag/OPC.UA/hello/build                          
                                                                             
*** Error code 1                                                                
                                                                             
The following command caused the error:                                         
                                                                             
make -f test/CMakeFiles/helloworld.dir/build.make 
test/CMakeFiles/helloworld.dir/build                                            
                           
make: Fatal error: Command failed for target 
`test/CMakeFiles/helloworld.dir/all'                                            
                                
Current working directory /home/sag/OPC.UA/hello/build                          
                                                                             
*** Error code 1                                                                
                                                                             
The following command caused the error:                                         
                                                                             
make -f CMakeFiles/Makefile2 all                                                
                                                                             
make: Fatal error: Command failed for target `all'     

-- 
mit freundlichen Grüßen / best regards

Gerhard Gappmeier
ascolab GmbH - automation systems communication laboratory
Tel.: +49 9131 691 123
Fax:  +49 9131 691 128
Web: http://www.ascolab.com
GPG-Key: http://www.ascolab.com/gpg/gg.asc


Attachment: hello.tar.gz
Description: application/compressed-tar

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to