Bug #1518

Build failure on Ubuntu with static version of fftw3 library

Added by pospelov over 4 years ago. Updated 4 months ago.

Status:RejectedStart date:18 Jul 2016
Priority:LowDue date:
Assignee:-% Done:


Target version:-


Found the Linux with fftw3 installed twice:

  • in normal way via the package manager in /usr/lib, shared version of the library.
  • In /usr/local/fftw3.a, i.e. static version of fftw3 library, probably as some prehistorical remnants.

Our 'cmake' machinery finds static version, and then 'make' fails because of the missed -fPIC compiler key.

[Note: We had in the past similar case with static Python installed in the system. Our cmake was able to distinguish it, and then was adding -fPIC keys automatically (thanks to BornAgainMacros file which is gone by now).]

  • Easiest minimal action would be to force 'cmake' to fail, if static fftw3 found.
    • May be introduce description in Troubleshooting, explaining the case. Very likely -DCMAKE_PREFIX_PATH=/usr would fix the problem.


  • we can repeat a trick with fftw3.a determination and adding -fPIC key
    • But then, very likely, it would lead to mixing fftw3 library and headers from different installations.


#1 Updated by wuttke over 4 years ago

  • Parent task set to #418

#2 Updated by wuttke over 4 years ago

  • Parent task changed from #418 to #1602

#3 Updated by wuttke over 4 years ago

  • Description updated (diff)

#4 Updated by wuttke over 4 years ago

  • Status changed from Backlog to Rejected

Searching /usr/local/lib before /usr/lib is intentional, and adequate: it gives the local admin the chance to overrule the distribution.

Inevitably then, the build will fail if /usr/local/lib contains broken "prehistorical remnants". We should live with that, and not attempt to catch all possible problems of this kind.

#5 Updated by wuttke 4 months ago

  • Parent task deleted (#1602)

Also available in: Atom PDF