Hard-coded paths in 2.3.7?

z33b0b at gmail.com z33b0b at gmail.com
Fri Oct 23 01:42:25 EDT 2009


Hello GnuCash devs --

I just recently downloaded 2.3.7 form SVN and compiled, and am getting
things set up.  After compiling, I got clever and thought hey, I actually
want this directory over in ~/bin instead of here in ~/dev, but then I
promptly found things breaking after I moved the directory.

First off, creating a symlink to the "gnucash" script in {GnuCash
directory}/bin raises fun errors with gnucash-setup-env not being found.

eirikr at Boreas:~$ gnucash
.: 14: gnucash-setup-env: not found
eirikr at Boreas:~$ ls -l ~/bin/gnucash
lrwxrwxrwx 1 eirikr eirikr 21 2009-10-22 21:31 /home/eirikr/bin/gnucash ->
./GnuCash/bin/gnucash
eirikr at Boreas:~$

What about the following instead as the contents of that initial launch
script, to explicitly check for the base directory from which to run:

#!/bin/sh
if [ -L `which $0` ]
then
        DIR=$(dirname `readlink -f $(which $0)`)
else
        DIR=$(dirname `which $0`)
fi
. $DIR/gnucash-setup-env
exec $DIR/gnucash-bin "$@"

This at least gets the process rolling and seems to successfully run
gnucash-setup-env, but then I get the next failure message:

eirikr at Boreas:~$ gnucash
/home/eirikr/bin/GnuCash/bin/gnucash-bin: error while loading shared
libraries: libgnc-qof.so.1: cannot open shared object file: No such file or
directory
eirikr at Boreas:~$

The libgnc-qof.so.1 file is right where it should be:

eirikr at Boreas:~$ locate libgnc-qof.so.1 | grep "/home/eirikr/bin"
/home/eirikr/bin/GnuCash/lib/libgnc-qof.so.1
/home/eirikr/bin/GnuCash/lib/libgnc-qof.so.1.0.4
eirikr at Boreas:~$

This makes me wonder if a) moving the directory is the issue, or b) having
renamed the directory from "gnucash" to "GnuCash" (to allow me to set a
symlink in the same parent directory with the lower-case name) is the
problem.  I just tried moving / renaming things back to the way they were
when I compiled, and lo, it's working again.  Either way, it starts to sound
a bit like paths are being hardcoded somewhere during compilation.

Is this guess right?  If so, could / should paths be made relative instead
of absolute?


Cheers,

-- Eiríkr Útlendi


More information about the gnucash-devel mailing list