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

William A. Hoffman billlist at nycap.rr.com
Wed Jun 28 17:05:07 EDT 2006


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/Bootstrap.cmk/cmake -E cmake_progress_report /mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8-aCC/cmake-ia64/CMakeFiles/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/CMakeFiles/CMakeTmp/src.c
"/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8-aCC/cmake-ia64/CMakeFiles/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