Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The libgtest-dev package seems only install header files to the system, but not the static and dynamic libraries which should be installed under /usr/lib.

Is it a bug?

share|improve this question

3 Answers 3

up vote 26 down vote accepted

Is it a bug?

No, it's deliberate:

gtest (1.6.0-1ubuntu2) precise; urgency=low

  * Stop distributing static library (although still build it, to ensure gtest
    works).  Upstream recommends against shipping the libary at all, just the
    source. (See: http://code.google.com/p/googletest/wiki/FAQ)
    The Debian maintainer plans to do this also (see BTS: 639795); do it in
    Ubuntu now to fulfil MIR requirements.

To build static libraries

cd /usr/src/gtest
sudo cmake .
sudo make
sudo mv libg* /usr/lib/
share|improve this answer
    
Thanks! I've built the libraries in this way. Just thought that it might not be an official approach for a .deb package. –  eddyxu Jun 3 '12 at 14:20
    
The Google works in mysterious ways! :) Glad it helped. –  izx Jun 3 '12 at 14:23
    
I'd rather create a temporary directory for building, and not pollute /usr/src/ with binaries. –  Marco Leogrande Oct 16 '12 at 22:39
    
Copy-paste version: cd /usr/src/gtest && sudo cmake . && sudo make && sudo mv libg* /usr/lib/ && cd - –  exic Jan 16 '13 at 16:05
1  
Actually reason described here can be applied to any library. For example if boost is linked with libstdc++ and you want to use libc++ you need to recompile boost from sources. So it's strange, IMHO –  ruslo Oct 23 '13 at 7:51

Improving on izx's answer I would have used cmake this way:

sudo cmake -DCMAKE_BUILD_TYPE=RELEASE .

and I would attempt an out-of-source build:

cd /tmp
mkdir .build
cd .build
cmake -DCMAKE_BUILD_TYPE=RELEASE /usr/src/gtest/
make
sudo mv libg* /usr/lib/
share|improve this answer

It should be a dependency bug , libgtest should be installed along with libgtest-dev.

Can you try apt-get install -y libgtest first ?

Also remember to submit a bug report on ubuntu.

share|improve this answer
2  
libgtest doesn't exist anymore, see my answer :( –  izx Jun 3 '12 at 13:06
    
@izx oh , okay , i'm just guessing from the package name –  warl0ck Jun 3 '12 at 13:07
    
np, I tried that too ;) @warl0ck –  izx Jun 3 '12 at 13:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.