Linux Path Resolution Bug

Post bugreports for the Linux version here
swhite
Enthusiast
Enthusiast
Posts: 727
Joined: Thu May 21, 2009 6:56 pm

Linux Path Resolution Bug

Post by swhite »

Hi

I discovered the following bug in Purebasic. If you use for example the OpenLibrary() function the way the Chilkat library does then everything works from the PureBasic IDE but does not work from the terminal or file manager. Thus running a linux daemon with Chilkat produces a segmentation fault.

The following code works in the PB IDE assuming the Chilkat Library is in the same folder as the PB code but not from a linux terminal or file manager.

Code: Select all

OpenLibrary(#PB_Any, "libchilkatPb-9_5_0.so")
In order for the executable to work from the terminal or as a daemon the following change is required assuming that the linux executable and the Chilkat Shared Objects are in the same folder. However, this format does not work in the PB IDE.

Code: Select all

OpenLibrary(#PB_Any, "./libchilkatPb-9_5_0.so")
The reason for the segmentation fault is that the OpenLibrary command fails from the terminal because of the missing "./". However if I add the missing "./" to the Chilkat library then "Compile with or without the debugger" fails in the PB IDE.

So there is an inconsistency between how the Purebasic IDE handles file paths and the way Linux handles the file paths.

Simon
Simon White
dCipher Computing