"Bradley Arsenault" <[EMAIL PROTECTED]> writes:

> On 4/16/07, Joe Wells <[EMAIL PROTECTED]> wrote:
>> Sorry, this is not my debugging version.  (That version stopped
>> working mysteriously and crashes whenever I try to run it.)
>
> I get this problem if I don't make clean && make the sources after I
> enable debugging.

It turns out the reason why my debugging version wasn't working is
because I had moved the directory to a new location.  strace reveals
glob2 is trying to load these files just before it aborts because it
can't find texts.list.txt:

  open("/home/jbw/.glob2/data/texts.list.txt", O_RDONLY) = -1 ENOENT (No such 
file or directory)
  open("./data/texts.list.txt", O_RDONLY) = -1 ENOENT (No such file or 
directory)
  
open("/mnt/gentoo-portage/jbw/glob-debugging/glob2-0.8.22/share/glob2/data/texts.list.txt",
 O_RDONLY) = -1 ENOENT (No such file or directory)
  open("${datarootdir}/glob2/data/texts.list.txt", O_RDONLY) = -1 ENOENT (No 
such file or directory)
  
open("/home/jbw/Desktop/software/glob-debugging/glob2-0.8.22/data/texts.list.txt",
 O_RDONLY) = -1 ENOENT (No such file or directory)

The last one would have succeeded before I moved the directory.

I'm not sure why it is trying to load
"${datarootdir}/glob2/data/texts.list.txt".  The ${datarootdir} here
should have been replaced at compile-time by a path.

>From the 2nd file it attempts, I figured out I could run it from the
root directory of the unpacked tar file (not from within the “src”
directory).

The moral of the story:

  Don't move your source directory after compiling it if you want to
  reliably run the compiled program sitting in that directory.

-- 
Joe


_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel

Reply via email to