Needs support for mac OSX #2

Closed
beoran opened this Issue May 3, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@beoran

beoran commented May 3, 2012

We needs to support for mac OSX.

@bovi

This comment has been minimized.

Show comment Hide comment
@bovi

bovi May 4, 2012

Hi,

I just took your latest version and started a fresh make with VERBOSE. The compile fails at the linking of mrbc:

[ 88%] Built target ritevm_static
make -f tools/mrbc/CMakeFiles/mrbc.dir/build.make tools/mrbc/CMakeFiles/mrbc.dir/depend
cd /Users/daniel/Documents/cmake-mruby/build && /usr/local/Cellar/cmake/2.8.8/bin/cmake -E cmake_depends "Unix Makefiles" /Users/daniel/Documents/cmake-mruby /Users/daniel/Documents/cmake-mruby/tools/mrbc /Users/daniel/Documents/cmake-mruby/build /Users/daniel/Documents/cmake-mruby/build/tools/mrbc /Users/daniel/Documents/cmake-mruby/build/tools/mrbc/CMakeFiles/mrbc.dir/DependInfo.cmake --color=
Dependee "/Users/daniel/Documents/cmake-mruby/build/tools/mrbc/CMakeFiles/mrbc.dir/DependInfo.cmake" is newer than depender "/Users/daniel/Documents/cmake-mruby/build/tools/mrbc/CMakeFiles/mrbc.dir/depend.internal".
Dependee "/Users/daniel/Documents/cmake-mruby/build/tools/mrbc/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/Users/daniel/Documents/cmake-mruby/build/tools/mrbc/CMakeFiles/mrbc.dir/depend.internal".
Scanning dependencies of target mrbc
make -f tools/mrbc/CMakeFiles/mrbc.dir/build.make tools/mrbc/CMakeFiles/mrbc.dir/build
/usr/local/Cellar/cmake/2.8.8/bin/cmake -E cmake_progress_report /Users/daniel/Documents/cmake-mruby/build/CMakeFiles 1
[ 90%] Building C object tools/mrbc/CMakeFiles/mrbc.dir/mrbc.c.o
cd /Users/daniel/Documents/cmake-mruby/build/tools/mrbc && /usr/bin/gcc   -O2 -g -I/Users/daniel/Documents/cmake-mruby/include -I/Users/daniel/Documents/cmake-mruby/src    -o CMakeFiles/mrbc.dir/mrbc.c.o   -c /Users/daniel/Documents/cmake-mruby/tools/mrbc/mrbc.c
Linking C executable mrbc
cd /Users/daniel/Documents/cmake-mruby/build/tools/mrbc && /usr/local/Cellar/cmake/2.8.8/bin/cmake -E cmake_link_script CMakeFiles/mrbc.dir/link.txt --verbose=1
/usr/bin/gcc  -O2 -g -Wl,-search_paths_first -Wl,-headerpad_max_install_names   CMakeFiles/mrbc.dir/mrbc.c.o  -o mrbc  -L/Users/daniel/Documents/cmake-mruby/lib -L/Users/daniel/Documents/cmake-mruby/mrblib ../../lib/libritevm_static.a -lm 
Undefined symbols for architecture x86_64:
  "_mrb_parse_file", referenced from:
      _main in mrbc.c.o
  "_parser_dump", referenced from:
      _main in mrbc.c.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [tools/mrbc/mrbc] Error 1
make[1]: *** [tools/mrbc/CMakeFiles/mrbc.dir/all] Error 2
make: *** [all] Error 2

On the other side

make ritevm_object

compiles. But make ritevm also breaks during linking of "libritevm.dylib":

