[Pkg-cmake-team] Bug#799009: find_library misbehaving with -DPREFIX and GCC 5 and multiarch

Eduard Bloch edi at gmx.de
Mon Sep 14 21:38:47 UTC 2015


Package: cmake
Version: 3.2.2-2+b1
Severity: normal

Hi,

recently I saw something weird in the log and I had to investigate.
Background: I am partial upstream on icewm (the fork version) and
I added a CMake based build system to it a couple of months ago.
IIRC I was using cmake 3.0 or 3.1 at that time.

Later, during the DebConf, the weird effects came up. I didn't notice
first because my travel laptop had an older cmake version but the build
daemons caught it. Here is an example:
https://buildd.debian.org/status/fetch.php?pkg=icewm&arch=powerpc&ver=1.3.8%2Bgithubmod%2B20150818%2Bad97152-1&stamp=1439893905

Two things are wrong there:
 - the compiler identification reports crap
 - find_library check fails on libSM and libICE
 
Both libs are in the multiarch lib directory... I discovered this by
looking at strace output, only the regular lib directories were
searched. This gave me a clue that it's somehow path/variables related
and by removing the command arguments, I identified -DPREFIX as the
culprit.

I also found out that 
export CXX=g++-4.9 CC=gcc-4.9
makes the problem go away, so this might be GCC5 related. On the other
hand, I modified the upstream source now to use another name instead of
PREFIX and it also makes the problem disappear.

(after some pondering, I decided to use the "popular" one, CMAKE_INSTALL_PREFIX)

Hope that were enough clues for reproduction and fixing.

Regards,
Eduard.

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.2.0+ (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: sysvinit (via /sbin/init)

Versions of packages cmake depends on:
ii  cmake-data     3.2.2-2
ii  dpkg           1.18.2
ii  libarchive13   3.1.2-11+b1
ii  libc6          2.19-19
ii  libcurl3       7.44.0-1
ii  libexpat1      2.1.0-7
ii  libgcc1        1:5.2.1-16
ii  libjsoncpp0v5  0.10.5-1
ii  libstdc++6     5.2.1-16
ii  procps         2:3.3.10-4
ii  zlib1g         1:1.2.8.dfsg-2+b1

Versions of packages cmake recommends:
ii  gcc   4:5.2.1-4
ii  make  4.0-8.2

Versions of packages cmake suggests:
pn  codeblocks   <none>
pn  eclipse      <none>
pn  ninja-build  <none>

-- no debconf information

-- 
<amq> Joey: ich häng schon am Manual.
<RvB> amq: Naja, du musst halt nicht nur dranhängen sondern auch lesen.



More information about the Pkg-cmake-team mailing list