Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when compiling the OpenSCAD. #2

Closed
mrhdias opened this issue Jan 28, 2011 · 4 comments
Closed

Problem when compiling the OpenSCAD. #2

mrhdias opened this issue Jan 28, 2011 · 4 comments

Comments

@mrhdias
Copy link

mrhdias commented Jan 28, 2011

Hi,

I can not compile the OpenSCAD, because of the following error:

yacc -d -p parser -b parser src/parser.y
yacc: e - line 27 of "src/parser.y", syntax error
%expect 1 /* Expect 1 shift/reduce conflict for ifelse_statement - "dangling
else problem" /
^
make: *
* [parser_yacc.h] Error 1

I've tried the latest version and the version from the github and does not
compile on both.

Anyone have suggestions for solving this problem?

My OS is Gentoo Linux - AMD64

Thanks,

Henrique Dias

@kintel
Copy link
Member

kintel commented Jan 28, 2011

I've had reports that some Linux distributions ship with a version of yacc/bison where the %expect statement is not supported. The mailing list has a number of Linux users lingering, they might give better response to this.

@mrhdias
Copy link
Author

mrhdias commented Jan 28, 2011

Hi kintel,

I just found a solution but do not know if it's the right one.
I replaced the yacc by the bison parser in Makefile and work.

Steps to build the OpenSCAD successfully:

git clone --depth=1 git://github.com/openscad/openscad.git
cd openscad
qmake
cp Makefile Makefile.org
nano -w Makefile <-- Replace the yacc parser by the bison (find the line 338).
make

Comparing the original Makefile, with the new Makefile:

diff -u Makefile.org Makefile
--- Makefile.org 2011-01-28 23:10:50.000000000 +0000
+++ Makefile 2011-01-28 23:11:18.000000000 +0000
@@ -335,7 +335,7 @@
compiler_yacc_decl_clean:
-$(DEL_FILE) parser_yacc.h
parser_yacc.h: src/parser.y

  •   yacc -d -p parser -b parser src/parser.y
    
  •   bison -d -p parser -b parser src/parser.y
     rm -f parser_yacc.h parser_yacc.cpp
     mv -f parser.tab.h parser_yacc.h
     mv -f parser.tab.c parser_yacc.cpp
    

Thanks for your help.

Henrique Dias

@kintel
Copy link
Member

kintel commented Jan 30, 2011

I think the fix will be to use bison explicitly everywhere.

@kintel
Copy link
Member

kintel commented May 10, 2011

This should be fixed by know (updated build system)

@kintel kintel closed this as completed May 10, 2011
iamwilhelm pushed a commit to iamwilhelm/openscad that referenced this issue May 7, 2012
@donbright donbright mentioned this issue Jun 8, 2012
@torwag torwag mentioned this issue Oct 5, 2012
kintel pushed a commit that referenced this issue Jan 3, 2014
t-paul pushed a commit that referenced this issue Jun 18, 2016
t-paul pushed a commit that referenced this issue Feb 18, 2018
t-paul pushed a commit that referenced this issue Feb 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants