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 `('

Submitter:  None
Submitted:  Sun 29 Dec 2013 01:52:02 AM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  pen7cmc Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.8.0
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>
Group 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>
Group 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.


mingw* | cygwin*)
  build_java=yes
  JAVA_LIBS=-ladvapi32
  if test $have_msvc = no; then
    if test -n "$JAVA_CPPFLAGS"; then
      JAVA_CPPFLAGS="-I${JAVA_CPPFLAGS}/include -I${JAVA_CPPFLAGS}/include/win32"
    else
      JAVA_CPPFLAGS="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/win32"
    fi
    LDFLAGS="$LDFLAGS -Wl,--export-all-symbols"
  fi
  AC_DEFINE(HAVE_JAVA, 1,
    [Define to 1 if Java is available and is at least version 1.5])
  break


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


JAVA_CPPFLAGS="-I\"${JAVA_HOME}\"/include -I\"${JAVA_HOME}\"/include/win32"


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>
Group 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>
Group 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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-01-14 rik5 StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2014-01-09 rik5 StatusNone In Progress
    2013-12-29 bpabbott Operating SystemOther Microsoft Windows
    2013-12-29 jwe Summary3.8.0 make crashes with syntax error near unexpected token `(\' 3.8.0 build fails with syntax error near unexpected token `('
    2013-12-29 jwe Releaseother 3.8.0

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code