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

Brew install on macOS 11.6 fails #8

Open
andreTheuma opened this issue Oct 7, 2021 · 9 comments
Open

Brew install on macOS 11.6 fails #8

andreTheuma opened this issue Oct 7, 2021 · 9 comments

Comments

@andreTheuma
Copy link

Terminal Log:

Last 15 lines from /Users/user/Library/Logs/Homebrew/souffle/03.cmake: using ::islessgreater; ~~^ /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/c++/v1/cmath:332:9: error: no member named 'isunordered' in the global namespace using ::isunordered; ~~^ /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/c++/v1/cmath:333:9: error: no member named 'isunordered' in the global namespace using ::isunordered; ~~^ 13 errors generated. make[2]: *** [src/CMakeFiles/libsouffle.dir/ast/analysis/Functor.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... 13 errors generated. make[2]: *** [src/CMakeFiles/libsouffle.dir/ast/analysis/PolymorphicObjects.cpp.o] Error 1 make[1]: *** [src/CMakeFiles/libsouffle.dir/all] Error 2 make: *** [all] Error 2

@b-scholz
Copy link
Member

We would help with the installation script. Could you help fixing the problem?

@rahlk
Copy link
Contributor

rahlk commented Nov 25, 2021

Try this: #7 (comment)

@b-scholz I am wondering if we can add the export CC/CXX to the formula.rb? And include gcc in depends on?

@b-scholz
Copy link
Member

I think that would be great. Could you create a PR?

@ammkrn
Copy link

ammkrn commented Aug 21, 2022

fwiw this is still an issue preventing installation on macOS using the instructions on the souffle page. The installation instructions fail with:

Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at 66b96fd07 Merge pull request #2287 from julienhenry/fix-btree-destructor
==> Installing souffle from souffle-lang/souffle
==> git fetch --tags
==> cmake -B build -S . -DSOUFFLE_GIT=OFF -DSOUFFLE_BASH_COMPLETION=OFF -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11
==> cmake --build build --target install -j17
Last 15 lines from /Users/user/Library/Logs/Homebrew/souffle/03.cmake:
      ~~^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/c++/v1/cmath:333:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
15 errors generated.
gmake[2]: *** [src/CMakeFiles/libsouffle.dir/build.make:801: src/CMakeFiles/libsouffle.dir/ast/analysis/ProfileUse.cpp.o] Error 1
13 errors generated.
gmake[2]: *** [src/CMakeFiles/libsouffle.dir/build.make:857: src/CMakeFiles/libsouffle.dir/ast/analysis/JoinSize.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1234: src/CMakeFiles/libsouffle.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
[ 47%] Linking CXX executable souffleprof
[ 47%] Built target souffleprof
[ 47%] Linking CXX executable test_brie
[ 47%] Built target test_brie
gmake: *** [Makefile:146: all] Error 2

I don't really know anything about these build systems, so unfortunately I won't be of much help in fixing the problem.

@b-scholz
Copy link
Member

Have you tried the manual instructions? Does it build for you? Which computer do you have ARM or Intel?

@ammkrn
Copy link

ammkrn commented Aug 23, 2022

Intel, Big sur 11.6.8. Building with the instructions in the OSX section fails:

[ 64%] Building CXX object src/CMakeFiles/libsouffle.dir/parser/scanner.cc.o
/Users/user/souffle/build/src/parser/scanner.cc:2414:41: error: comparison of integers of different signs: 'unsigned long' and 'int' [-Werror,-Wsign-compare]
        if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[2]: *** [src/CMakeFiles/libsouffle.dir/build.make:2202: src/CMakeFiles/libsouffle.dir/parser/scanner.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1234: src/CMakeFiles/libsouffle.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

The earlier steps linking bison and libffi return a warning along the lines of:

$ brew link bison --force
Warning: Refusing to link macOS provided/shadowed software: bison
If you need to have bison first in your PATH, run:
  echo 'export PATH="/usr/local/opt/bison/bin:$PATH"' >> ~/.profile

For compilers to find bison you may need to set:

Which just cuts off after you may need to set:.

@b-scholz
Copy link
Member

Oh dear- we treat all warnings as errors, and that fails the build.

The generated flex source code contains warnings and we cannot fix this directly.

We need to disable the flag -Werror in src/CMakeList.txt when compiling parser/scanner.cc.

Would you like to help?

@ammkrn
Copy link

ammkrn commented Aug 23, 2022

I disabled these two invocations of -Werror one two

And the build worked. I can PR it, but other than that I'm not sure how much help I can provide since this is not in my wheelhouse.

@b-scholz
Copy link
Member

b-scholz commented Aug 23, 2022 via email

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

4 participants