Macでmin-camlとmin-rt
失敗
今のバージョンのCommandLineToolsだとi386はビルドできないみたい...
以下作業ログ。
brew install ocaml
cd ~/src
git clone git@github.com:esumii/min-caml.git
cd min-caml/
./to_x86
make
ギャー
今のバージョンのCommandLineToolsだとi386はビルドできないみたい...
code:make.log
...
gcc -g -O2 -Wall -m32 test/print.s libmincaml.S stub.c -lm -o test/print
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libm.tbd, missing required architecture i386 in file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libm.tbd
Undefined symbols for architecture i386:
"___stack_chk_fail", referenced from:
_main in stub-9df694.o
"___stack_chk_guard", referenced from:
_main in stub-9df694.o
"___stderrp", referenced from:
_main in stub-9df694.o
"_atan", referenced from:
min_caml_atan in libmincaml-d42ed5.o
(maybe you meant: min_caml_atan)
"_cos", referenced from:
min_caml_cos in libmincaml-d42ed5.o
(maybe you meant: min_caml_cos)
"_fabs", referenced from:
min_caml_abs_float in libmincaml-d42ed5.o
"_floor", referenced from:
min_caml_floor in libmincaml-d42ed5.o
(maybe you meant: min_caml_floor)
"_fprintf", referenced from:
min_caml_prerr_int in libmincaml-d42ed5.o
min_caml_prerr_float in libmincaml-d42ed5.o
_main in stub-9df694.o
"_fputc", referenced from:
min_caml_prerr_byte in libmincaml-d42ed5.o
"_fwrite$UNIX2003", referenced from:
_main in stub-9df694.o
"_malloc", referenced from:
_main in stub-9df694.o
"_printf", referenced from:
min_caml_print_int in libmincaml-d42ed5.o
"_putchar", referenced from:
min_caml_print_newline in libmincaml-d42ed5.o
min_caml_print_byte in libmincaml-d42ed5.o
"_scanf", referenced from:
min_caml_read_int in libmincaml-d42ed5.o
min_caml_read_float in libmincaml-d42ed5.o
"_sin", referenced from:
min_caml_sin in libmincaml-d42ed5.o
(maybe you meant: min_caml_sin)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)