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

SWIG wheel building failed due to syntax error with SWIG 2.0 #31

Closed
engelen opened this issue Sep 14, 2017 · 1 comment
Closed

SWIG wheel building failed due to syntax error with SWIG 2.0 #31

engelen opened this issue Sep 14, 2017 · 1 comment

Comments

@engelen
Copy link

engelen commented Sep 14, 2017

I'm in the process of getting a clean setup of auto-sklearn running on CentOS, and I'm getting an error building the wheel. I know there's quite a few issues about this already, but I've found the cause for at least one of the errors, which is the ./include/rfr/trees/binary_fanova_tree.hpp:329: Error: Syntax error in input(3). It has been encountered by other users before, see, e.g., #21, automl/auto-sklearn#314, #18.

It appears to happen in older versions of SWIG, which don't have all support required for C++11 and later versions. Either way, the error is as follows (solution can be found below):

running install
running build_ext
building '_regression' extension
swigging pyrfr/regression.i to pyrfr/regression_wrap.cpp
swig -python -c++ -I${CMAKE_SOURCE_DIR}/include -I./include -o pyrfr/regression_wrap.cpp pyrfr/regression.i
./include/rfr/trees/binary_fanova_tree.hpp:329: Error: Syntax error in input(3).
error: command 'swig' failed with exit status 1

As the message suggests, this is a problem with line 329 of https://github.com/automl/random_forest_run/blob/v0.6.0/include/rfr/trees/binary_fanova_tree.hpp#L329. Apparently, SWIG has some trouble handling the >>&: changing it to > >& solves the problem.

For users encountering this problem:
Use SWIG >= 3.0. That will also solve the syntax error.

@engelen engelen changed the title SWIG wheel building failed due to syntax error SWIG wheel building failed due to syntax error with SWIG 2.0 Sep 14, 2017
sfalkner added a commit that referenced this issue Nov 21, 2017
@sfalkner
Copy link
Collaborator

Should be fixed via 0a793e0.

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