Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following error when trying to run make command,

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../libcppunit.a when searching for -lcppunit
/usr/bin/ld: skipping incompatible /usr/lib/libcppunit.a when searching for -lcppunit
/usr/bin/ld: cannot find -lcppunit
collect2: error: ld returned 1 exit status
make[1]: *** [cppunit] Error 1

I have installed libcppunit-dev but the problem persists.

I have looked for solutions but no results.

Any idea how to solve it?

1) I am using Ubuntu 12.10 64bits

2) I am running gcc 4.7.2

3) I am trying to compile a program made for a research group. I am sure that it is properly built.

share|improve this question
What's the output of ls /usr/lib | grep lcppunit? – Louis Matthijssen Apr 24 '14 at 7:13
None, returns nothing... :/ However sudo apt-get install libcppunit-dev output is: libcppunit-dev is already the newest version. – john518 Apr 24 '14 at 7:15
have you tried reinstalling libcppunit ? Try sudo apt-get install --reinstall libcppunit-dev – Aserre Apr 24 '14 at 7:36
Yes, I just re-install libcppunit, but the problem persists. – john518 Apr 24 '14 at 7:44
Please edit your question and tell us 1) What version of Ubuntu you are using and whether it is 32 or 64bit; 2) What version of gcc you are running and 3) What you are trying to compile. – terdon Apr 24 '14 at 11:23
up vote 0 down vote accepted

Solution found by OP on question:

Problem solved. The problem was that the Makefile was ready to compile in a 32 bits machines but my computer is 64 bits. So removing "-m32" in Makefile was enough.

share|improve this answer

Your Answer


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.