# How to solve the compilation problem of 3dslicer under the Linux system and arm64 architecture. Need help urgently!!!

**URL:** <https://discourse.slicer.org/t/how-to-solve-the-compilation-problem-of-3dslicer-under-the-linux-system-and-arm64-architecture-need-help-urgently/24251>\
**Category:** Support\
**Tags:** build\
**Created:** [July 9, 2022, 3:16pm UTC](https://discourse.slicer.org/t/how-to-solve-the-compilation-problem-of-3dslicer-under-the-linux-system-and-arm64-architecture-need-help-urgently/24251 "2022-07-09T15:16:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![wangyuyuyujun](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/wangyuyuyujun/32/15773_2.png) [@wangyuyuyujun](https://discourse.slicer.org/u/wangyuyuyujun)\
**Post date:** [July 9, 2022, 3:16pm UTC](https://discourse.slicer.org/t/how-to-solve-the-compilation-problem-of-3dslicer-under-the-linux-system-and-arm64-architecture-need-help-urgently/24251/1 "2022-07-09T15:16:38Z")

</div>

I want to install 3dslicer-5.0.2. I have installed qt5-5.13.0 and other dependencies, so I began to build 3dslicer from the source code. But when I compiled, there was an error. I found that linux-amd64 was configured after I executed the cmake command, but my computer was linux-arrch64, which led to an error when I compiled later. I don’t know whether 3dslicer can be compiled under arm64 architecture. If so, how can I modify the file so that cmake can correctly configure my computer? I hope you can help me. Thank you very much

 ![GAQ40PV%KYC0F)KV75GX](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/e/8e884bd016ac96e22268be2c9706e20a9da82d99.png)  
Uploading: @N$5YEK{([LKXQ`OHN]@GR1.png…

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 9, 2022, 3:22pm UTC](https://discourse.slicer.org/t/how-to-solve-the-compilation-problem-of-3dslicer-under-the-linux-system-and-arm64-architecture-need-help-urgently/24251/2 "2022-07-09T15:22:42Z")

</div>

We have not attempted to build Slicer on arm64, so most likely you will run into issues. The most difficult part is 3D graphics, as there is a good chance that no suitable OpenGL drivers are available for your system.

What platform are you trying to build Slicer for?

What linux distro are you trying to use? @RafaelPalomar is working on something related - see [NA-MIC Project Weeks | Website for NA-MIC Project Weeks](https://projectweek.na-mic.org/PW37_2022_Virtual/Projects/SystoleOS/)

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [July 9, 2022, 5:26pm UTC](https://discourse.slicer.org/t/how-to-solve-the-compilation-problem-of-3dslicer-under-the-linux-system-and-arm64-architecture-need-help-urgently/24251/3 "2022-07-09T17:26:43Z")

</div>

It’s been several years but maybe @adamrankin or @chir.set have experimented more with Slicer for arm64.

> [@Slicer for Ubuntu arm64](https://discourse.slicer.org/t/slicer-for-ubuntu-arm64/6459):
>
> Notes on compilation efforts for compiling Slicer for arm64: Problem: VTK does not compile. Solution: Set VTK\_OPENGL\_HAS\_EGL and VTK\_OPENGL\_HAS\_ES In \<SlicerDir\>/SuperBuild/External\_VTK.cmake remove section that has -DModule\_vtkGUISupportQtOpenGL:BOOL=ON in it Edit QVTKOpenGLNativeWidget.cxx to use QOpenGLExtraFunctions instead of QOpenGLFunctions\_3\_2\_Core Problem: CTKAPPLAUNCHER is a download of amd64 Solution: Overwrite executable \<Slicer-build\>/CTKAPPLAUNCHER/bin/CTKAppLauncher with co…

---

<div class="post-metadata">

**Author:** ![wangyuyuyujun](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/wangyuyuyujun/32/15773_2.png) [@wangyuyuyujun](https://discourse.slicer.org/u/wangyuyuyujun)\
**Post date:** [July 10, 2022, 7:00am UTC](https://discourse.slicer.org/t/how-to-solve-the-compilation-problem-of-3dslicer-under-the-linux-system-and-arm64-architecture-need-help-urgently/24251/4 "2022-07-10T07:00:24Z")

</div>

This is my machine information

 ![ZIHT_@MG}HUEG4NCDOOH(L](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/e/bea165c00cd06977b686f5e4e6416f84e7a723e7.png)  
When building slicer, the system will depend on it, but these packages are AMD64, so my computer can’t run these binaries directly. Later, I found that there was a problem in the configuration, that is, the above problem. At present, I don’t know how to proceed to the next step. Do you have any good suggestions

---

<div class="post-metadata">

**Author:** ![wangyuyuyujun](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/wangyuyuyujun/32/15773_2.png) [@wangyuyuyujun](https://discourse.slicer.org/u/wangyuyuyujun)\
**Post date:** [July 10, 2022, 7:11am UTC](https://discourse.slicer.org/t/how-to-solve-the-compilation-problem-of-3dslicer-under-the-linux-system-and-arm64-architecture-need-help-urgently/24251/6 "2022-07-10T07:11:14Z")

</div>

There is no problem with pre dependencies and OpenGL. When I execute make -j 128 compilation, the system will automatically download, configure and compile some dependencies, but these dependencies are based on AMD64 architecture. Can I manually carry out this process to adapt my machine

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 10, 2022, 12:19pm UTC](https://discourse.slicer.org/t/how-to-solve-the-compilation-problem-of-3dslicer-under-the-linux-system-and-arm64-architecture-need-help-urgently/24251/7 "2022-07-10T12:19:43Z")

</div>

All dependencies are specified in CMake files in the SuperBuild folder. You can choose to build any of them before building Slicer and then set `Slicer_USE_SYSTEM_...=ON` CMake variable when you configure Slicer. To get started, you can disable Python support in Slicer to reduce the number of dependencies that you need to deal with.

---

<div class="post-metadata">

**Author:** ![RafaelPalomar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rafaelpalomar/32/1436_2.png) [@RafaelPalomar](https://discourse.slicer.org/u/RafaelPalomar)\
**Post date:** [July 11, 2022, 12:35pm UTC](https://discourse.slicer.org/t/how-to-solve-the-compilation-problem-of-3dslicer-under-the-linux-system-and-arm64-architecture-need-help-urgently/24251/8 "2022-07-11T12:35:10Z")

</div>

@wangyuyuyujun, `i386` and `amd64` seem to be hard-coded values in [here](https://github.com/Slicer/Slicer/blob/115e32bdf8e478208fc2c75179cf2ecdb555d984/CMake/SlicerMacroGetOperatingSystemArchitectureBitness.cmake#L45-L50). For the sake of moving forward with you project I suggest that you change `amd64` by your architecture as a workaround. Making this the right way is something we would need to do for the [Systole OS project](https://projectweek.na-mic.org/PW37_2022_Virtual/Projects/SystoleOS/), but the priority on that project is to have a complete working version of Slicer for i386/amd64 first.

I hope this helps.
