System is Windows 10 Home + WSL2 (Ubuntu 22.04)
I followed instructions on root.cern/cling/cling_build_instructions/ and failed on “cmake --build .” [ 87%] Linking CXX executable …/…/…/…/bin/clang collect2: fatal error: ld terminated with signal 9 [Killed]
compilation terminated.
gmake[2]: *** [tools/clang/tools/driver/CMakeFiles/clang.dir/build.make:340: bin/clang-13] Error 1
gmake[2]: *** Deleting file ‘bin/clang-13’
gmake[1]: *** [CMakeFiles/Makefile2:36892: tools/clang/tools/driver/CMakeFiles/clang.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2
I googled around and found out this seem to mean that memory is not enough, and someone got it to work by assigning 8GB of memory to WSL2. I did the same, and verified with htop that WSL2 has 12GB memory available. Yet the same error emerged. I’m guessing the same amount of memory was available in my previous failed run.
Is my problem not enough physical memory? Or did I perhaps cause some other error? I wonder how can I rule out either possibility. Has anyone run into a similar problem before?
Oh sorry, I overlooked at your post… First, welcome to the ROOT Forum! Then, I’m not sure there is anything we can do about memory. Maybe try to reduce the number of parallel builds (i.e. make -j4 or make -j2 or even make -j1)
Just to clarify, it should be possible to build ROOT (EDIT: and therefore cling) on typical desktop resources. @Axel built ROOT on raspberry pi, and @hahnjo on RISC-V!
Hi @pundemonium, just to confirm - you are building Cling standalone, not full ROOT? Which CMAKE_BUILD_TYPE did you pass? For Debug you will need a lot of memory, at least if you are using the default ld. Do you need debug symbols?
Yes I’m building cling alone and not the full ROOT, if I understand things correctly.
I did use Debug, as you guessed. I first tried using Release but I run into the following error at 87% that I’m not equipped to tackle:
/home/shiqh/workspace/cling/src/tools/cling/lib/Interpreter/DeclUnloader.cpp: In member function ‘bool cling::DeclUnloader::VisitFunctionTemplateDecl(clang::FunctionTemplateDecl*)’:
/home/shiqh/workspace/cling/src/tools/cling/lib/Interpreter/DeclUnloader.cpp:944:55: error: ‘class clang::FunctionTemplateDecl’ has no member named ‘loaded_spec_begin’
944 | for (FunctionTemplateDecl::spec_iterator I = FTD->loaded_spec_begin(),
Then I switched to Debug to see if that gets me around the the problem. Which lead to my original post.
I think I only need the basic functionalities so any option works for me at the moment.