Hi all,
For the longest time I've had this problem and even though I've used
Linux for over 5 years, I never bothered figuring this out until now. So
it may sound kinda pathetic that I still don't know the solution to this
sort of a trivial problem, but here it goes anyhow:
Let's say I install an app from sources and the binary built depends at
runtime on some stuff found in the subdirs of the source package. So,
when I execute binary by doing ./binary-name inside its original dir
(where it was built), it works like a charm, but if I move the whole
install dir (with sources) to let's say /usr/local/ and then do
ln -s /usr/local/appname/binary /usr/local/bin/binary
(thus creating a soft link into a bin dir that's in my path)
the binary fails because the app now cannot find the needed subdirs any
more. Now, this is obviously not the case with the apps that have good
"make install" routines, but for some odd reason there is quite a number
of apps which when built simply give out this kind of a problem.
The apps that do exhibit this kind of issue are usually built by a
simple
./configure
make
make install (if available -- usually not)
So, my question is how do I make the binary aware where its stuff lies
if its config script ~/.config-file does not reveal such settings, and
if I don't want to put app's dir into my path which to me seems a bit
clumsy? In another words, how can I link it to a bin dir and still have
it work as it is supposed to (i.e. to be aware of what Windows refers to
being app's "working dir"?
Any help on this matter is greatly appreciated! Sincerely,
Ico