View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014386CMakeCMakepublic2013-09-03 03:362015-01-05 08:38
ReporterTomas Kislan 
Assigned To 
PrioritynormalSeverityblockReproducibilityalways
StatusclosedResolutionfixed 
PlatformUnixOSHP-UXOS VersionB.11.31 ia64
Product VersionCMake 2.8.11.2 
Target VersionCMake 3.0Fixed in VersionCMake 3.0 
Summary0014386: Broken build (proposing fix)
DescriptionLast build version for HP-UX is 2.8.2, which is kinda outdated and I wanted new one.
When building from source, it fails:

clag@migs01a:~/projects/tomas/cmake-2.8.11.2$ aCC --version
aCC: HP C/aC++ B3910B A.06.20 [May 13 2008]
clag@migs01a:~/projects/tomas/cmake-2.8.11.2$ uname -a
HP-UX migs01a B.11.31 U ia64 0841004181 unlimited-user license

"/home/clag/projects/tomas/cmake-2.8.11.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/clag/projects/tomas/cmake-2.8.11.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/clag/projects/tomas/cmake-2.8.11.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];

http://pubs.opengroup.org/onlinepubs/7908799/xsh/systime.h.html [^]
http://kerneldox.com/kdox-linux/d1/d70/structtimestruc__t.html#aa44f56f3d402c81d1403dfe7b385e0e0 [^]

Those are different structs, one has tv_nsec while other have tv_usec

I manage to build it after I changed those 3 lines to:
tstamp.atime.tv_sec = times[0].tv_sec;
tstamp.atime.tv_nsec = times[0].tv_usec * 1000;
tstamp.mtime.tv_sec = times[1].tv_sec;
tstamp.mtime.tv_nsec = times[1].tv_usec * 1000;
tstamp.ctime.tv_sec = times[2].tv_sec;
tstamp.ctime.tv_nsec = times[2].tv_usec * 1000;
TagsNo tags attached.
Attached Filestxt file icon cmake-hp-ux-test.txt [^] (36,154 bytes) 2013-09-03 04:53 [Show Content]

 Relationships
duplicate of 0014027closed CMake fails build on HPUX with standard HP C and make 

  Notes
(0033773)
Tomas Kislan (reporter)
2013-09-03 04:20

pull request here

https://github.com/Kitware/CMake/pull/61 [^]
(0033774)
Rolf Eike Beer (developer)
2013-09-03 04:30

There is a HP-UX machine that submits nightly results to the dashboard (see http://open.cdash.org/viewTest.php?onlypassed&buildid=3017015 [^]). Why isn't the same error showing up there?
(0033776)
Tomas Kislan (reporter)
2013-09-03 06:39
edited on: 2013-09-03 07:03

OS version is different, but that might not be the problem
also can't see what cmake version is that, but latest from github I guess?

aslo I had to set -mt flag for compiler and linker, otherwise it crashed in pthread mutex destructor

Edit:
curl and update tests probably failed because that server is not connected to internet

RPM and ProcessorCount tests, don't know why, because rpm building works on that machine

kwsys and FindPackageTest, I have no idea

(0033778)
Tomas Kislan (reporter)
2013-09-03 10:45

My bad, those first tests weren't against lastest code from git
when I updated and recompiled and run tests again:

96% tests passed, 12 tests failed out of 306

Label Time Summary:
Label1 = 0.16 sec
Label2 = 0.16 sec

Total Test time (real) = 1458.78 sec

The following tests FAILED:
         21 - curl (Failed)
         23 - FindPackageTest (Failed)
         60 - AliasTarget (Failed)
        106 - CPackComponentsForAll-RPM-default (Failed)
        107 - CPackComponentsForAll-RPM-OnePackPerGroup (Failed)
        108 - CPackComponentsForAll-RPM-IgnoreGroup (Failed)
        109 - CPackComponentsForAll-RPM-AllInOne (Failed)
        144 - kwsys (Failed)
        161 - CTestTestUpload (Failed)
        274 - CTestTestMemcheckDummyValgrindInvalidSupFile (Failed)
        297 - CMake.ProcessorCount (Failed)
        306 - CMake.CheckSourceTree (Failed)
(0033863)
Brad King (manager)
2013-09-23 08:53

There are instructions similar to the patch in

 https://github.com/Kitware/CMake/pull/61 [^]

over here:

 http://vouters.dyndns.org/tima/HP-UX-IA64-MySQL-Building_and_Installing_MySQL_on_HP-UX.html [^]

They use the code:

#if defined (__hpux) && defined (__ia64)
        tstamp.atime.tv_sec = atime;
        tstamp.atime.tv_nsec = atime_nsec;
        tstamp.mtime.tv_sec = mtime;
        tstamp.mtime.tv_nsec = mtime_nsec;
        tstamp.ctime.tv_sec = ctime;
        tstamp.ctime.tv_nsec = ctime_nsec;
#else
(original code)
#endif

They tested with "HP C/aC++ B3910B A.06.20 on HP-UX B.11.31 IA64".

The dashboard linked in 0014386:0033774 is compiler version 6.20.0 on HP-UX B.11.23 ia64.

The types of struct attr_timbuf members must have changed between B.11.23 and B.11.31. We cannot accept either patch directly because it will fail on the older HP version. We need to either know what version these changed and how to detect it with #if, or add more try_compile checks to the libarchive CMakeLists.txt file.
(0036149)
Brad King (manager)
2014-06-10 08:48

Fixed here:

 libarchive: fix compilation on newer HP-UX versions
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4189a7f9 [^]
(0037563)
Robert Maynard (manager)
2015-01-05 08:38

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2013-09-03 03:36 Tomas Kislan New Issue
2013-09-03 04:20 Tomas Kislan Note Added: 0033773
2013-09-03 04:30 Rolf Eike Beer Note Added: 0033774
2013-09-03 04:53 Tomas Kislan File Added: cmake-hp-ux-test.txt
2013-09-03 06:39 Tomas Kislan Note Added: 0033776
2013-09-03 07:03 Tomas Kislan Note Edited: 0033776
2013-09-03 10:45 Tomas Kislan Note Added: 0033778
2013-09-23 08:53 Brad King Note Added: 0033863
2013-09-27 09:11 Brad King Relationship added duplicate of 0014027
2014-06-10 08:48 Brad King Note Added: 0036149
2014-06-10 08:48 Brad King Status new => resolved
2014-06-10 08:48 Brad King Resolution open => fixed
2014-06-10 08:48 Brad King Fixed in Version => CMake 3.0
2014-06-10 08:48 Brad King Target Version => CMake 3.0
2015-01-05 08:38 Robert Maynard Note Added: 0037563
2015-01-05 08:38 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team