goulgold / gflags

Automatically exported from code.google.com/p/gflags
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Incorrect makefile generation with cmake #86

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
0. cmake version 2.8.8
1. cmake -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_CXX_FLAGS=-fPIC 
-DCMAKE_INSTALL_PREFIX:PATH=/home/user/local ..
2. make all -j 4

What is the expected output? What do you see instead?
I expect a functional Makefile but when I was building the library I got the 
following error:
c++: error: SONAME_FLAGlibgflags.so: No such file or directory 

What version of the product are you using? On what operating system?
gflags 2.1.1 on Ubuntu 12.04LTS and Redhat 6.2

Please provide any additional information below.
It's a weird issue because I have compiled the library before without any 
problem. I would like to know if a) it is reproducible and b) it is a real 
bug?. I solve it editing the following files:
CMakeFiles/gflags-shared.dir/link.txt
CMakeFiles/gflags_nothreads-shared.dir/link.txt
CMakeFiles/gflags-shared.dir/relink.txt

I noted that these files were incorrectly generated by cmake. I replaced the 
prefix "SONAME_FLAG" from libgflags.so by "-shared -Wl,-soname," in all these 
files.

Original issue reported on code.google.com by escorc...@gmail.com on 2 Aug 2014 at 8:43

GoogleCodeExporter commented 9 years ago
Hi, sorry for the delay in responding. It seems that the issue is caused by 
some CMake modules in gflags that I had copied from the master branch (commit 
SHA 34a49dea) of the CMake repository. See also this issue report at the CMake 
bug tracker: http://public.kitware.com/Bug/view.php?id=13884

The SONAME_FLAG was according to the comments introduced in CMake 2.8.9.

Original comment by andreas....@gmail.com on 9 Nov 2014 at 8:57