1. Obsolete EUDIR!

Forked from Re: Building eu40.4 question

SDPringle said...

For various things to work EUDIR must be set appropriately.

Yes, but the issue in the previous thread isn't one of them.

SDPringle said...

Although there is a eudir switch in configure to work around this problem. This is a kind of 'wont fix' bug in the Installer. This is the way the admins wanted it. I say, set your EUDIR variable post install. It will easy a lot of problems.

The environment variable EUDIR has been obsolete for a long time now. Can you enumerate the problems that EUDIR works around, so they can acutally get fixed?

new topic     » topic index » view message » categorize

2. Re: Obsolete EUDIR!

SDPringle said...

For various things to work EUDIR must be set appropriately.

Can you name some examples? I never have one set any more (and given that I often run different versions from different locations on my system, not having to worry about it makes life a lot easier) and I don't have any problems.

In fact, I was recently having a problem running unit tests. The t_eutest.e test would hang when the EUDIR was set (as it is when running from the makefile). I haven't figured out what the problem was. But not setting EUDIR (or setting it to some random text) allowed everything to run correctly.

Matt

new topic     » goto parent     » topic index » view message » categorize

3. Re: Obsolete EUDIR!

If you don't install to one of the hard coded directory locations, you don't use the eudir option with configure, and you don't set EUDIR, the build wont work with Watcom. I've just tried it, prompted by the post I saw. I don't have time to enumerate all of the problems. I set EUDIR appropriately. The debate is over, those who voted against setting EUDIR in the installer can do the enumerating.

Shawn

new topic     » goto parent     » topic index » view message » categorize

4. Re: Obsolete EUDIR!

SDPringle said...

If you don't install to one of the hard coded directory locations, you don't use the eudir option with configure, and you don't set EUDIR, the build wont work with Watcom. I've just tried it, prompted by the post I saw. I don't have time to enumerate all of the problems.

You can't even copy&paste the output????

SDPringle said...

I set EUDIR appropriately. The debate is over, those who voted against setting EUDIR in the installer can do the enumerating.

Can you quote or provide a link to where you voted to keep EUDIR?

new topic     » goto parent     » topic index » view message » categorize

5. Re: Obsolete EUDIR!

SDPringle said...

For various things to work EUDIR must be set appropriately.

I don't have EUDIR set either and I'm not having any problems. What am I doing wrong?

new topic     » goto parent     » topic index » view message » categorize

6. Re: Obsolete EUDIR!

SDPringle said...

If you don't install to one of the hard coded directory locations, you don't use the eudir option with configure, and you don't set EUDIR, the build wont work with Watcom. I've just tried it, prompted by the post I saw. I don't have time to enumerate all of the problems. I set EUDIR appropriately. The debate is over, those who voted against setting EUDIR in the installer can do the enumerating.

I've never had this problem. I agree that the debate is over, because EUDIR has been replaced by something much better, flexible, and easier to deal with. Here is an enumeration of The Things I Need EUDIR For:

  • Nothing

Matt

new topic     » goto parent     » topic index » view message » categorize

7. Re: Obsolete EUDIR!

Okay here is my environment setup:

C:\Users\Shawn>echo %EUDIR% 
C:\Program Files\Euphoria\4.0.5 
 
C:\Users\Shawn> 
 
C:\Users\Shawn>echo %E0T% 
c:\Users\Shawn\Documents\development\hg\4.0 
 
C:\Users\Shawn> 

C:\Users\Shawn>cd %E0T%\source 
 
c:\Users\Shawn\Documents\development\hg\4.0\source> 

I can make all with this setup using Watcom make. I have to use the MINGW shell to make with MINGW gcc. I assume this is normal.

Now, I'll do:

 
c:\Users\Shawn\Documents\development\hg\4.0\source>copy config.wat standard.wat 
        1 file(s) copied. 
 
c:\Users\Shawn\Documents\development\hg\4.0\source>set EUDIR= 
 
c:\Users\Shawn\Documents\development\hg\4.0\source>configure --build ..\build\noEUDIR 
        1 file(s) copied. 
        1 file(s) copied. 
        1 file(s) copied. 
        1 file(s) copied. 
Build directory is ..\build\noEUDIR 
c:\Users\Shawn\Documents\development\hg\4.0\source>wmake source 

One of the errors I receive is:

Error(E14): Cannot execute ("C:\euphoria\bin\eui.exe"): No such file or directory 

The Makefile makes a guess and if all of you are installing to C:\EUPHORIA, then everything will be fine. But the installer allows the user to choose to install to any location.

c:\Users\Shawn\Documents\development\hg\4.0\source>hg sta 
? bin\echoversion.exe 
? bin\mkver.exe 
? source\eu.cfg 
? source\standard.wat 
? tests\ctc.log 
? tests\exported_from_memory.txt 
? tests\exported_from_safe.txt 
? tests\publicized_from_memory.txt 
? tests\publicized_from_safe.txt 
? tests\serialize.dat 
? tests\t_declasgn_wrning-bound.exe 
? tests\t_hash-bound.exe 
? tests\t_override-bound.exe 
? tests\t_rand-bound.exe 
? tests\unittest.log 
 
c:\Users\Shawn\Documents\development\hg\4.0\source>hg summary 
parent: 5741:362497032f33 tip 
 * updated release date in ../4.0.5.txt and the debian change log to October 19th. 
branch: 4.0 
commit: 15 unknown (clean) 
update: (current) 

Now, using the MINGW bash shell:

$ echo $EUDIR 
C:\Program Files\Euphoria\4.0.5 
 
Shawn@Joy-PC /home/shawn/Documents/development/hg/4.0/source 
$ unset EUDIR 
 
Shawn@Joy-PC /home/shawn/Documents/development/hg/4.0/source 
$ echo $EUDIR 
 
 
Shawn@Joy-PC /home/shawn/Documents/development/hg/4.0/source 
$ configure --build ../build/noEUDIR 
Configuring to build for target: WINDOWS / default platform 
Writing eu.cfg to C:/Users/Shawn/Documents/development/hg/4.0/build/noEUDIR/eu.cfg 
 
Shawn@Joy-PC /home/shawn/Documents/development/hg/4.0/source 
$ make source 

This results in code translating and compiling without any problem apparently. So, what is different? The Watcom makefiles try to use EUDIR and if it cannot find it, it assumes C:\EUPHORIA. Look also at Makefile.wat in the creole distribution. It also uses EUDIR. Any thing designed in the 3.1 era including our Makefiles use EUDIR.

There is code in EUPHORIA for guessing certain paths. So, if you really want to see how robust this is, remove EUPHORIA from the paths found in source/common.e, and install to something not listed there.

new topic     » goto parent     » topic index » view message » categorize

8. Re: Obsolete EUDIR!

SDPringle said...

One of the errors I receive is:

Error(E14): Cannot execute ("C:\euphoria\bin\eui.exe"): No such file or directory 

The Makefile makes a guess and if all of you are installing to C:\EUPHORIA, then everything will be fine. But the installer allows the user to choose to install to any location.

...

This results in code translating and compiling without any problem apparently. So, what is different? The Watcom makefiles try to use EUDIR and if it cannot find it, it assumes C:\EUPHORIA. Look also at Makefile.wat in the creole distribution. It also uses EUDIR. Any thing designed in the 3.1 era including our Makefiles use EUDIR.

There is code in EUPHORIA for guessing certain paths. So, if you really want to see how robust this is, remove EUPHORIA from the paths found in source/common.e, and install to something not listed there.

Sort of. The root problem is that the Watcom build process really wants to use an absolute path to wherever the eubin directory is. If there isn't one specified, then it looks at EUDIR. All you need to do in this case is to add the correct eubin option when you configure.

Though really, I'm not sure why we require that in any case. We should simply rely on the PATH to give us a valid euphoria interpreter, like we do with the GNU build process. Lack of EUDIR is just exposing this issue.

Matt

new topic     » goto parent     » topic index » view message » categorize

9. Re: Obsolete EUDIR!

mattlewis said...

Though really, I'm not sure why we require that in any case. We should simply rely on the PATH to give us a valid euphoria interpreter, like we do with the GNU build process. Lack of EUDIR is just exposing this issue.

Matt

So we do have a real bug!

new topic     » goto parent     » topic index » view message » categorize

10. Re: Obsolete EUDIR!

I use RU 4 with win32lib and Judith's IDE. When I use it from a thumb drive on a foreign computer I find EUDIR quite handy. I hope we keep it. Most programs I've written in EU are portable. In fact most will also work on Linux with the wine loader. The wine loader doesn't support the calendar widget.

new topic     » goto parent     » topic index » view message » categorize

11. Re: Obsolete EUDIR!

FredRansom said...

...I find EUDIR quite handy. I hope we keep it. Most programs I've written in EU are portable. In fact most will also work on Linux with the wine loader...

I agree. It strikes me as rash to suddenly drop EUDIR. However; if it is dropped, then some function like this added to std filesys.e would be helpful:

include std/os.e                                                                                               
include std/filesys.e                                                                                          
                                                                                                               
--  get EUDIR from path to "eui", thanks to SDPRINGLE:                                                  
sequence eui                                                                                                   
ifdef WINDOWS then                                                                                             
    eui = "eui.exe"                                                                                            
elsedef                                                                                                        
    eui = "eui"                                                                                                
end ifdef                                                                                                      
                                                                                                               
public function eudir()                                                                                        
sequence eudirectory                                                                                           
    eudirectory = locate_file( eui, getenv("PATH") )                                                           
    eudirectory = eudirectory[1..length(eudirectory)-length(eui)-4]                                            
return eudirectory                                                                                             
end function                                                                                                   
public constant EUDIR = eudir() 
new topic     » goto parent     » topic index » view message » categorize

12. Re: Obsolete EUDIR!

K_D_R said...
FredRansom said...

...I find EUDIR quite handy. I hope we keep it. Most programs I've written in EU are portable. In fact most will also work on Linux with the wine loader...

I agree. It strikes me as rash to suddenly drop EUDIR. However; if it is dropped, then some function like this added to std filesys.e would be helpful:

I find EUDIR to be the opposite of useful. I suppose that on Windows, where everything is installed to a bundled directory, it can be useful. In a unix-like environment, however, the whole concept of what EUDIR means necessarily changes.

But I still find environment variables to be more troublesome than configuration files or command line arguments. For one thing, it doesn't support multiple installations of euphoria. Or an installed version and a development version working on the same machine. I have several working versions of euphoria. If I relied on EUDIR, it would be a lot more complicated and difficult to setup and maintain.

And I still say that if you're using EUDIR, you're doing it wrong and making your life more difficult.

Matt

new topic     » goto parent     » topic index » view message » categorize

13. Re: Obsolete EUDIR!

In 4.0 (and 4.1), there is a routine called include_paths() for finding where the include files are stored. One can use locate_file with getenv to find out where the interpreter and other binaries are.

Shawn Pringle

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu