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

error in the compilation #146

Closed
arademaker opened this issue Mar 20, 2023 · 5 comments
Closed

error in the compilation #146

arademaker opened this issue Mar 20, 2023 · 5 comments

Comments

@arademaker
Copy link

The Makefile is missing. The foma/README mentioned a generic Makefile but what would be that?

@arademaker
Copy link
Author

I just submitted a PR adding the Makefile I got from the tar.gz file mentioned here.

@arademaker
Copy link
Author

I closed the PR given that the missing Makefile is justified. The projected moved to cmake. I didn't find the instructions to use cmake . I tried

% cmake .
-- Checking for one of the modules 'readline'
-- Configuring done (0.2s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/ar/Temp/foma/x/foma-ar/foma

ar@tenis foma % make
[  1%] [BISON][Bregex] Building parser with bison 2.3
/Users/ar/Temp/foma/x/foma-ar/foma/regex.y:204.9-16: syntax error, unexpected identifier, expecting string
make[2]: *** [regex.c] Error 1
make[1]: *** [CMakeFiles/foma-static.dir/all] Error 2
make: *** [all] Error 2

and I got and error in the regex.c. I am trying to compile in

Darwin tenis.local 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64 x86_64

MacOS 13.2.1 (22D68)

@arademaker arademaker changed the title missing Makefile error in the compilation Mar 21, 2023
@arademaker
Copy link
Author

I have updated the title of the issue to reflect the actual problem.

@arademaker
Copy link
Author

Following the instructions from

sudo apt-get -qfy install --no-install-recommends cmake
. I tried to pass the -j parameter to make:

%  cmake . && make -j
-- Checking for one of the modules 'readline'
-- Configuring done (0.2s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/ar/Temp/foma/x/foma-ar/foma
[  1%] [BISON][Bregex] Building parser with bison 2.3
[  2%] [FLEX][Fcmatrix] Building scanner with flex 2.6.4
[  4%] [FLEX][Flexc] Building scanner with flex 2.6.4
[  5%] [FLEX][Flexc] Building scanner with flex 2.6.4
[  6%] [BISON][Bregex] Building parser with bison 2.3
[  8%] [FLEX][Fregex] Building scanner with flex 2.6.4
[  9%] [FLEX][Fcmatrix] Building scanner with flex 2.6.4
[ 11%] [FLEX][Fregex] Building scanner with flex 2.6.4
/Users/ar/Temp/foma/x/foma-ar/foma/regex.y:204.9-16: syntax error, unexpected identifier, expecting string
make[2]: *** [regex.c] Error 1
make[2]: *** Waiting for unfinished jobs....
/Users/ar/Temp/foma/x/foma-ar/foma/regex.y:204.9-16: syntax error, unexpected identifier, expecting string
make[2]: *** [regex.c] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/foma-static.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/foma-shared.dir/all] Error 2
make: *** [all] Error 2

@arademaker
Copy link
Author

OK, I solved the problem. The bison tool distributed with MacOS is too old.

% /usr/bin/bison --version
bison (GNU Bison) 2.3

I installed the bison from Homebrew

% which bison
/usr/local/opt/bison/bin/bison

% bison --version
bison (GNU Bison) 3.8.2

and the make -j finished. So we can close this issue. I am sorry for the noise here. Can I suggest some comments in the README?

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

1 participant