# Installing root on raspberry pi 3

**URL:** <https://root-forum.cern.ch/t/installing-root-on-raspberry-pi-3/62633>\
**Category:** Newbie\
**Created:** [January 10, 2025, 12:08pm UTC](https://root-forum.cern.ch/t/installing-root-on-raspberry-pi-3/62633 "2025-01-10T12:08:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![amestvir](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/dc4da7/32.png) [@amestvir](https://root-forum.cern.ch/u/amestvir)\
**Post date:** [January 10, 2025, 12:08pm UTC](https://root-forum.cern.ch/t/installing-root-on-raspberry-pi-3/62633/1 "2025-01-10T12:08:29Z")

</div>

I am trying to install 6 (versions 6.32.06, 6.34.02) Followed to the instructions here [https://root.cern/install/dependencies/](https://root.cern/install/dependencies/) to install the dependencies

Always getting error during linking stake of llvm

```auto
[22%] Built target obj.llvm-tblgen
[22%] Linking CXX executable ../../bin/llvm-tblgen
/usr/bin/ld: CMakeFiles/obj.llvm-tblgen.dir/TableGen.cpp.o: in function `(anonymous namespace)::LLVMTableGenMain(llvm::raw_ostream&, llvm::RecordKeeper&)':
TableGen.cpp:(.text._ZN12_GLOBAL__N_116LLVMTableGenMainERN4llvm11raw_ostreamERNS0_12RecordKeeperE+0x110): undefined reference to `llvm::EmitGlobalISel(llvm::RecordKeeper&, llvm::raw_ostream&)'
collect2: error: ld returned 1 exit status
make[2]: *** [interpreter/llvm-project/llvm/utils/TableGen/CMakeFiles/llvm-tblgen.dir/build.make:202: interpreter/llvm-project/llvm/bin/llvm-tblgen] Error 1
make[1]: *** [CMakeFiles/Makefile2:9003: interpreter/llvm-project/llvm/utils/TableGen/CMakeFiles/llvm-tblgen.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

```

I just need to run the root to make TTree on fly, when raspberry pi will be connected to CAEN V1720 in stand alone mode. Searched the net, did not find any working recommendation.  
In one place someone even recommended to remove that anonymous namespace

Do I miss some library? Or is there any fix?

I tried normal config line this

```auto
    mkdir <builddir>
        cd <builddir>
        cmake ../root -DCMAKE_INSTALL_PREFIX=<prefix> -Dgnuinstall=ON 
        cmake --build . [or simply "make -j<N>" on Unix systems]
        cmake --build . --target install [or simply "make install" on Unix systems]

```

or minimal one, like this

```auto
cmake ../root -DCMAKE_INSTALL_PREFIX=/usr/local -Dgnuinstall=ON \ -DCMAKE_SHARED_LINKER_FLAGS=’-latomic’ \   
-Dxrootd=OFF \          
-Dxml=OFF \
-Dxft=OFF \ 
-Dtable=OFF \  
-Dssl=OFF \ 
-Dsrp=OFF \
-Dsqlite=OFF \ 
-Dshadowpw=OFF \               
-Dsapdb=OFF \            
-Drfio=OFF \        
-Droofit=OFF \
-Dqtgsi=OFF \       
-Dpythia8=OFF \         
-Dpythia6=OFF \          
-Dpgsql=OFF \ 
-Doracle=OFF \    
-Dopengl=OFF \    
-Dodbc=OFF \   
-Dmysql=OFF \         
-Dmonalisa=OFF \         
-Dminuit2=OFF \  
-Dminimal=ON \     
-Dmathmore=OFF \                
-Dldap=OFF \   
-Dkrb5=OFF \  
-Dimt=OFF \
-Dhdfs=OFF \
-Dgviz=OFF \  
-Dglite=OFF \ 
-Dgfal=OFF \  
-Dgenvector=OFF \                 
-Dfitsio=OFF \         
-Dfftw3=OFF \
-Ddcache=OFF \              
-Dcastor=OFF \
-Dbuiltin_glew=OFF \
-Dbuiltin_ftgl=ON \
-Dbuiltin_freetype=OFF \           
-Dbuiltin_afterimage=OFF \  
-Dbonjour=OFF \       
-Dastiff=OFF \    
-Dasimage=OFF \          
-Dalien=OFF \          
-Dtvma=OFF \
-Dbuiltin_davix=OFF

```

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [January 10, 2025, 12:26pm UTC](https://root-forum.cern.ch/t/installing-root-on-raspberry-pi-3/62633/2 "2025-01-10T12:26:08Z")

</div>

I don’t know if someone already built the latest ROOT version on raspberry. Anyway, since it is a problem with `llvm-tblgen`, maybe @vvassilev has an idea

---

<div class="post-metadata">

**Author:** ![vvassilev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/v/f0a364/32.png) [@vvassilev](https://root-forum.cern.ch/u/vvassilev)\
**Post date:** [January 10, 2025, 12:56pm UTC](https://root-forum.cern.ch/t/installing-root-on-raspberry-pi-3/62633/3 "2025-01-10T12:56:29Z")

</div>

Does running make with -j1 help? You might be running out of memory.

---

<div class="post-metadata">

**Author:** ![amestvir](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/dc4da7/32.png) [@amestvir](https://root-forum.cern.ch/u/amestvir)\
**Post date:** [January 10, 2025, 1:01pm UTC](https://root-forum.cern.ch/t/installing-root-on-raspberry-pi-3/62633/4 "2025-01-10T13:01:51Z")

</div>

Nope

`make -j1`

and

```auto
 Linking CXX executable ../../bin/llvm-tblgen
/usr/bin/ld: CMakeFiles/obj.llvm-tblgen.dir/TableGen.cpp.o: in function `(anonymous namespace)::LLVMTableGenMain(llvm::raw_ostream&, llvm::RecordKeeper&)':
TableGen.cpp:(.text._ZN12_GLOBAL__N_116LLVMTableGenMainERN4llvm11raw_ostreamERNS0_12RecordKeeperE+0x110): undefined reference to `llvm::EmitGlobalISel(llvm::RecordKeeper&, llvm::raw_ostream&)'
collect2: error: ld returned 1 exit status
make[2]: *** [interpreter/llvm-project/llvm/utils/TableGen/CMakeFiles/llvm-tblgen.dir/build.make:202: interpreter/llvm-project/llvm/bin/llvm-tblgen] Error 1
make[1]: *** [CMakeFiles/Makefile2:9003: interpreter/llvm-project/llvm/utils/TableGen/CMakeFiles/llvm-tblgen.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

```

What undefined reference during linking has to do with running out of memory ?

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [January 10, 2025, 7:32pm UTC](https://root-forum.cern.ch/t/installing-root-on-raspberry-pi-3/62633/5 "2025-01-10T19:32:12Z")

</div>

> [@amestvir](#):
>
> What undefined reference during linking has to do with running out of memory ?

One of the compilation (generation of a `.o` file) may have failed (stopped due to being out of memory) but left an empty (or near empty) `.o` file (so it is not being regenerated)

---

<div class="post-metadata">

**Author:** ![amestvir](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/dc4da7/32.png) [@amestvir](https://root-forum.cern.ch/u/amestvir)\
**Post date:** [January 11, 2025, 6:39am UTC](https://root-forum.cern.ch/t/installing-root-on-raspberry-pi-3/62633/6 "2025-01-11T06:39:48Z")

</div>

Thanks for your input @vvassilev and @pcanal. Case is exactly the same as @pcanal describes - GlobalISelEmitter.cpp.o never compiles. If run make without -j1 pi3 becomes completely unresponsive , when it to compile this file, when I run with -j1, slows down drastically.

Usually I run root compilation during the night and that is why I never noticed this fact. Will try to replace RPI3 with RPI4 and let see. Thank you

---

<div class="post-metadata">

**Author:** ![amestvir](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/dc4da7/32.png) [@amestvir](https://root-forum.cern.ch/u/amestvir)\
**Post date:** [January 11, 2025, 7:32am UTC](https://root-forum.cern.ch/t/installing-root-on-raspberry-pi-3/62633/7 "2025-01-11T07:32:13Z")

</div>

Here is some “workaround” for this my problem (in case someone else will need). What I was doing after compilation was crashing, is

```auto
make clean

```

and then make or make -j1. Now I just found aforementioned file

```auto
GlobalISelEmitter.cpp.o 

```

and just deleted it, then I rebooted PI and run make (accidentally , without -j1 option) and voila

```auto
[21%] Building CXX object interpreter/llvm-project/llvm/utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/CTagsEmitter.cpp.o
[22%] Built target obj.llvm-tblgen
[22%] Linking CXX executable ../../bin/llvm-tblgen
[22%] Built target llvm-tblgen

```

Thanks for the clue and your help
