MantisBT - CMake
View Issue Details
0014788CMake(No Category)public2014-03-06 07:222016-06-10 14:31
Adrien Destugues 
Brad King 
normalminoralways
closedmoved 
x86Haikur1alpha4+pm
 
 
0014788: [patch] Several fixes for Haiku support.
The Haiku operating system has been maintaining custom patches to CMake for a while now. It would be simpler for us if those were merged.

Here is a patch against CMake 3.0.0-rc1: http://bb.haikuports.org/haikuports/raw/7b0678877260253c3b9ed567c4b35e80116308a4/dev-util/cmake/patches/cmake-3.0.0_rc1.patchset [^]

This includes:
- Support slightly different naming and features of the elf.h header on Haiku, to enable use of the rpath tricks
- Detection of command line length limit
- Support for our native HPKG package file format
- Some fixes to the Platform/Haiku.cmake to make it more solid, in particular when using distcc or ccache
- Changes to some modules (SDL libraries, freetype) to not force the include directory to be named "include" (for us, it's "headers").
- The last patch in the patchset (CPU frequency detection) was already applied to KWSys.
No tags attached.
? cmake-3.0.0_rc1.patchset (43,423) 2014-03-06 07:22
https://public.kitware.com/Bug/file/5087/cmake-3.0.0_rc1.patchset
? haiku.patchset-v2 (46,396) 2014-03-06 16:52
https://public.kitware.com/Bug/file/5088/haiku.patchset-v2
? cmake-3.0.0_git.patchset (38,518) 2014-03-21 07:35
https://public.kitware.com/Bug/file/5101/cmake-3.0.0_git.patchset
Issue History
2014-03-06 07:22Adrien DestuguesNew Issue
2014-03-06 07:22Adrien DestuguesFile Added: cmake-3.0.0_rc1.patchset
2014-03-06 10:53Brad KingNote Added: 0035327
2014-03-06 10:53Brad KingAssigned To => Brad King
2014-03-06 10:53Brad KingStatusnew => assigned
2014-03-06 10:53Brad KingTarget Version => CMake 3.1
2014-03-06 15:38Bill HoffmanNote Added: 0035330
2014-03-06 16:04Adrien DestuguesNote Added: 0035331
2014-03-06 16:10Brad KingNote Added: 0035332
2014-03-06 16:52Brad KingFile Added: haiku.patchset-v2
2014-03-06 16:57Brad KingNote Added: 0035333
2014-03-09 10:34Brad KingNote Added: 0035347
2014-03-10 09:45Brad KingNote Added: 0035353
2014-03-10 11:21Adrien DestuguesNote Added: 0035365
2014-03-10 11:28Brad KingNote Added: 0035368
2014-03-10 13:41Brad KingNote Added: 0035377
2014-03-10 15:16Adrien DestuguesNote Added: 0035379
2014-03-21 07:35Adrien DestuguesFile Added: cmake-3.0.0_git.patchset
2014-03-21 07:36Adrien DestuguesNote Added: 0035458
2014-03-21 08:26Brad KingNote Added: 0035459
2014-03-21 10:27Bill HoffmanNote Added: 0035463
2014-03-21 11:10Adrien DestuguesNote Added: 0035466
2014-03-21 13:44Bill HoffmanNote Added: 0035472
2014-03-21 14:06Adrien DestuguesNote Added: 0035474
2014-06-27 12:01Brad KingTarget VersionCMake 3.1 =>
2016-06-10 14:29Kitware RobotNote Added: 0042499
2016-06-10 14:29Kitware RobotStatusassigned => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0035327)
Brad King   
2014-03-06 10:53   
Thanks!

However, these changes are more extensive than a simple bug-fix patch typically submitted through an issue tracker entry. Please read CONTRIBUTING.rst at the top of the source tree, join cmake-developers, and post the patches there split out into logical commits for each piece with appropriate explanations in the commit message.
(0035330)
Bill Hoffman   
2014-03-06 15:38   
In addition, if someone from the Haiku community could run a nightly dashboard for CMake, we could make sure that this does not happen again. It is very easy to setup. Just takes a machine that can run a cronjob.
(0035331)
Adrien Destugues   
2014-03-06 16:04   
Well, the patchset is already split into several commits. I'll submit them separately, if that helps you.

We do have a dashboard, but running Haiku on a server has some problems so far - unstable network, no cron, and not all apps working through ssh. Moreover, it currently has 8 test failures which I don't think are related to the changes I make here. I'll try to make the server run more stable...
(0035332)
Brad King   
2014-03-06 16:10   
Re 0014788:0035331: Oops, I didn't notice there was more than one patch in the file. I will work with that, thanks.
(0035333)
Brad King   
2014-03-06 16:57   
I've revised the patch series a bit to re-organize the commits, tweak a few things, and fix indentation style and whitespace. Please try out the "haiku.patchset-v2" attachment. It is now based on master as of commit 2977330a since that already contains the KWSys change.