[100%] Built target ritevm_object
make -f src/CMakeFiles/ritevm.dir/build.make src/CMakeFiles/ritevm.dir/depend
cd /Users/daniel/Documents/cmake-mruby/build && /usr/local/Cellar/cmake/2.8.8/bin/cmake -E cmake_depends "Unix Makefiles" /Users/daniel/Documents/cmake-mruby /Users/daniel/Documents/cmake-mruby/src /Users/daniel/Documents/cmake-mruby/build /Users/daniel/Documents/cmake-mruby/build/src /Users/daniel/Documents/cmake-mruby/build/src/CMakeFiles/ritevm.dir/DependInfo.cmake --color=
make -f src/CMakeFiles/ritevm.dir/build.make src/CMakeFiles/ritevm.dir/build
Linking C shared library ../lib/libritevm.dylib
cd /Users/daniel/Documents/cmake-mruby/build/src && /usr/local/Cellar/cmake/2.8.8/bin/cmake -E cmake_link_script CMakeFiles/ritevm.dir/link.txt --verbose=1
/usr/bin/gcc  -O2 -g -dynamiclib -Wl,-headerpad_max_install_names   -o ../lib/libritevm.dylib -install_name /Users/daniel/Documents/cmake-mruby/build/lib/libritevm.dylib CMakeFiles/ritevm_object.dir/array.c.o CMakeFiles/ritevm_object.dir/ascii.c.o CMakeFiles/ritevm_object.dir/cdump.c.o CMakeFiles/ritevm_object.dir/class.c.o CMakeFiles/ritevm_object.dir/codegen.c.o CMakeFiles/ritevm_object.dir/compar.c.o CMakeFiles/ritevm_object.dir/crc.c.o CMakeFiles/ritevm_object.dir/dump.c.o CMakeFiles/ritevm_object.dir/encoding.c.o CMakeFiles/ritevm_object.dir/enum.c.o CMakeFiles/ritevm_object.dir/error.c.o CMakeFiles/ritevm_object.dir/etc.c.o CMakeFiles/ritevm_object.dir/gc.c.o CMakeFiles/ritevm_object.dir/hash.c.o CMakeFiles/ritevm_object.dir/init.c.o CMakeFiles/ritevm_object.dir/init_ext.c.o CMakeFiles/ritevm_object.dir/kernel.c.o CMakeFiles/ritevm_object.dir/load.c.o CMakeFiles/ritevm_object.dir/minimain.c.o CMakeFiles/ritevm_object.dir/numeric.c.o CMakeFiles/ritevm_object.dir/object.c.o CMakeFiles/ritevm_object.dir/pool.c.o CMakeFiles/ritevm_object.dir/print.c.o CMakeFiles/ritevm_object.dir/proc.c.o CMakeFiles/ritevm_object.dir/range.c.o CMakeFiles/ritevm_object.dir/re.c.o CMakeFiles/ritevm_object.dir/regcomp.c.o CMakeFiles/ritevm_object.dir/regenc.c.o CMakeFiles/ritevm_object.dir/regerror.c.o CMakeFiles/ritevm_object.dir/regexec.c.o CMakeFiles/ritevm_object.dir/regparse.c.o CMakeFiles/ritevm_object.dir/sprintf.c.o CMakeFiles/ritevm_object.dir/st.c.o CMakeFiles/ritevm_object.dir/state.c.o CMakeFiles/ritevm_object.dir/string.c.o CMakeFiles/ritevm_object.dir/struct.c.o CMakeFiles/ritevm_object.dir/symbol.c.o CMakeFiles/ritevm_object.dir/transcode.c.o CMakeFiles/ritevm_object.dir/unicode.c.o CMakeFiles/ritevm_object.dir/us_ascii.c.o CMakeFiles/ritevm_object.dir/utf_8.c.o CMakeFiles/ritevm_object.dir/variable.c.o CMakeFiles/ritevm_object.dir/version.c.o CMakeFiles/ritevm_object.dir/vm.c.o -L/Users/daniel/Documents/cmake-mruby/lib -L/Users/daniel/Documents/cmake-mruby/mrblib 
Undefined symbols for architecture x86_64:
  "_mrb_init_mrblib", referenced from:
      _mrb_init_core in init.c.o
  "_mrb_compile_string", referenced from:
      _main in minimain.c.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[3]: *** [lib/libritevm.dylib] Error 1
make[2]: *** [src/CMakeFiles/ritevm.dir/all] Error 2
make[1]: *** [src/CMakeFiles/ritevm.dir/rule] Error 2
make: *** [ritevm] Error 2

And a last note: make ritevm_static on the other side works also without error.

I'm not getting it yet, but I'm also new to cmake.

bovi commented May 4, 2012

Hi,

I just took your latest version and started a fresh make with VERBOSE. The compile fails at the linking of mrbc:

[ 88%] Built target ritevm_static
make -f tools/mrbc/CMakeFiles/mrbc.dir/build.make tools/mrbc/CMakeFiles/mrbc.dir/depend
cd /Users/daniel/Documents/cmake-mruby/build && /usr/local/Cellar/cmake/2.8.8/bin/cmake -E cmake_depends "Unix Makefiles" /Users/daniel/Documents/cmake-mruby /Users/daniel/Documents/cmake-mruby/tools/mrbc /Users/daniel/Documents/cmake-mruby/build /Users/daniel/Documents/cmake-mruby/build/tools/mrbc /Users/daniel/Documents/cmake-mruby/build/tools/mrbc/CMakeFiles/mrbc.dir/DependInfo.cmake --color=
Dependee "/Users/daniel/Documents/cmake-mruby/build/tools/mrbc/CMakeFiles/mrbc.dir/DependInfo.cmake" is newer than depender "/Users/daniel/Documents/cmake-mruby/build/tools/mrbc/CMakeFiles/mrbc.dir/depend.internal".
Dependee "/Users/daniel/Documents/cmake-mruby/build/tools/mrbc/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/Users/daniel/Documents/cmake-mruby/build/tools/mrbc/CMakeFiles/mrbc.dir/depend.internal".
Scanning dependencies of target mrbc
make -f tools/mrbc/CMakeFiles/mrbc.dir/build.make tools/mrbc/CMakeFiles/mrbc.dir/build
/usr/local/Cellar/cmake/2.8.8/bin/cmake -E cmake_progress_report /Users/daniel/Documents/cmake-mruby/build/CMakeFiles 1
[ 90%] Building C object tools/mrbc/CMakeFiles/mrbc.dir/mrbc.c.o
cd /Users/daniel/Documents/cmake-mruby/build/tools/mrbc && /usr/bin/gcc   -O2 -g -I/Users/daniel/Documents/cmake-mruby/include -I/Users/daniel/Documents/cmake-mruby/src    -o CMakeFiles/mrbc.dir/mrbc.c.o   -c /Users/daniel/Documents/cmake-mruby/tools/mrbc/mrbc.c
Linking C executable mrbc
cd /Users/daniel/Documents/cmake-mruby/build/tools/mrbc && /usr/local/Cellar/cmake/2.8.8/bin/cmake -E cmake_link_script CMakeFiles/mrbc.dir/link.txt --verbose=1
/usr/bin/gcc  -O2 -g -Wl,-search_paths_first -Wl,-headerpad_max_install_names   CMakeFiles/mrbc.dir/mrbc.c.o  -o mrbc  -L/Users/daniel/Documents/cmake-mruby/lib -L/Users/daniel/Documents/cmake-mruby/mrblib ../../lib/libritevm_static.a -lm 
Undefined symbols for architecture x86_64:
  "_mrb_parse_file", referenced from:
      _main in mrbc.c.o
  "_parser_dump", referenced from:
      _main in mrbc.c.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [tools/mrbc/mrbc] Error 1
make[1]: *** [tools/mrbc/CMakeFiles/mrbc.dir/all] Error 2
make: *** [all] Error 2

On the other side

make ritevm_object

compiles. But make ritevm also breaks during linking of "libritevm.dylib":

