refu-lang / refu

Refu language
21 stars 4 forks source link

Refulang now compiles and runs on Macosx #37

Closed LefterisJP closed 7 years ago

LefterisJP commented 7 years ago

Implements the necessary functionality to compile and run refu on Macosx and along with the necessary rfbase changes addresses #27.

axic commented 7 years ago

This almost compiles for me, it still complains about the IR:

[ 44%] Building C object CMakeFiles/refu.dir/src/ir/parser/rirtoken.c.o
In file included from /Users/alex/Projects/refu/refu/src/ir/parser/rirtoken.c:4:
/Users/alex/Projects/refu/refu/src/ir/parser/rirtoken_htable.h:97:1: error: conflicting types for 'rir_lexer_lexeme_is_token'
rir_lexer_lexeme_is_token (str, len)
^
/Users/alex/Projects/refu/refu/include/ir/parser/rirtoken.h:82:31: note: previous declaration is here
const struct rinternal_token *rir_lexer_lexeme_is_token(
LefterisJP commented 7 years ago

@axic That's strange. This works fine in my macos machine. I am just trying to make the Travis tests pass at the moment but Travis and OSX machines are quite difficult to work with. I get a build every 30-60 mins.

The conflicting type could be due to the version of gperf. At some point it changed from unsigned int to size_t. There is some code that should handle it.

axic commented 7 years ago

This is what I have:

$ gperf -v
GNU gperf 3.0.3
$ clang -v
Apple LLVM version 8.0.0 (clang-800.0.38)
Target: x86_64-apple-darwin15.6.0
axic commented 7 years ago

I did a fresh clone and following the official steps I end up here:

[ 44%] Building C object CMakeFiles/refu.dir/src/ir/parser/rirtoken.c.o
/Users/alex/Projects/refu/refu/src/ir/parser/rirtoken.c:4:10: fatal error: 'rirtoken_htable.h' file not found
#include "rirtoken_htable.h"
         ^
1 error generated.
LefterisJP commented 7 years ago

@axic Since the travis OSX job passes I will merge this PR. Can you open an OSX specific issue for what you are experiencing? It could either be clang/cmake/gperf or OSX version. From your input I see that we have the same clang, cmake and gperf versions though.