Problem to run a code script on a newly installed ROOT instance


ROOT Version: 6.36.04
Platform: linuxx8664gcc
Compiler: c++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0


I installed Root last week for an drift chamber experiment in our lab cours.

ROOT works: I can start Root and open a new TBrowser to see my data.

To analyse our data further we got an code script. This is named analysis.C .

We should use a makefile to compile the code script.
```

make

```
(After that we should start running the code with

```

./analysis run_[_].root
```

But my computer fails to compile the code script. This is the error message I’m getting:
```
make
g++ -ggdb -Wl,–no-as-needed root-config --libs --ldflags root-config --cflags analysis.C -o analysis
2025/11/20 15:51:05.286555 cmd_run.go:1420: WARNING: cannot start document portal: dial unix /run/user/1000/bus: connect: no such file or directory
fsf2025/11/20 15:51:06.241393 cmd_run.go:1420: WARNING: cannot start document portal: dial unix /run/user/1000/bus: connect: no such file or directory
/usr/bin/ld: /snap/root-framework/954/usr/local/lib/libGraf.so: undefined reference to std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_M_replace_cold(wchar_t*, unsigned long, wchar_t const*, unsigned long, unsigned long)@GLIBCXX_3.4.31' /usr/bin/ld: /snap/root-framework/954/usr/local/lib/libCore.so: undefined reference to strlcpy@GLIBC_2.38’
/usr/bin/ld: /snap/root-framework/954/usr/local/lib/libCore.so: undefined reference to arc4random_buf@GLIBC_2.36' /usr/bin/ld: /snap/root-framework/954/usr/local/lib/libCore.so: undefined reference to strlcat@GLIBC_2.38’
/usr/bin/ld: /snap/root-framework/954/usr/local/lib/libCore.so: undefined reference to __isoc23_strtoull@GLIBC_2.38' /usr/bin/ld: /snap/root-framework/954/usr/local/lib/libMathCore.so: undefined reference to __isoc23_fscanf@GLIBC_2.38’
/usr/bin/ld: /snap/root-framework/954/usr/local/lib/libCore.so: undefined reference to __isoc23_sscanf@GLIBC_2.38' /usr/bin/ld: /snap/root-framework/954/usr/local/lib/libROOTDataFrame.so: undefined reference to __isoc23_strtoul@GLIBC_2.38’
/usr/bin/ld: /snap/root-framework/954/usr/local/lib/libCore.so: undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace_cold(char*, unsigned long, char const*, unsigned long, unsigned long)@GLIBCXX_3.4.31' /usr/bin/ld: /snap/root-framework/954/usr/local/lib/libROOTVecOps.so: undefined reference to fmodf@GLIBC_2.38’
/usr/bin/ld: /snap/root-framework/954/usr/local/lib/libCore.so: undefined reference to std::ios_base_library_init()@GLIBCXX_3.4.32' /usr/bin/ld: /snap/root-framework/954/usr/local/lib/libCore.so: undefined reference to __isoc23_strtol@GLIBC_2.38’
/usr/bin/ld: /snap/root-framework/954/usr/local/lib/libCore.so: undefined reference to fmod@GLIBC_2.38' /usr/bin/ld: /snap/root-framework/954/usr/local/lib/libRIO.so: undefined reference to __isoc23_strtoll@GLIBC_2.38’
collect2: error: ld returned 1 exit status
make: *** [Makefile:2: default] Error 1
```
(Sorry for this weird error code block.)
As far as I understand Root and another programm have problems to work together properly. But I don’t know how to fix it. Maybe someone can help with this little informations.

Welcome to the ROOT Forum!
Did you try to search the Forum? For example, this topic might be related:
Sudden compiler (linking?) error