jupyter-xeus / xeus-r

Jupyter kernel for the R programming language
Other
42 stars 5 forks source link

pin nlohmann_json to 3.11.2 #82

Closed romainfrancois closed 4 months ago

romainfrancois commented 4 months ago

I don't understand what happens in the ubuntu case

The logs of the install mamba action show that R 4.3.1 is installed:

    r-base                     4.3.1         h93585b2_6           conda-forge

and so is the follow up r checks action I added for good measure:

Run Rscript -e ".libPaths()"
[1] "/home/runner/micromamba-root/envs/xeus-r/lib/R/library"
R version 4.3.1 (2023-06-16) -- "Beagle Scouts"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-conda-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
[https://www.gnu.org/licenses/.](https://www.gnu.org/licenses/)

But then, in the test action, we get all sorts of errors, and a mismatch of version:

---------------------------- Captured stdout setup -----------------------------

R version 4.4.0 (2024-04-24) -- "Puppy Cup"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

---------------------------- Captured stderr setup -----------------------------
During startup - Warning messages:
1: package ‘utils’ in options("defaultPackages") was not found 
2: package ‘stats’ in options("defaultPackages") was not found 
Error in system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE) : 
  3 arguments passed to .Internal(system) which requires 4
Fatal error: unable to initialize the JIT

Any hint @SylvainCorlay @JohanMabille ?

The idea here was to have a version that worked on unix before tackling windows issues in #83

SylvainCorlay commented 4 months ago

@romainfrancois please pin down xeus to 3.x (and avoid 4.x for now).

romainfrancois commented 4 months ago

I tried that initially but was facing linker errors. I'll try harder. What is the best/simplest example of xeus 3.x based kernel implementation for me to take inspiration on ?

SylvainCorlay commented 4 months ago

All current kernels are on xeus 3.x.

romainfrancois commented 4 months ago

I'm now back to these errors, both locally and on gh actions:

Undefined symbols for architecture arm64:
  "xeus::make_null_debugger(xeus::xcontext&, xeus::xconfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::__1::vector<unsigned char, std::__1::allocator<unsigned char>>, void> const&)", referenced from:
      _main in main.cpp.o
  "xeus::make_xserver_shell_main(xeus::xcontext&, xeus::xconfiguration const&, nlohmann::json_abi_v3_11_3::detail::error_handler_t)", referenced from:
      _main in main.cpp.o
  "xeus::xkernel::xkernel(xeus::xconfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::unique_ptr<xeus::xcontext, std::__1::default_delete<xeus::xcontext>>, std::__1::unique_ptr<xeus::xinterpreter, std::__1::default_delete<xeus::xinterpreter>>, std::__1::unique_ptr<xeus::xserver, std::__1::default_delete<xeus::xserver>> (*)(xeus::xcontext&, xeus::xconfiguration const&, nlohmann::json_abi_v3_11_3::detail::error_handler_t), std::__1::unique_ptr<xeus::xhistory_manager, std::__1::default_delete<xeus::xhistory_manager>>, std::__1::unique_ptr<xeus::xlogger, std::__1::default_delete<xeus::xlogger>>, std::__1::unique_ptr<xeus::xdebugger, std::__1::default_delete<xeus::xdebugger>> (*)(xeus::xcontext&, xeus::xconfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::__1::vector<unsigned char, std::__1::allocator<unsigned char>>, void> const&), nlohmann::json_abi_v3_11_3::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::__1::vector<unsigned char, std::__1::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::error_handler_t)", referenced from:
      _main in main.cpp.o
  "xeus::xkernel::xkernel(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::unique_ptr<xeus::xcontext, std::__1::default_delete<xeus::xcontext>>, std::__1::unique_ptr<xeus::xinterpreter, std::__1::default_delete<xeus::xinterpreter>>, std::__1::unique_ptr<xeus::xserver, std::__1::default_delete<xeus::xserver>> (*)(xeus::xcontext&, xeus::xconfiguration const&, nlohmann::json_abi_v3_11_3::detail::error_handler_t), std::__1::unique_ptr<xeus::xhistory_manager, std::__1::default_delete<xeus::xhistory_manager>>, std::__1::unique_ptr<xeus::xlogger, std::__1::default_delete<xeus::xlogger>>, std::__1::unique_ptr<xeus::xdebugger, std::__1::default_delete<xeus::xdebugger>> (*)(xeus::xcontext&, xeus::xconfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::__1::vector<unsigned char, std::__1::allocator<unsigned char>>, void> const&), nlohmann::json_abi_v3_11_3::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::__1::vector<unsigned char, std::__1::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::error_handler_t)", referenced from:
      _main in main.cpp.o
