Super User is a question and answer site for computer enthusiasts and power users. 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'm installing lenstool on a 11.10 ubuntu computer. I already have installed it on my 12.04 laptop and , although after a lot of struggling, it worked. But this time I am getting a weird error. First I run ./configure and then I should run make. When I do that it runs to some point and then returns a couple of a errors just like this. and of course it doesn't install:

fPIC -w -O3 -fno-automatic -finit-local-zero --fixed-line-length-none -c -o histogram.o histogram.f /bin/bash: fPIC: command not found

make[1]: [histogram.o] Error 127 (ignored)

I'm not sure if it's relevant but on this machine I have gcc 4.6.1 and 4.4.6( I tryed setting both as the default compiler, neither worked ) but on my laptop I have 4.6.3

Thank you


I'm not sure what the problem was but I searched and found the makefile that was returning the error and replaced it with the one that worked on my laptop and it compiled.

share|improve this question
What is lenstool? Please provide a link to the source you're trying to compile here. – gertvdijk Dec 4 '12 at 12:54
up vote 2 down vote accepted

fPIC is a compiler flag, not a command. It looks like the compiler specified in the Makefile does not exist. Often Makefiles will have a line defining the compiler in a variable, e.g.:

CC = gcc

The variable is then called with the compile flags to compile the program, if the variable is unset BASH will try and execute the flag itself:

$CC -fPIC source.c

Will be resolved by BASH to:

-fPIC source.c

Which will give the error you see. Check the definition of the compiler in the Makefile.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .