Ask help for build on MacOs

Hi, I am trying to build from source on my mac. after fix some configuration error, finally i came to this issue:

[ 44%] Generating Parser.cpp
GNU bison generates parsers for LALR(1) grammars.

Usage: /Library/Developer/CommandLineTools/usr/bin/bison [OPTION]... FILE

If a long option shows an argument as mandatory, then it is mandatory
for the equivalent short option also.  Similarly for optional arguments.

Operation modes:
  -h, --help                 display this help and exit
  -V, --version              output version information and exit
      --print-localedir      output directory containing locale-dependent data
  -y, --yacc                 emulate POSIX yacc

Parser:
  -S, --skeleton=FILE        specify the skeleton to use
  -t, --debug                instrument the parser for debugging
      --locations            enable locations computation
  -p, --name-prefix=PREFIX   prepend PREFIX to the external symbols
  -l, --no-lines             don't generate `#line' directives
  -n, --no-parser            generate the tables only
  -k, --token-table          include a table of token names

Output:
  -d, --defines              also produce a header file
  -r, --report=THINGS        also produce details on the automaton
  -v, --verbose              same as `--report=state'
  -b, --file-prefix=PREFIX   specify a PREFIX for output files
  -o, --output=FILE          leave output to FILE
  -g, --graph                also produce a VCG description of the automaton

THINGS is a list of comma separated words that can include:
  `state'        describe the states
  `itemset'      complete the core item sets with their closure
  `look-ahead'   explicitly associate look-ahead tokens to items
  `solved'       describe shift/reduce conflicts solving
  `all'          include all the above information
  `none'         disable the report

Report bugs to <bug-bison@gnu.org>.
[ 45%] Patching Parser.cpp to remove register keyword
sed: /Users/bytedance/work/omniscidb/cmake-build-debug/Parser/Parser_with_register.cpp: No such file or directory
make[2]: *** [Parser/Parser.cpp] Error 1
make[2]: *** Deleting file `Parser/Parser.cpp'
make[1]: *** [Parser/CMakeFiles/ParserGenerated.dir/all] Error 2
make: *** [all] Error 2

seems the bison cannot work as the cmake command set, and i had try to fix it but still cannot work out.
Big thanks

Hi, @compasses,

Thanks for joining our community and trying out the database in a hard way or most fanny way)

Unluckily I can’t give you adequate support with Mac OS, but in my build, the command fails (bison++) is called with -d option in this way

/usr/local/mapd-deps/bin/bison++ -d -h/opt/mapd_storage/github/master/omniscidb/build_debug/Parser/parser.h -o/opt/mapd_storage/github/master/omniscidb/build_debug/Parser/Parser_with_register.cpp /opt/mapd_storage/github/master/omniscidb/Parser/parser.y

you should check how is called bison++ into this file
/Users/bytedance/work/omniscidb/cmake-build-debug/Parser/CMakeFiles/ParserGenerated.dir/build.make

Hopes this helps

@compasses you can also try adding VERBOSE=1 when you call make command; it would be helpful showing how the make and other commads being called.

@candido.dessanti OK great thanks. issue fixed, it was caused by wrong bison version, and fixed by reinstall the bison++.
And now reached to the link stage:

[100%] Linking CXX executable bin/initdb
Undefined symbols for architecture x86_64:
  "_CFAllocatorCreate", referenced from:
      _aws_wrapped_cf_allocator_new in libaws-c-common.a(allocator.c.o)
  "_CFRelease", referenced from:
      _aws_wrapped_cf_allocator_destroy in libaws-c-common.a(allocator.c.o)
  "___CFConstantStringClassReference", referenced from:
      CFString in libaws-c-common.a(allocator.c.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [bin/initdb] Error 1
make[2]: *** [CMakeFiles/initdb.dir/all] Error 2
make[1]: *** [CMakeFiles/initdb.dir/rule] Error 2
make: *** [initdb] Error 2

I will invest it , seems some lib not linked correctly, maybe some configuration issue. Big thanks.

You are not linking some libraries, or you are using the wrong version of a library that’s being used by lib-aws; It looks something basic (this one? https://en.wikipedia.org/wiki/Core_Foundation)

I haven’t any experience with MAC OS sorry. I will ask internally if someone have faced such problem.

As a fast workaround, you could create a build excluding AWS support

@candido.dessanti yes and i just excluding the aws support. and then got the ssl link error, and i fixed it. seems it cannot find the openssl lib automatically.
And finally I succeed in compiling the source code.
Big thanks, I will dive in the source of omnisci db.
Thanks

1 Like