[cmake-developers] [CMake 0014725]: shared library is mistaken for an executable by is_file_executable

Mantis Bug Tracker mantis at public.kitware.com
Fri Jan 31 15:10:36 EST 2014


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=14725 
====================================================================== 
Reported By:                Bastian Angermann
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14725
Category:                   CPack
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-01-31 15:10 EST
Last Modified:              2014-01-31 15:10 EST
====================================================================== 
Summary:                    shared library is mistaken for an executable by
is_file_executable
Description: 
Running fixup_bundle on an executable the depends on libQtCore.so.4 will fail,
since libQtCore.so.4 is mistaken for an position independent executable by
is_file_executable. The culprit is the following test in GetPrerequisits.cmake:
if("${file_ov}" MATCHES "shared object.*\(uses shared libs\)")
which is not specific enough.



Steps to Reproduce: 
Run
> file libQtCore.so.4
libQtCore.so.4: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV),
dynamically linked (uses shared libs),
BuildID[sha1]=0x46033c4f1e9e6221817fd9eb4d9ce3fdd7c40791, stripped

The output matched the pattern tested for, even though this is a shared library.
A PIE compiled on the same system yields:
> gcc -fPIE test.cpp
> file a.out 
a.out: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked
(uses shared libs), for GNU/Linux 2.6.24,
BuildID[sha1]=0x7a9ef65567c34d0e38a911c4e29273df9eb34f79, not stripped



Additional Information: 
The system is question is a Ubuntu 13.10, with the vendor supplied g++. The Qt
library in question is not the system Qt, it is compiled from the official Qt
4.8.5 sources.

> g++ --version
g++ (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

> ld --version
GNU ld (GNU Binutils for Ubuntu) 2.23.2
Copyright 2012 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-01-31 15:10 Bastian AngermannNew Issue                                    
======================================================================



More information about the cmake-developers mailing list