2

I'm trying to get a fresh build of bison to run from a custom install directory specifiied with ./configure --prefix=, but it doesn't seem to be able to find the files it needs to run. Instead of installing to /usr/local/bin, I have installed it to /lots/of/subdirs/usr/local/bin in an effort to isolate the application on a system which will be performing lots of different builds with lots of different build environments.

The problem I am having is that even though bison is installed to /lots/of/subdirs/usr/local/bin, it still seems to look in /usr/local/share for files, even though I would expect it to look in /lots/of/subdirs/usr/local/share, which is where the files were installed to.

The setup process went like this:

./configure --prefix=/lots/of/subdirs
make 
make install

Is there a way to get bison to look in the correct directory for the files it thinks it is missing? If I configure with --prefix, why does it still look in /usr/local/share?

  • 1
    This is dependent on your application, theoretically what you are doing should work, but there are many times prefix is not used by the app as it should be. You may still be able to configure how you want, do a ./configure --help in your application build root to find what is available, look for --datarootdir to see how it is defaulting. Add more specific info to your Q and someone will almost certainly tell you how to fix for your application. – DanSut Oct 15 '15 at 15:59
  • I double checked all of the defaults with ./configure --help, and they were pretty enlightening in that they were exactly what I expected they should be. DATAROOTDIR defaulted to PREFIX/share. What I did not realize is that PREFIX refers to /path/to/files/usr/local where I thought it should be set to /path/to/files and usr/local/ would be appended. Turns out I was then installing bison to /lots/of/subdirs/bin where my path referred to /lots/of/subdirs/usr/local/bin. Problem solved! – JD Reese Oct 15 '15 at 17:29
  • I've taken the liberty to edit your Q a little and put a more appropriate answer as a proper answer, that way it fits the Stack Exchange format better and we can get credit for it rather than have it hang around as an unanswered Q. – DanSut Oct 15 '15 at 19:37
0

You have slightly misunderstood the purpose of --prefix.

If you do not specify then it defaults to /usr/local, so when you do specify a PREFIX it replaces /usr/local, it does not prefix it.

So your app is probably looking for its data in /lots/of/subdirs/share rather than /usr/local/share, not sure why you think it is looking there.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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