<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">Hi all,<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>I try to build my program with cmake on Solaris using cc (suncc).<br>
The problem is when activating "-xtarget=ultra -xarch=v9" I get linker errors "wrong ELF class: ELFCLASS64".<br>
I created a simple hello world example to reproduce the problem.<br>
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<br>
why this linker error occurs.<br>
Does cmake configure any 32bit settings that may conflict with xarch=v9 ?<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Output:<br>
Scanning dependencies of target helloworld <br>
[100%] Building CXX object test/CMakeFiles/helloworld.dir/main.cpp.o <br>
"/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. <br>
1 Warning(s) detected. <br>
Linking CXX executable helloworld <br>
ld: fatal: file CMakeFiles/helloworld.dir/main.cpp.o: wrong ELF class: ELFCLASS64 <br>
ld: fatal: File processing errors. No output written to helloworld <br>
*** Error code 1 <br>
The following command caused the error: <br>
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= <br>
make: Fatal error: Command failed for target `test/helloworld' <br>
Current working directory /home/sag/OPC.UA/hello/build <br>
*** Error code 1 <br>
The following command caused the error: <br>
make -f test/CMakeFiles/helloworld.dir/build.make test/CMakeFiles/helloworld.dir/build <br>
make: Fatal error: Command failed for target `test/CMakeFiles/helloworld.dir/all' <br>
Current working directory /home/sag/OPC.UA/hello/build <br>
*** Error code 1 <br>
The following command caused the error: <br>
make -f CMakeFiles/Makefile2 all <br>
make: Fatal error: Command failed for target `all' <br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>-- <br>
mit freundlichen Grüßen / best regards<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Gerhard Gappmeier<br>
ascolab GmbH - automation systems communication laboratory<br>
Tel.: +49 9131 691 123<br>
Fax: +49 9131 691 128<br>
Web: http://www.ascolab.com<br>
GPG-Key: http://www.ascolab.com/gpg/gg.asc<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p></body></html>