cmake does not find wait.h using the "check_include_files"-statement

Asked by Lazalatin

Ubuntu Version: 15.04
CMake Version: 3.0.2

This specific issue was only caused by finding the (existing) wait.h header file while building a CMakeLists.txt file

Whilst using this statement causes no errors on Arch or Debian Linux, it seems that under Ubuntu existing files are totally ignored.

Using the following checks only caused an error message on wait.h:

Include(CheckIncludeFiles)

...

check_include_files( wait.h HAVE_WAIT_H )
if( NOT HAVE_WAIT_H )
 message( FATAL_ERROR "Did not find wait.h" )
endif()

check_include_files( unistd.h HAVE_UNISTD_H )
if( NOT HAVE_UNISTD_H )
 message( FATAL_ERROR "Did not find unistd.h" )
endif()

While unistd.h is detected, the wait.h header-file is not. (Although it exists in /usr/include)

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: cmake 3.0.2-1ubuntu2
ProcVersionSignature: Ubuntu 3.19.0-21.21-generic 3.19.8
Uname: Linux 3.19.0-21-generic x86_64
ApportVersion: 2.17.2-0ubuntu1.1
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Jun 29 13:44:57 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-02-19 (494 days ago)
InstallationMedia: Ubuntu 12.04.4 LTS "Precise Pangolin" - Release amd64 (20140204)
SourcePackage: cmake
UpgradeStatus: Upgraded to vivid on 2015-06-23 (5 days ago)

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu cmake Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Lazalatin (chris-parnitzke) said :
#1

After working around with several locations where wait.h is present, it seems that this issue is now solved.
It does not matter,

stating check_include_files( sys/wait.h HAVE_WAIT_H )

or check_include_files( wait.h HAVE_WAIT_H )

cmake now detects the files.

Is this magic? Have I done Something wrong?
Suggestions?

Otherwise: Please close this one.

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.