[pbil:~/w/ocaml-r 17:12]$make
ocaml setup.ml -build
W: Field XMETAType is set but matching plugin is not enabled.
W: Field XMETAType is set but matching plugin is not enabled.
W: Cannot find source file matching module 'R_lang_parser_y' in library R_syntax
W: Cannot find source file matching module 'R_lang_parser_y' in library R_syntax
W: Cannot find source file matching module 'Standard' in library R
Finished, 1 target (0 cached) in 00:00:02.
+ ocamlfind ocamlc -g -I src -linkpkg -package calendar -cclib -L/usr/lib/R/lib -cclib -lR -cclib -lRmath -cclib -lm src/base/R_base.cma src/R.cma src/R_interpreter.cma examples/test_suite.cmo -o examples/test_suite.byte
File "_none_", line 1:
Error: Error on dynamically loaded library: ./src/dllR_stubs.so: ./src/dllR_stubs.so: undefined symbol: R_SetErrorHook
Command exited with code 2.
Compilation unsuccessful after building 171 targets (138 cached) in 00:00:33.
The reason is that the function R_SetErrorHook is now put in a location that is chopped off from main/error.c at preprocessing.
Well, this function was undocumented and marked as temporary so this is not a big surprise after all. It was handy to hook a function that was called when there is an error, and that would update two global variables. One was for the error message, the other for the sexp used for the call.
Here's where it happens. Naively, I'd think we can get both values after the call to R_tryEval:
Compilation fails with R 3.0:
The reason is that the function
R_SetErrorHook
is now put in a location that is chopped off frommain/error.c
at preprocessing.Well, this function was undocumented and marked as temporary so this is not a big surprise after all. It was handy to hook a function that was called when there is an error, and that would update two global variables. One was for the error message, the other for the sexp used for the call.
Here's where it happens. Naively, I'd think we can get both values after the call to
R_tryEval
:R_curErrorBuf
our_call
(cf code)