[100%] Built target ritevm_object
make -f src/CMakeFiles/ritevm.dir/build.make src/CMakeFiles/ritevm.dir/depend
cd /Users/daniel/Documents/cmake-mruby/build && /usr/local/Cellar/cmake/2.8.8/bin/cmake -E cmake_depends "Unix Makefiles" /Users/daniel/Documents/cmake-mruby /Users/daniel/Documents/cmake-mruby/src /Users/daniel/Documents/cmake-mruby/build /Users/daniel/Documents/cmake-mruby/build/src /Users/daniel/Documents/cmake-mruby/build/src/CMakeFiles/ritevm.dir/DependInfo.cmake --color=
make -f src/CMakeFiles/ritevm.dir/build.make src/CMakeFiles/ritevm.dir/build
Linking C shared library ../lib/libritevm.dylib
cd /Users/daniel/Documents/cmake-mruby/build/src && /usr/local/Cellar/cmake/2.8.8/bin/cmake -E cmake_link_script CMakeFiles/ritevm.dir/link.txt --verbose=1
/usr/bin/gcc  -O2 -g -dynamiclib -Wl,-headerpad_max_install_names   -o ../lib/libritevm.dylib -install_name /Users/daniel/Documents/cmake-mruby/build/lib/libritevm.dylib CMakeFiles/ritevm_object.dir/array.c.o CMakeFiles/ritevm_object.dir/ascii.c.o CMakeFiles/ritevm_object.dir/cdump.c.o CMakeFiles/ritevm_object.dir/class.c.o CMakeFiles/ritevm_object.dir/codegen.c.o CMakeFiles/ritevm_object.dir/compar.c.o CMakeFiles/ritevm_object.dir/crc.c.o CMakeFiles/ritevm_object.dir/dump.c.o CMakeFiles/ritevm_object.dir/encoding.c.o CMakeFiles/ritevm_object.dir/enum.c.o CMakeFiles/ritevm_object.dir/error.c.o CMakeFiles/ritevm_object.dir/etc.c.o CMakeFiles/ritevm_object.dir/gc.c.o CMakeFiles/ritevm_object.dir/hash.c.o CMakeFiles/ritevm_object.dir/init.c.o CMakeFiles/ritevm_object.dir/init_ext.c.o CMakeFiles/ritevm_object.dir/kernel.c.o CMakeFiles/ritevm_object.dir/load.c.o CMakeFiles/ritevm_object.dir/minimain.c.o CMakeFiles/ritevm_object.dir/numeric.c.o CMakeFiles/ritevm_object.dir/object.c.o CMakeFiles/ritevm_object.dir/pool.c.o CMakeFiles/ritevm_object.dir/print.c.o CMakeFiles/ritevm_object.dir/proc.c.o CMakeFiles/ritevm_object.dir/range.c.o CMakeFiles/ritevm_object.dir/re.c.o CMakeFiles/ritevm_object.dir/regcomp.c.o CMakeFiles/ritevm_object.dir/regenc.c.o CMakeFiles/ritevm_object.dir/regerror.c.o CMakeFiles/ritevm_object.dir/regexec.c.o CMakeFiles/ritevm_object.dir/regparse.c.o CMakeFiles/ritevm_object.dir/sprintf.c.o CMakeFiles/ritevm_object.dir/st.c.o CMakeFiles/ritevm_object.dir/state.c.o CMakeFiles/ritevm_object.dir/string.c.o CMakeFiles/ritevm_object.dir/struct.c.o CMakeFiles/ritevm_object.dir/symbol.c.o CMakeFiles/ritevm_object.dir/transcode.c.o CMakeFiles/ritevm_object.dir/unicode.c.o CMakeFiles/ritevm_object.dir/us_ascii.c.o CMakeFiles/ritevm_object.dir/utf_8.c.o CMakeFiles/ritevm_object.dir/variable.c.o CMakeFiles/ritevm_object.dir/version.c.o CMakeFiles/ritevm_object.dir/vm.c.o -L/Users/daniel/Documents/cmake-mruby/lib -L/Users/daniel/Documents/cmake-mruby/mrblib 
Undefined symbols for architecture x86_64:
  "_mrb_init_mrblib", referenced from:
      _mrb_init_core in init.c.o
  "_mrb_compile_string", referenced from:
      _main in minimain.c.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[3]: *** [lib/libritevm.dylib] Error 1
make[2]: *** [src/CMakeFiles/ritevm.dir/all] Error 2
make[1]: *** [src/CMakeFiles/ritevm.dir/rule] Error 2
make: *** [ritevm] Error 2

And a last note: make ritevm_static on the other side works also without error.

I'm not getting it yet, but I'm also new to cmake.

@bovi

This comment has been minimized.

Show comment Hide comment
@bovi

bovi May 5, 2012

This is running now thanks to Jon's Fix in Issue #3

bovi commented May 5, 2012

This is running now thanks to Jon's Fix in Issue #3

@bovi bovi closed this May 5, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment