[cmake-developers] [CMake 0014027]: CMake fails build on HPUX with standard HP C and make
Mantis Bug Tracker
mantis at public.kitware.com
Mon Mar 18 21:18:15 EDT 2013
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=14027
======================================================================
Reported By: Bob Bryan
Assigned To:
======================================================================
Project: CMake
Issue ID: 14027
Category: Modules
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2013-03-18 21:18 EDT
Last Modified: 2013-03-18 21:18 EDT
======================================================================
Summary: CMake fails build on HPUX with standard HP C and
make
Description:
I just downloaded the latest version of cmake, version 2.8.10.2, and when I went
to build it on my system, I got an error trying to compile:
Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c
When I ran the make, I got:
cd
/home/bryaro2/cmake_test/cmake-2.8.10.2/Utilities/cmlibarchive/libarchive &&
/usr/bin/cc -DCURL_STATICLIB -DHAVE_CONFIG_
H -DLIBARCHIVE_STATIC -D_XOPEN_SOURCE=500 -Aa -Ae -w
-I/home/bryaro2/cmake_test/cmake-2.8.10.2/Utilities/cmlibarchive/libarchive -I/
home/bryaro2/cmake_test/cmake-2.8.10.2/Utilities/cmlibarchive
-I/home/bryaro2/cmake_test/cmake-2.8.10.2/Utilities -I/home/bryaro2/cm
ake_test/cmake-2.8.10.2/Utilities/cmbzip2 -o
CMakeFiles/cmlibarchive.dir/archive_write_disk_posix.c.o -c
/home/bryaro2/cmake_te
st/cmake-2.8.10.2/Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c
"/home/bryaro2/cmake_test/cmake-2.8.10.2/Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c",
line 2058: error http://public.kitware.com/Bug/view.php?id=2513
:
a value of type "struct timeval" cannot be assigned to an entity of
type "timestruc_t"
tstamp.atime = times[0];
^
"/home/bryaro2/cmake_test/cmake-2.8.10.2/Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c",
line 2059: error http://public.kitware.com/Bug/view.php?id=2513
:
a value of type "struct timeval" cannot be assigned to an entity of
type "timestruc_t"
tstamp.mtime = times[1];
^
"/home/bryaro2/cmake_test/cmake-2.8.10.2/Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c",
line 2060: error http://public.kitware.com/Bug/view.php?id=2513
:
a value of type "struct timeval" cannot be assigned to an entity of
type "timestruc_t"
tstamp.ctime = times[2];
^
3 errors detected in the compilation of
"/home/bryaro2/cmake_test/cmake-2.8.10.2/Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c".
*** Error exit code 2
Steps to Reproduce:
For the purposes of testing, I did not have a cmake or a gmake in my path. I am
using the generic C compiler (cc –version gives: “cc: HP C/aC++ B3910B
A.06.25.01 [May 17 2010]”) with /usr/bin/make.
I ran the configure script as follows:
./configure --prefix=$HOME
It went through everything and ended with:
“CMake has bootstrapped. Now run make.”
When I ran make, I got the error included in the description.
Additional Information:
To get it to compile, I modified the routine as follows:
#ifdef F_SETTIMES /* Tru64 */
static int
set_time_tru64(int fd, int mode, const char *name,
time_t atime, long atime_nsec,
time_t mtime, long mtime_nsec,
time_t ctime, long ctime_nsec)
{
struct attr_timbuf tstamp;
#ifdef _HPUX_SOURCE
tstamp.atime.tv_sec = atime;
tstamp.mtime.tv_sec = mtime;
tstamp.ctime.tv_sec = ctime;
tstamp.atime.tv_nsec = atime_nsec;
tstamp.mtime.tv_nsec = mtime_nsec;
tstamp.ctime.tv_nsec = ctime_nsec;
#else
struct timeval times[3];
times[0].tv_sec = atime;
times[0].tv_usec = atime_nsec / 1000;
times[1].tv_sec = mtime;
times[1].tv_usec = mtime_nsec / 1000;
times[2].tv_sec = ctime;
times[2].tv_usec = ctime_nsec / 1000;
tstamp.atime = times[0];
tstamp.mtime = times[1];
tstamp.ctime = times[2];
#endif
return (fcntl(fd,F_SETTIMES,&tstamp));
}
#endif /* Tru64 */
Sorry, I did not study the config code to try to understand why I am getting
what appears to be a Tru64 fcntl() call. Also, fcntl() on HPUX does not allow
SETTIMES unless you are root which I am not. If I try to run fcntl() on HPUX, I
get a “Not owner” error in return.
At this point, I am just trying to get it to compile and put it to use and I
thought I should let you know I encountered a problem.
Thank you for your efforts on a such an excellent product. We use it to compile
our Back End about four times a day. The code about 2400 source modules with
about 4 million lines of C, SQL, Java and a little Cobol around the edges.
Regards,
/Bob Bryan
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2013-03-18 21:18 Bob Bryan New Issue
======================================================================
More information about the cmake-developers
mailing list