View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014027 | CMake | Modules | public | 2013-03-18 21:18 | 2015-01-05 08:38 | ||||
Reporter | Bob Bryan | ||||||||
Assigned To | |||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | Unix | OS | HP-UX | OS Version | B.11.31 U ia64 | ||||
Product Version | CMake 2.8.10.2 | ||||||||
Target Version | CMake 3.0 | Fixed in Version | CMake 3.0 | ||||||
Summary | 0014027: 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 0002513 : 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 0002513 : 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 0002513 : 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 | ||||||||
Tags | unix | ||||||||
Attached Files | |||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0032669) Rolf Eike Beer (developer) 2013-03-19 04:19 |
This is an upstream issue in libarchive, so it should be reported (also) there. I don't see where attr_timbuf is defined, but from what it looks like your HP-UX code works on Linux just fine, too. So maybe the intermediate array can just be dropped, I can't see which purpose it serves anyway. |
(0032670) Brad King (manager) 2013-03-19 08:30 |
For reference, we have nightly testing on: Platform: HP-UX B.11.23 U ia64 C compiler: HP 6.20.0 C++ compiler: HP 6.20.0 which currently builds and passes all tests. |
(0032671) Brad King (manager) 2013-03-19 08:32 |
Upstream libarchive is here: https://github.com/libarchive/libarchive [^] Please try building that independently to see if they've resolved this already upstream. |
(0032672) Rolf Eike Beer (developer) 2013-03-19 08:52 |
Bob, maybe your machine has a timeslot to do a CMake nightly? That would make us catch such errors at most one day later. |
(0032676) Bob Bryan (reporter) 2013-03-19 21:08 |
I just ran make with cmake-5dfa624.tar.gz with the same result. Looking into HPUX and Tru64 a little, it appears there was an incompatibility that they worked on with limited success. Tru64 accepts the F_SETTIME argument to fcntl() and they added it to HPUX. The problem is the argument on Tru64 is attr_timbuf which has timeval (sec and usec elements) while HPUX uses timestruc_t with sec and nsec. The code appears to be setting the access, modify and create times of a file that is currently open. I did not follow it into other source modules, however. I don’t know of any way to do that for a file descriptor on HPUX besides fcntl(). I may be able to schedule a build if I could get the current version of the software to the machine. Unfortunately, my company is a big pain with firewalls. If I can get anything going, I’ll let you know. Thanks, /Bob Bryan |
(0036148) Brad King (manager) 2014-06-10 08:47 |
Fixed here: libarchive: fix compilation on newer HP-UX versions http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4189a7f9 [^] |
(0037562) Robert Maynard (manager) 2015-01-05 08:38 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-03-18 21:18 | Bob Bryan | New Issue | |
2013-03-18 21:19 | Bob Bryan | Tag Attached: unix | |
2013-03-19 04:19 | Rolf Eike Beer | Note Added: 0032669 | |
2013-03-19 08:30 | Brad King | Note Added: 0032670 | |
2013-03-19 08:32 | Brad King | Note Added: 0032671 | |
2013-03-19 08:52 | Rolf Eike Beer | Note Added: 0032672 | |
2013-03-19 21:08 | Bob Bryan | Note Added: 0032676 | |
2013-09-27 09:11 | Brad King | Relationship added | has duplicate 0014386 |
2014-06-10 08:47 | Brad King | Note Added: 0036148 | |
2014-06-10 08:47 | Brad King | Status | new => resolved |
2014-06-10 08:47 | Brad King | Resolution | open => fixed |
2014-06-10 08:47 | Brad King | Fixed in Version | => CMake 3.0 |
2014-06-10 08:47 | Brad King | Target Version | => CMake 3.0 |
2015-01-05 08:38 | Robert Maynard | Note Added: 0037562 | |
2015-01-05 08:38 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |