[CMake] Compile/install on HPUX on ia64 (Itanium)

David Akdikmen dakdikmen at accusoft.com
Thu Jun 29 11:16:08 EDT 2006


Hi,

What version of the compiler you got?  I'm getting all sorts of problems
now trying to build ITK with the cmake I made from the CVS tree.  My new
Itanium has been commandeered as the new Sub-version server and this old
box I'm using has HP ANSI C Version A.05.50 [September 03].  Notice that
there are 4 newer versions available from HP, A.05.55, A.05.60, A.06.05,
and A.06.10. 

I have general question on how cmake works, does it take the compiler
and options you specify in the CMakeCache.txt file and test to see if
various headers and feature exist with that compiler/options or does it
look when it was being created?  Or does it just look for the header
files?  Or some mixture of some "built-in settings" and others tested?

I tried setting the "-AP" compiler option in the CMakeCache.txt, which
disables <iostream> and re-enables <iostream.h>, but the configurations
still says it detected support for the new style IO streams?

-David
-----Original Message-----
From: William A. Hoffman [mailto:billlist at nycap.rr.com] 
Sent: Wednesday, June 28, 2006 5:05 PM
To: David Akdikmen; Brad King
Cc: cmake at cmake.org
Subject: RE: [CMake] Compile/install on HPUX on ia64 (Itanium)

My HP does this:


Performing C SOURCE FILE Test ATTR_UNUSED_VAR succeded with the
following output:
gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.
dir/build
gmake[1]: Entering directory
`/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8
-aCC/cmake-ia64/CMakeFiles/CMakeTmp'
/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8-aCC/cmake-ia64/Bootst
rap.cmk/cmake -E cmake_progress_report
/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8-aCC/cmake-ia64/CMakeF
iles/CMakeTmp/CMakeFiles 100
Building C object CMakeFiles/cmTryCompileExec.dir/src.o
/usr/bin/cc  -Aa -Ae     -o CMakeFiles/cmTryCompileExec.dir/src.o   -c
/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8-aCC/cmake-ia64/CMakeF
iles/CMakeTmp/src.c
"/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8-aCC/cmake-ia64/CMake
Files/CMakeTmp/src.c", line 6: warning #2001-D: last line of file ends
without a newline
  int main() { int x __attribute__((__unused__)) ; return 0; }
                                                              ^

The problem seems to be that the file should have a newline on it. 
We have checked in a change to the source to put the newline in the
file.

-Bill


At 04:37 PM 6/28/2006, David Akdikmen wrote:
>Odd, I'm not sure what's going on.  When I cc the file at the command
>prompt, it doesn't complain about the __attribute__ symbols. It looks
>like it is complaining about not having a LF at the end of the file?
>
>It looks like it thinks __attribute__ is just some function returning
>int?
>
>Does your version of the HPUX compiler have __attribute__ defined?
What
>happens on your machine for the ATTR_UNUSED_VAR test?
>
>I'll include both the results, one with "+p" and one without "+p"
>
>I unset the "+p" flag and re-ran the configure (after deleting all the
>CMakeCache.txt files)
>
>Here is the CMakeOutput.log (it claims success with out the +p)
>--------------------------------------------
>Performing C SOURCE FILE Test ATTR_UNUSED_VAR succeded with the
>following output:
>        make -f CMakeFiles/cmTryCompileExec.dir/build.make
>CMakeFiles/cmTryCompileExec.dir/build
>Building C object CMakeFiles/cmTryCompileExec.dir/src.o
>        /usr/bin/cc  -Aa -Ae     -o
>CMakeFiles/cmTryCompileExec.dir/src.o   -c
>/home/khoros/cmake-2.4.2/CMakeFiles/CMakeTmp/src.c
>Error (future) 690:
>"/home/khoros/cmake-2.4.2/CMakeFiles/CMakeTmp/src.c", line 6 # Nonempty
>source files must end with a newline that is not preceded by a
>backslash.
>Warning:        1 future errors were detected and ignored. Add a '+p'
>option to detect and fix them before they become fatal errors in a
>future release. Behavior of this ill-formed program is not guaranteed
to
>match that of a well-formed program
>Linking C executable cmTryCompileExec
>        /home/khoros/cmake-2.4.2/Bootstrap.cmk/cmake -P
>CMakeFiles/cmTryCompileExec.dir/cmake_clean_target.cmake
>        /usr/bin/cc     -Aa -Ae    +Z
>"CMakeFiles/cmTryCompileExec.dir/src.o"   -o cmTryCompileExec -Wl,+s
>-Wl,-E
>
>Source file was:
>#include <stdio.h>
>#include <stdarg.h>
>#include <sys/ioctl.h>
>#include <wchar.h>
>
>int main() { int x __attribute__((__unused__)) ; return 0; }
>APPEND-------------------------------
>
>Here is the CMakeError.log when +p is added to the CFLAG.
>--------------------------------------------
>Performing C SOURCE FILE Test ATTR_UNUSED_VAR failed with the following
>output:
>        make -f CMakeFiles/cmTryCompileExec.dir/build.make
>CMakeFiles/cmTryCompi
>leExec.dir/build
>Building C object CMakeFiles/cmTryCompileExec.dir/src.o
>        /usr/bin/cc  +p  -Aa -Ae     -o
>CMakeFiles/cmTryCompileExec.dir/src.o
>-c /home/khoros/cmake-2.4.2/CMakeFiles/CMakeTmp/src.c
>Error 690: "/home/khoros/cmake-2.4.2/CMakeFiles/CMakeTmp/src.c", line 6
># Nonempty source files must end with a newline that is not preceded by
>a backslash.
>*** Error exit code 2
>
>Stop.
>*** Error exit code 1
>
>Stop.
>
>Source file was:
>#include <stdio.h>
>#include <stdarg.h>
>#include <sys/ioctl.h>
>#include <wchar.h>
>
>int main() { int x __attribute__((__unused__)) ; return 0; }
>APPEND----------------------------------------------------------
>
>-----Original Message-----
>From: Brad King [mailto:brad.king at kitware.com] 
>Sent: Wednesday, June 28, 2006 3:19 PM
>To: David Akdikmen
>Cc: cmake at cmake.org; William A. Hoffman
>Subject: Re: [CMake] Compile/install on HPUX on ia64 (Itanium)
>
>David Akdikmen wrote:
>> Success with latest from CVS!!! Both make and make install seems to
>> work, Thanks,
>
>Great.
>
>> I added the option by setting the environment variables before
running
>> configure.
>> 
>> (At the bash prompt before running configure)
>> 
>> export CFLAGS="+p"
>> export CXXFLAGS="+p"
>
>What was the original output in the log file that told you that this 
>option is needed?  Can you compile the source
>
>------ t1.c -------------
>int main() { return 0; }
>-------------------------
>
>with just
>
>cc +p t1.c
>
>using the C compiler?  What about the C++ compiler (rename to t1.cxx)?
>
>> BTW: I had to delete the whole directory in order to run configure
>> again, otherwise it would pick up the old results.
>
>Actually you just had to remove CMakeCache.txt where the results are
>stored.
>
>-Brad
>_______________________________________________
>CMake mailing list
>CMake at cmake.org
>http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list