bugGNU Octave - Bugs: bug #41024, 3.8.0 build fails with syntax...

 
 

bug #41024: 3.8.0 build fails with syntax error near unexpected token `('

Submitted by:  None
Submitted on:  Sun 29 Dec 2013 01:52:02 AM UTC  
 
Category: Configuration and Build SystemSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Build Failure
Status: FixedAssigned to: None
Originator Name: pen7cmcOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.8.0
Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 14 Jan 2014 08:40:18 PM UTC, comment #5:

I added quoting of the JAVA_HOME variable in configure.ac which should fix this problem (http://hg.savannah.gnu.org/hgweb/octave/rev/508f67c72854).

Rik <rik5>
Project Administrator
Thu 09 Jan 2014 07:03:49 PM UTC, comment #4:

I wrote it that way originally, but then I decided that it would be more helpful to point out exactly what we are quoting since it reveals why we are taking this step at all. I've verified that both choices for the quote location work with MinGW gcc.

Rik <rik5>
Project Administrator
Thu 09 Jan 2014 06:31:21 PM UTC, comment #3:

Not that it is likely to be functionally different, but it looks a little strange to me to put a quote character in the middle of the argument. I guess I would write either -I"${JAVA_HOME}/include" or "-I${JAVA_HOME}/include".

John W. Eaton <jwe>
Project Administrator
Thu 09 Jan 2014 06:15:10 PM UTC, comment #2:

What about modifying configure.ac to wrap the -I option in double quotes for Windows systems? At line 2555 of configure.ac there is a case statement which checks for MinGW or Cygwin and sets the JAVA variables appropriately.

I think we could change the JAVA_CPPFLAGS lines to enclose the JAVA_HOME or JAVA_CPPFLAGS in quotes. See the sample below.

The original poster can test this by modifying the configure script to add the escaped double quotes as shown above and then re-running the ./configure; make cycle.

Rik <rik5>
Project Administrator
Sun 29 Dec 2013 11:08:06 AM UTC, comment #1:

It seems the Cygwin build tools cannot handle spaces in path names (i.e., ".../Program Files (X86)/Java") - the unexpected token "(" looks like the '(' of '(X86)' which is after a separator (the space in "Program Files (X86)"). The syntax error might be that the build tools expect a "-" prepending another flag in this position.

(Yes there's a space earlier on as well (between "Program" and "Files") but I expect that provisionally, "Files" looks like a valid alphanumeric token or is interpreted as a filename; but it would inevitably lead to problems later on anyway.)

My first suggestion would be to disable Java in the build (in the configure step) and try again. That is, assuming you've got no other dependencies in "C:\Program Files (X86)\"

FYI: on My Windows boxes I have several Octave dependencies & Octave itself installed in a directory C:\Programs to get rid of these spaces-in-pathnames problems.
As to Java, at runtime (once Octave is built) the spaces don't matter anymore so "C:\Program Files (X86)\Java\" would be fine then - it is just the build tools that can't cope with it.

Philip Nienhuis <philipnienhuis>
Project Member
Sun 29 Dec 2013 01:52:02 AM UTC, original submission:

On Cygwin 1.7.27 on top of Windows 7,

g++ -E -DHAVE_CONFIG_H -I. -I.. \
-I../liboctave/cruft/misc -I../liboctave/array -I../liboctave/numeric -I../liboctave/numeric -I../liboctave/operators -I../liboctave/operators -I../liboctave/system -I../liboctave/util -I./octave-value -I./operators -Iparse-tree -I./parse-tree -Icorefcn -I./corefcn -I../libgnu -I../libgnu -I/cygdrive/c/Program Files/Java/jre7/bin:/cygdrive/c/Program Files (x86)/Java/jdk1.7.0_45/bin/include -I/cygdrive/c/Program Files/Java/jre7/bin:/cygdrive/c/Program Files (x86)/Java/jdk1.7.0_45/bin/include/win32 \
-mieee-fp -O2 \
-DMAKE_BUILTINS octave-value/ov-class.cc > octave-value/ov-class.df-t
/bin/sh: -c: line 1: syntax error near unexpected token `('
/bin/sh: -c: line 1: ` -I../liboctave/cruft/misc -I../liboctave/array -I../liboctave/numeric -I../liboctave/numeric -I../liboctave/operators -I../liboctave/operators -I../liboctave/system -I../liboctave/util -I./octave-value -I./operators -Iparse-tree -I./parse-tree -Icorefcn -I./corefcn -I../libgnu -I../libgnu -I/cygdrive/c/Program Files/Java/jre7/bin:/cygdrive/c/Program Files (x86)/Java/jdk1.7.0_45/bin/include -I/cygdrive/c/Program Files/Java/jre7/bin:/cygdrive/c/Program Files (x86)/Java/jdk1.7.0_45/bin/include/win32 \'
Makefile:8263: recipe for target 'octave-value/ov-class.df' failed
make[2]: *** [octave-value/ov-class.df] Error 1
make[2]: Leaving directory '/usr/tmp/octave-3.8.0/libinterp'
Makefile:2102: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/usr/tmp/octave-3.8.0'
Makefile:1967: recipe for target 'all' failed
make: *** [all] Error 2

Aside from various --with-xxx entries, the only addition to ./configure was --disable-extra-warning-flags. ./configure and make logs available.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by bpabbott (Updated the item)
  • -unavailable- added by jwe (Updated the item)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 14 Jan 2014 08:40:18 PM UTCrik5StatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Thu 09 Jan 2014 06:15:10 PM UTCrik5StatusNone=>In Progress
    Sun 29 Dec 2013 03:49:15 AM UTCbpabbottOperating SystemOther=>Microsoft Windows
    Sun 29 Dec 2013 01:59:13 AM UTCjweSummary3.8.0 make crashes with syntax error near unexpected token `(\'=>3.8.0 build fails with syntax error near unexpected token `('
    Sun 29 Dec 2013 01:58:47 AM UTCjweReleaseother=>3.8.0

    Back to the top


    Powered by Savane 3.1-cleanup1