I refactored the elf.h patch significantly so please test it thoroughly.

Most of the changes look good. The new Modules/CPackHpkg.cmake file needs to be revised to use the new documentation format introduced in CMake 3.0. The other CPack modules were converted here:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a77e3086 [^]
(0035347)
Brad King   
2014-03-09 10:34   
Re 0014788:0035333: Additionally there have been some sweeping API changes internally to update many "const char*" to "std::string". The Hpkg CPack generator will need to be rebased on master as of 'ad9f0d83' or later.
(0035353)
Brad King   
2014-03-10 09:45   
I've applied the FinSDL, FindFreetype, and Ninja command-line-length patches:

 FindSDL: Make FindSDL_*.cmake path suffixes consistent with main module
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d71db3a0 [^]

 FindFreetype: Add plain 'freetype2' path suffix
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b79a1f67 [^]

 Ninja: Detect command-line length limit on Haiku
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c90f0a6 [^]

For the elf.h and distcc patches I'll wait until you've tested my revised versions. For the CPackHpkg patch I'll wait for you to make the updates requested in 0014788:0035333 and 0014788:0035347.
(0035365)
Adrien Destugues   
2014-03-10 11:21   
Hi,
I have tested your revised patchset against cmake master from git, it doesn't break the build and the testsuite is running as good as before (8 failing tests, which were already there).

I am not sure the test suite is covering the changes completely, so I'll continue testing manually to see if everything goes well.

The distcc fix was changed on our side, as testing revealed a problem in some variants of Haiku. So I have added another patch to fix this: http://bb.haikuports.org/haikuports/commits/3e4d362da5fec484308423dc38d4d6d3d8b04b80 [^]

I will merge this change with the current patch to make things simpler to merge.

Is sending patches against master fine? Or should I base them on the "next" branch?
(0035368)
Brad King   
2014-03-10 11:28   
Re 0014788:0035365: Thanks for working on the revisions. Please send patches against 'master'.
(0035377)
Brad King   
2014-03-10 13:41   
Re 0014788:0035331: We would appreciate a nightly dashboard submission for Haiku if it is at all possible. That way we can keep things building as changes are made. Also some of the 8 test failures you mention may be possible to diagnose from the reported test results so we can fix them.
(0035379)
Adrien Destugues   
2014-03-10 15:16   
Yes, I'm working on setting up the dashboard. The server we wanted to dedicate to this seems to have problems staying up on the network, we are investigating. And we also need to port cron to get it to do the work every night.
(0035458)
Adrien Destugues   
2014-03-21 07:36   
I have updated the patch to merge the latest changes. This seems to be working fine so far.

I still have not updated the HPKG CPack code to the new coding style and documentation system. If that's a problem, you can ignore this part of the patch, and apply only the other two.
(0035459)
Brad King   
2014-03-21 08:26   
Re 0014788:0035458: Thanks. I've applied all but the CPack change:

 Haiku: Enable CMake builtin ELF editor
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=84603d80 [^]

 Haiku: Fix compiler detection when using distcc
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0cc42b87 [^]

The documentation system updates will be required before the HPKG CPack changes will be integrated.
(0035463)
Bill Hoffman   
2014-03-21 10:27   
Hi, I was wondering on the dashboard side of things. Would one of these VM's work: http://virtualboxes.org/images/haiku/ [^] for testing? If so, maybe we could set something up at Kitware.
(0035466)
Adrien Destugues   
2014-03-21 11:10   
These are too old and probably won't work.
You can get up to date VMDK files here: http://www.haiku-files.org/haiku/development/ [^]

We are setting up an Haiku server using Hyper-V, as setting up build bots is a common requirements for many of the ports we are working on (WebKit, Netsurf, and probably more). We have at least two problems:
 - The lack of a cron port to get the cmake build bot running every night. This could be done in some other ways, using a shell script with a loop and sleep, maybe?
 - The network stack in Haiku seems to be unreliable in this configuration, leading to random disconnect of the server internet access. This is our biggest problem with this.
(0035472)
Bill Hoffman   
2014-03-21 13:44   
I wonder if you could just put it in a boot up init script to do the dashboard. Then just have the VM boot once a day as a cronjob on another machine. Or can you ssh into it and run the script that way? Have the cronjob on a linux machine that does ssh haiku rundashboard.sh
(0035474)
Adrien Destugues   
2014-03-21 14:06   
You can put a script to run at boot in ~/config/settings/boot/launch. This is as close as it gets to init scripts.

Ssh is also possible, it needs setting a password for the default user (using passwd). sshd is preinstalled and launched at boot.
(0042499)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.