ld: symbol(s) not found for architecture arm64
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/xr.dir/build.make:107: xr] Error 1
make[1]: *** [CMakeFiles/Makefile2:142: CMakeFiles/xr.dir/all] Error 2
make: *** [Makefile:139: all] Error 2
make[2]: Leaving directory '/Users/runner/work/xeus-r/xeus-r/bld'
make[1]: Leaving directory '/Users/runner/work/xeus-r/xeus-r/bld'
romainfrancois commented 4 months ago

btw, I'm gettting similar noise when trying to compile xeus-python from source against xeus 3.1.5 + xeus-zmq 1.2.0 :

[....]
[100%] Linking CXX executable xpython
Undefined symbols for architecture arm64:
  "xeus::make_xserver_shell_main(xeus::xcontext&, xeus::xconfiguration const&, nlohmann::json_abi_v3_11_3::detail::error_handler_t)", referenced from:
      _main in main.cpp.o
  "xeus::xkernel::xkernel(xeus::xconfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::unique_ptr<xeus::xcontext, std::__1::default_delete<xeus::xcontext> >, std::__1::unique_ptr<xeus::xinterpreter, std::__1::default_delete<xeus::xinterpreter> >, std::__1::unique_ptr<xeus::xserver, std::__1::default_delete<xeus::xserver> > (*)(xeus::xcontext&, xeus::xconfiguration const&, nlohmann::json_abi_v3_11_3::detail::error_handler_t), std::__1::unique_ptr<xeus::xhistory_manager, std::__1::default_delete<xeus::xhistory_manager> >, std::__1::unique_ptr<xeus::xlogger, std::__1::default_delete<xeus::xlogger> >, std::__1::unique_ptr<xeus::xdebugger, std::__1::default_delete<xeus::xdebugger> > (*)(xeus::xcontext&, xeus::xconfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, nlohmann::json_abi_v3_11_3::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, void> const&), nlohmann::json_abi_v3_11_3::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::error_handler_t)", referenced from:
      _main in main.cpp.o
  "xeus::xkernel::xkernel(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::unique_ptr<xeus::xcontext, std::__1::default_delete<xeus::xcontext> >, std::__1::unique_ptr<xeus::xinterpreter, std::__1::default_delete<xeus::xinterpreter> >, std::__1::unique_ptr<xeus::xserver, std::__1::default_delete<xeus::xserver> > (*)(xeus::xcontext&, xeus::xconfiguration const&, nlohmann::json_abi_v3_11_3::detail::error_handler_t), std::__1::unique_ptr<xeus::xhistory_manager, std::__1::default_delete<xeus::xhistory_manager> >, std::__1::unique_ptr<xeus::xlogger, std::__1::default_delete<xeus::xlogger> >, std::__1::unique_ptr<xeus::xdebugger, std::__1::default_delete<xeus::xdebugger> > (*)(xeus::xcontext&, xeus::xconfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, nlohmann::json_abi_v3_11_3::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, void> const&), nlohmann::json_abi_v3_11_3::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::error_handler_t)", referenced from:
      _main in main.cpp.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [xpython] Error 1
make[1]: *** [CMakeFiles/xpython.dir/all] Error 2
make: *** [all] Error 2
romainfrancois commented 4 months ago

Thanks for the help @JohanMabille, with `nlohmann_json 3.11.2, xeus 3.0.5 and xeus-zmq 1.0.3, I'm back at a ✅ at least on macos.

I don't understand the problem in ubuntu, and esp why when running the tests, it appears to be using R 4.4.0 when the version is otherwise pinned to 4.3.1 .... https://github.com/jupyter-xeus/xeus-r/actions/runs/9265852697/job/25488777722?pr=82#step:8:94

But at least this is no longer blocking and I can move on to #83