bugGNU Octave - Bugs: bug #54324, Build failure on macOS:...

 
 

bug #54324: Build failure on macOS: oct-tex-parser.yy:53.9-16: syntax error, unexpected identifier

Submitted by:  Andrew Janke <apjanke>
Submitted on:  Tue 17 Jul 2018 10:59:14 AM UTC  
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Mac OS

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

( Jump to the original submission)

Thu 19 Jul 2018 12:46:53 AM UTC, comment #11: 

Marking as fixed and closing report.

Rik <rik5>
Project Administrator
Wed 18 Jul 2018 08:49:31 PM UTC, comment #10: 

I think that worked. I'm back to getting the build error from https://savannah.gnu.org/bugs/?53627, so I think this one is fixed.

Andrew Janke <apjanke>
Wed 18 Jul 2018 07:57:55 PM UTC, comment #9: 

Try now.

And I thought this would be a simple change to make...

John W. Eaton <jwe>
Project Administrator
Wed 18 Jul 2018 07:46:11 PM UTC, comment #8: 

Yeah, I screwed it up and I'm still trying to fix it.

John W. Eaton <jwe>
Project Administrator
Wed 18 Jul 2018 07:34:23 PM UTC, comment #7: 

Hmm. Now I'm getting different syntax errors in oct-tex-parser.yy.

In file included from ../../octave/libinterp/corefcn/oct-tex-parser.yy:32:
libinterp/corefcn/oct-tex-parser.h:36:22: warning: extra tokens at end of #ifndef directive [-Wextra-tokens]
#ifndef  OCTAVE_TEX_ DEBUG
                     ^
                     //
libinterp/corefcn/oct-tex-parser.h:47:6: error: token is not a valid binary operator in a preprocessor subexpression
#if  OCTAVE_TEX_ DEBUG
     ^~~~~~~~~~~
libinterp/corefcn/oct-tex-parser.h:39:31: note: expanded from macro 'OCTAVE_TEX_'
#   define  OCTAVE_TEX_ DEBUG 1
                        ~~~~~ ^
libinterp/corefcn/oct-tex-parser.h:57:22: warning: extra tokens at end of #ifndef directive [-Wextra-tokens]
#ifndef  OCTAVE_TEX_ TOKENTYPE
                     ^
                     //
libinterp/corefcn/oct-tex-parser.h:100:28: error: token is not a valid binary operator in a preprocessor subexpression
#if ! defined  OCTAVE_TEX_ STYPE && ! defined  OCTAVE_TEX_ STYPE_IS_DECLARED
    ~~~~~~~~~~~~~~~~~~~~~~ ^
libinterp/corefcn/oct-tex-parser.h:128:17: error: expected ';' after top level declarator
int  octave_tex_ parse (text_parser_tex& parser);
                ^
                ;

This is from the default branch, updated just now.

