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

Build fails in macOS #2

Closed
tritao opened this issue Apr 23, 2019 · 4 comments
Closed

Build fails in macOS #2

tritao opened this issue Apr 23, 2019 · 4 comments

Comments

@tritao
Copy link

tritao commented Apr 23, 2019

Fresh clone and I get this:

➜  zograscope git:(master) make
c++ -c -I./src/ -std=c++11 -Wall -Wextra -MMD -Isrc/ -Ithird-party/ -DYYDEBUG -Og -g tools/diff/diff.cpp -o tools/diff/diff.o
error: invalid integral value 'g' in '-Og'
error: invalid integral value 'g' in '-Og'

Compiler info:

➜  zograscope git:(master) clang --version
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode81.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
@tritao
Copy link
Author

tritao commented Apr 23, 2019

After manually removing that flag from the Makefile had some issues with Bison.
The default version on the PATH is 2.3 and gives some errors.

After fixing the paths in the Makefile to use Bison 3.3 install from Homebrew:

➜  zograscope git:(master) ✗ make
/usr/local/Cellar/bison/3.3.2/bin/bison -Werror --defines=./src/make/make-parser.hpp \
	      --output=./src/make/make-parser.gen.cpp src/make/make-parser.ypp
src/make/make-parser.ypp:66.1-20: error: deprecated directive, use ‘%define api.prefix {make_}’ [-Werror=deprecated]
 %name-prefix "make_"
 ^~~~~~~~~~~~~~~~~~~~
src/make/make-parser.ypp: error: fix-its can be applied.  Rerun with option '--update'. [-Werror=other]

After applying the suggested fix to the Bison grammar, I get a little bit further.

➜  zograscope git:(master) ✗ make
/usr/local/Cellar/bison/3.3.2/bin/bison -Werror --defines=./src/make/make-parser.hpp \
	      --output=./src/make/make-parser.gen.cpp src/make/make-parser.ypp
flex --header-file=./src/make/make-lexer.hpp \
	     --outfile=./src/make/make-lexer.gen.cpp src/make/make-lexer.flex
c++ -c -I./src/ -std=c++11 -Wall -Wextra -MMD -Isrc/ -Ithird-party/ -DYYDEBUG -g src/ColorCane.cpp -o src/ColorCane.o
c++ -c -I./src/ -std=c++11 -Wall -Wextra -MMD -Isrc/ -Ithird-party/ -DYYDEBUG -g src/ColorScheme.cpp -o src/ColorScheme.o
c++ -c -I./src/ -std=c++11 -Wall -Wextra -MMD -Isrc/ -Ithird-party/ -DYYDEBUG -g src/Highlighter.cpp -o src/Highlighter.o
In file included from src/Highlighter.cpp:18:
In file included from ./src/Highlighter.hpp:24:
In file included from /Applications/Xcode81.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stack:86:
/Applications/Xcode81.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/deque:912:49: error: invalid application of 'sizeof' to an incomplete type
      'value_type' (aka 'Highlighter::Entry')
    static const difference_type __block_size = sizeof(value_type) < 256 ? 4096 / sizeof(value_type) : 16;

@xaizek
Copy link
Owner

xaizek commented Apr 24, 2019

Thank you for the report. Will try to setup Travis-CI later, I didn't expect such issues. There is now osx-fixes branch which builds and passes all tests for me.

Also, you probably want to do gmake release. Absence of -Og might reduce performance and make release uses old make, which has some troubles managing dependencies and make need to be run twice (so gmake from brew isn't strictly needed).

@xaizek xaizek closed this as completed in 00b9390 Apr 24, 2019
@xaizek
Copy link
Owner

xaizek commented Apr 24, 2019

Fixed that issue with gmake v3, now make release check should work fine on macOS.

@tritao
Copy link
Author

tritao commented Apr 24, 2019

👍 Thanks for the fast response and fixes.

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