Bug 61325 - Cmake build fails due to incorrect APR include directory
Summary: Cmake build fails due to incorrect APR include directory
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Build (show other bugs)
Version: 2.4.27
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-21 14:20 UTC by Paul Menzel
Modified: 2017-07-21 14:21 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Menzel 2017-07-21 14:20:55 UTC
Using Cmake to build Apache HTTPD 2.4.27, it fails with the error below.

```
$ cmake -DCMAKE_INSTALL_PREFIX=/project/webmail2/20170721 /dev/shm/bee-webmail/httpd/httpd-2.4.27-0/source
-- The C compiler identification is GNU 5.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found LibXml2: /usr/lib/libxml2.so (found version "2.9.4") 
-- Found Lua51: /usr/lib/liblua.so;/usr/lib/libm.so  
-- Found OpenSSL: /usr/lib/libssl.so (found version "1.0.2j") 
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.5") 
CMake Error at CMakeLists.txt:90 (MESSAGE):
  APR include directory /project/webmail2/20170721/include is not correct.
[…]
```

I believe that’s the wrong path to look at. The `PREFIX` should only matter where to install the built files, and not where headers are to be looked for.

Using Autotools works fine.

```
/dev/shm/bee-webmail/httpd/httpd-2.4.27-0/source/configure --prefix=/project/webmail2/20170721 --bindir=/project/webmail2/20170721/bin --sbindir=/project/webmail2/20170721/sbin --libexecdir=/project/webmail2/20170721/libexec --sysconfdir=/project/webmail2/20170721/etc --sharedstatedir=/project/webmail2/20170721/var --localstatedir=/project/webmail2/20170721/var --libdir=/project/webmail2/20170721/lib --includedir=/project/webmail2/20170721/include --datarootdir=/project/webmail2/20170721/share --datadir=/project/webmail2/20170721/share --infodir=/project/webmail2/20170721/share/info --localedir=/project/webmail2/20170721/share/locale --mandir=/project/webmail2/20170721/share/man --docdir=/project/webmail2/20170721/share/doc/httpd --exec-prefix=/project/webmail2/20170721
[…]
checking for APR version 1.3.0 or later... yes
checking for APR-util version 1.3.0 or later... yes
[…]
```