(file #44583)

Andrew Janke <apjanke>
Wed 18 Jul 2018 07:07:32 PM UTC, comment #6: 

You can either pass YACC=/usr/local/opt/bison or you can ensure that /usr/local/opt comes before /usr/bin in PATH.

I think the error was that the subst-bison-api-decls was using the syntax '%name-prefix="octave_tex_"' for ancient versions of bison, it should have been '%name-prefix "octave_tex_"'. But that has all been removed now.

Mike Miller <mtmiller>
Project Administrator
Wed 18 Jul 2018 07:00:44 PM UTC, comment #5: 

I've attached file #44581:  bug54324-example01.tgz, which includes oct-tex.parser.yy and config.status.

From config.status:

S["BISON_PUSH_PULL_DECL_STYLE"]=""
S["BISON_API_PREFIX_DECL_STYLE"]="name quote"
[...]
S["SED"]="/usr/local/bin/gsed"

Bison version:

$ which bison
/usr/bin/bison
$ bison --version
bison (GNU Bison) 2.3

Sounds like that may not be adequate. From config.log:

configure:8975: found /usr/bin/bison
configure:8986: result: bison -y
configure:9005: checking syntax of bison api.prefix (or name-prefix) declaration
configure:9050: result: name quote
configure:9072: checking syntax of bison push/pull declaration
configure:9116: result:
configure:9131: WARNING:

I wasn't able to find a suitable style for declaring a push-pull
parser in a bison input file so I'm disabling bison.

configure:9147: WARNING:

I didn't find bison, or the version of bison that I found does not
support all the features that are required, but it's only a problem
if you need to reconstruct parse.cc, which is the case if you're
building from VCS sources.

I also have bison 3.0.5 installed at /usr/local/opt/bison; I'm just not sure how to point the build at it.

Andrew Janke <apjanke>
Wed 18 Jul 2018 05:59:13 PM UTC, comment #4: 

I pushed this change to start:

http://hg.savannah.gnu.org/hgweb/octave/rev/e1c3d1c6e896

We can further simplify the OCTAVE_PROG_BISON macro if you think the feature check and warning are not necessary.

John W. Eaton <jwe>
Project Administrator
Wed 18 Jul 2018 05:09:04 PM UTC, comment #3: 

I'm all in favor of reducing cruft.  How far should we go?  Remove the feature check and substitution and fail at build time if bison isn't recent enough?  Keep the check and only accept bison if a suitably recent version is found, issuing a warning if an older bison is found?

Andrew, what version of bison are you using?

John W. Eaton <jwe>
Project Administrator
Tue 17 Jul 2018 06:15:31 PM UTC, comment #2: 

And show the value of BISON_API_PREFIX_DECL_STYLE in config.status, as well as what SED is set to.

If you are using GNU bison 3.0 or later, it should be "api brace".

@maintainers - maybe we should drop the sed substitution for backwards compatibility and just use the latest bison syntax now? Version 3.0 came out in 2013. Any users with a RHEL or CentOS distribution with an ancient bison can build from the source release.

Mike Miller <mtmiller>
Project Administrator
Tue 17 Jul 2018 04:07:43 PM UTC, comment #1: 

Can you upload the file oct-tex-parser.yy so we can inspect line 53?

Rik <rik5>
Project Administrator
Tue 17 Jul 2018 10:59:14 AM UTC, original submission:  

I'm attempting to build Octave from the Hg repo, on both the stable and default branches, and am getting a compilation error.

  YACC     libinterp/corefcn/oct-tex-parser.h
/Users/janke/local/repos/octave-BUILD/libinterp/corefcn/oct-tex-parser.yy:53.9-16: syntax error, unexpected identifier, expecting string
make: *** [libinterp/corefcn/oct-tex-parser.h] Error 1

This is on macOS 10.13.5.

Configure command:

../octave/configure --prefix=/tmp/test-octave --disable-readline

Looks like this was introduced recently; I was getting a different build error a couple days ago when working on https://savannah.gnu.org/bugs/?53627.

Andrew Janke <apjanke>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #44583:  bug54324-example03.tgz added by apjanke (245KiB - application/gzip)
file #44582:  bug54324-example02.tgz added by apjanke (220KiB - application/gzip - files from new failing build attempt)
file #44581:  bug54324-example01.tgz added by apjanke (44KiB - application/gzip - files from failing build attempt)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

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

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

    Only project members can vote.

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-19 rik5 StatusNeed Info => Fixed
        Open/ClosedOpen => Closed
    2018-07-18 apjanke Attached File- => Added bug54324-example03.tgz, #44583
    2018-07-18 apjanke Attached File- => Added bug54324-example02.tgz, #44582
    2018-07-18 apjanke Attached File- => Added bug54324-example01.tgz, #44581
    2018-07-17 rik5 Dependencies- => bugs #53627 is dependent
    2018-07-17 rik5 StatusNone => Need Info

    Back to the top


    Powered by Savane 3.5