Re: Translator

new topic     » goto parent     » topic index » view thread      » older message » newer message

OK, I've progressed this one a little. I think it does raise some issues.
The message received when I translate is this.
Translating code, pass: 1 2 3 4 5 6 7 8 9 10 11 generating
Couldn't get include directory '/euphoria-4.10-Linux-x64'
I've tracked this down to buildsys.e, lines 465-469 in the source, which calls get_eucompiledir() in c_decl.e, line 132.
The first thing to note is that the error message seems wrong, because the function is not looking for the include directory, it's looking for the compile directory.
The function get_eucompiledir() looks for a compile directory in a number of places and then settles by default on the EUDIR, which is what is appearing in the error message. This raises the question of whether this is the appropriate default. Wouldn't the current directory make more sense for a build?
The file name is then tested by the function file_exists() in std/filesys.e. The trouble is that file_exists() looks for the file using a C library that is opened only by name "libc.so". Unless the library is in the $PATH then it returns a negative, and file_exists() reports that the EUDIR doesn't exist. libc.so is on my system, but the libraries are not in the path environment variable.
It seems odd to create a standard function to determine the existence of a file that depends on the existence in the path of a completely different file, of which the user will have no inkling. At the very least, I'm thinking that file_exists() needs to generate a runtime error to warn the user that it has failed to find the requisite library, not the file the user is testing.
Any thoughts?
PeterR

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu