Euphoria Ticket #505: Command line -i switch not working

I have euphoria svn:4523 installed to /usr/local on Linux. I've updated to svn:4545.

I have the following eu.cfg files set up:

$ cat /etc/euphoria/eu.cfg  
/usr/share/euphoria/include 
 
$ cat /home/matt/.eu.cfg  
-i /usr/local/share/euphoria/include 
-i ~/eu 
 
-batch 
 

EUDIR and EUINC are not set.

I modified cominit.e to define EXTRAS locally to get the interpreted translator to run. I also added a printf() in scanner.e:IncludePush to show which include file was being pushed on the stack to see what files it was using. The command line clearly has "-i /home/matt/eu/rds/include", but the include files from /usr/local are being used instead:

$ make 
make euisource OBJDIR=intobj EBSD= CONFIG=config.gnu EDEBUG= EPROFILE= 
make[1]: Entering directory `/home/matt/eu/rds/source' 
Translating int.ex to create 
rm -f /home/matt/eu/rds/source/build/intobj/{*.c,*.o} 
(cd /home/matt/eu/rds/source/build/intobj;eui -i /home/matt/eu/rds/include   
/home/matt/eu/rds/source/ec.ex -nobuild -i /home/matt/eu/rds/include -gcc     
/home/matt/eu/rds/source/int.ex ) 
IncludePush: /home/matt/eu/rds/source/int.ex 
IncludePush: /home/matt/eu/rds/source/global.e 
IncludePush: /home/matt/eu/rds/source/common.e 
IncludePush: /usr/local/share/euphoria/include/std/os.e 
IncludePush: /usr/local/share/euphoria/include/std/machine.e 
IncludePush: /home/matt/eu/rds/source/common.e 
IncludePush: /usr/local/share/euphoria/include/std/filesys.e 
IncludePush: /usr/local/share/euphoria/include/std/datetime.e 
IncludePush: /usr/local/share/euphoria/include/std/get.e 
IncludePush: /usr/local/share/euphoria/include/std/io.e 
IncludePush: /usr/local/share/euphoria/include/std/text.e 
IncludePush: /usr/local/share/euphoria/include/std/convert.e 
IncludePush: /usr/local/share/euphoria/include/std/text.e 
IncludePush: /usr/local/share/euphoria/include/std/eds.e 
IncludePush: /usr/local/share/euphoria/include/std/math.e 
IncludePush: /usr/local/share/euphoria/include/std/eds.e 
IncludePush: /usr/local/share/euphoria/include/std/text.e 
IncludePush: /usr/local/share/euphoria/include/std/sequence.e 
IncludePush: /usr/local/share/euphoria/include/std/text.e 
IncludePush: /usr/local/share/euphoria/include/std/filesys.e 
IncludePush: /home/matt/eu/rds/source/global.e 
IncludePush: /home/matt/eu/rds/source/fwdref.e 
IncludePush: /home/matt/eu/rds/source/parser.e 
IncludePush: /home/matt/eu/rds/source/emit.e 
IncludePush: /home/matt/eu/rds/source/emit.e 
IncludePush: /home/matt/eu/rds/source/symtab.e 
IncludePush: /home/matt/eu/rds/source/c_out.e 
IncludePush: /home/matt/eu/rds/source/buildsys.e 
IncludePush: /usr/local/share/euphoria/include/std/regex.e 
IncludePush: /usr/local/share/euphoria/include/std/flags.e 
IncludePush: /usr/local/share/euphoria/include/std/map.e 
IncludePush: /home/matt/eu/rds/source/buildsys.e 
IncludePush: /home/matt/eu/rds/source/c_decl.e 
IncludePush: /home/matt/eu/rds/source/compile.e 
IncludePush: /home/matt/eu/rds/source/cominit.e 
IncludePush: /usr/local/share/euphoria/include/std/cmdline.e 
IncludePush: /usr/local/share/euphoria/include/std/console.e 
IncludePush: /home/matt/eu/rds/source/cominit.e 
IncludePush: /home/matt/eu/rds/source/error.e 
IncludePush: /home/matt/eu/rds/source/coverage.e 
IncludePush: /home/matt/eu/rds/source/scanner.e 
IncludePush: /home/matt/eu/rds/source/compile.e 
IncludePush: /home/matt/eu/rds/source/symtab.e 
IncludePush: /home/matt/eu/rds/source/parser.e 
/home/matt/eu/rds/source/intinit.e:88 
<0074>:: Errors resolving the following references: 
    ../../intinit.e (88): EXTRAS 
 
    if length(m:get(opts, cmdline:EXTRAS)) = 0 then 
 

Here is the result of display(option_switches()):

{ 
  "-i", 
  "/usr/share/euphoria/include", 
  "-i", 
  "/usr/local/share/euphoria/include", 
  "-i", 
  "~/eu", 
  "-i", 
  "../rds/include", 
  "-batch" 
} 

The command line switch is coming after the eu.cfg options, and is reflected in the include_paths() result:

{ 
  "/usr/share/euphoria/include/", 
  "/usr/local/share/euphoria/include/", 
  "/home/matt/eu/", 
  "/home/matt/eu/rds/source/../rds/include/", 
  "/home/matt/eu/rds/source", 
  "/usr/local/share/euphoria/include" 
} 

Details

Type: Bug Report Severity: Blocking Category: Front End
Assigned To: mattlewis Status: Fixed Reported Release: 4523
Fixed in SVN #: 4553, 4554 View VCS: 4553, 4554 Milestone: 4.0.0RC2

1. Comment by mattlewis Dec 06, 2010

I think I see the problem. We're not finding the first_extra correctly when it's an absolute path using forward slash. We were looking at it as a short option, but not making sure it really was.

2. Comment by mattlewis Dec 06, 2010

Fixed the detection of the first extra.

Search



Quick Links

User menu

Not signed in.

Misc Menu