Building Sonic Pi from source on Fedora 36

So, our nonprofit has transitioned from raspberry pi’s to used MacBookAir’s this year because new raspberry pi’s are unattainable. At first we transitioned our classroom Linux build from Raspbian to Ubuntu because they both share a Debian base. However, we’ve decided to move to Fedora because it seems Canonical has stopped putting workstation builds.

After some work our Fedora build is almost identical to our Ubuntu / Raspbian build in regard to installed applications for the kids. However, we there are no Fedora rpms for Sonic Pi. I’ve been trying to build it from source for days now. Getting closer and closer as I find the proper rpm libraries that equal the Debian packages referenced in the source README file for Linux. However, I’ve reached a hurrdle I haven’t been able to overcome and my knowledge of C++ is not even at an intermediate level so I’m not sure how to resolve this if I need to dig into the code instead of just install the right libraries. And help here would be appreciated, below is what i get just as it’s fails:

[ 99%] Building CXX object gui/imgui/CMakeFiles/sonic-pi-imgui.dir/backends/imgui_impl_sdl.cpp.o
[100%] Linking CXX executable sonic-pi-imgui
/usr/bin/ld: CMakeFiles/sonic-pi-imgui.dir/main.cpp.o: in function main': main.cpp:(.text+0x36f): undefined reference to glewInit’
/usr/bin/ld: CMakeFiles/sonic-pi-imgui.dir/backends/imgui_impl_opengl3.cpp.o: in function ImGui_ImplOpenGL3_SetupRenderState(ImDrawData*, int, int, unsigned int)': imgui_impl_opengl3.cpp:(.text+0x1ed): undefined reference to __glewBlendEquation’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x3ba): undefined reference to __glewUseProgram' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x3cb): undefined reference to __glewUniform1i’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x3e1): undefined reference to __glewUniformMatrix4fv' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x411): undefined reference to __glewBindSampler’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x424): undefined reference to __glewBindVertexArray' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x432): undefined reference to __glewBindBuffer’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x448): undefined reference to __glewBindBuffer' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x45e): undefined reference to __glewEnableVertexAttribArray’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x46f): undefined reference to __glewEnableVertexAttribArray' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x480): undefined reference to __glewEnableVertexAttribArray’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x491): undefined reference to __glewVertexAttribPointer' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x4be): undefined reference to __glewVertexAttribPointer’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x4eb): undefined reference to __glewVertexAttribPointer' /usr/bin/ld: CMakeFiles/sonic-pi-imgui.dir/backends/imgui_impl_opengl3.cpp.o: in function ImGui_ImplOpenGL3_RenderDrawData(ImDrawData*)‘:
imgui_impl_opengl3.cpp:(.text+0x598): undefined reference to __glewActiveTexture' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x71c): undefined reference to __glewGenVertexArrays’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x79e): undefined reference to __glewBufferData' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x7d8): undefined reference to __glewBufferData’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0xa17): undefined reference to __glewDrawElementsBaseVertex' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0xaa4): undefined reference to __glewDeleteVertexArrays’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0xabc): undefined reference to __glewUseProgram' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0xae6): undefined reference to __glewBindSampler’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0xaf9): undefined reference to __glewActiveTexture' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0xb07): undefined reference to __glewBindVertexArray’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0xb15): undefined reference to __glewBindBuffer' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0xb28): undefined reference to __glewBlendEquationSeparate’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0xb41): undefined reference to __glewBlendFuncSeparate' /usr/bin/ld: CMakeFiles/sonic-pi-imgui.dir/backends/imgui_impl_opengl3.cpp.o: in function CheckShader(unsigned int, char const*)‘:
imgui_impl_opengl3.cpp:(.text+0xdc2): undefined reference to __glewGetShaderiv' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0xdd9): undefined reference to __glewGetShaderiv’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0xe45): undefined reference to __glewGetShaderInfoLog' /usr/bin/ld: CMakeFiles/sonic-pi-imgui.dir/backends/imgui_impl_opengl3.cpp.o: in function CheckProgram(unsigned int, char const*)‘:
imgui_impl_opengl3.cpp:(.text+0xeee): undefined reference to __glewGetProgramiv' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0xf05): undefined reference to __glewGetProgramiv’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0xf75): undefined reference to __glewGetProgramInfoLog' /usr/bin/ld: CMakeFiles/sonic-pi-imgui.dir/backends/imgui_impl_opengl3.cpp.o: in function ImGui_ImplOpenGL3_CreateDeviceObjects()‘:
imgui_impl_opengl3.cpp:(.text+0x1156): undefined reference to __glewCreateShader' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x116a): undefined reference to __glewShaderSource’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x118a): undefined reference to __glewCompileShader' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x11d5): undefined reference to __glewCreateShader’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x11e9): undefined reference to __glewShaderSource' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x1209): undefined reference to __glewCompileShader’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x1231): undefined reference to __glewCreateProgram' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x1240): undefined reference to __glewAttachShader’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x1259): undefined reference to __glewAttachShader' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x1272): undefined reference to __glewLinkProgram’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x129a): undefined reference to __glewGetUniformLocation' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x12bb): undefined reference to __glewGetUniformLocation’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x12dc): undefined reference to __glewGetAttribLocation' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x12fd): undefined reference to __glewGetAttribLocation’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x131e): undefined reference to __glewGetAttribLocation' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x133f): undefined reference to __glewGenBuffers’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x1357): undefined reference to __glewGenBuffers' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x1383): undefined reference to __glewBindBuffer’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x1396): undefined reference to __glewBindVertexArray' /usr/bin/ld: CMakeFiles/sonic-pi-imgui.dir/backends/imgui_impl_opengl3.cpp.o: in function ImGui_ImplOpenGL3_DestroyDeviceObjects()‘:
imgui_impl_opengl3.cpp:(.text+0x13b9): undefined reference to __glewDeleteBuffers' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x13e5): undefined reference to __glewDeleteBuffers’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x141b): undefined reference to __glewDetachShader' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x1448): undefined reference to __glewDetachShader’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x146b): undefined reference to __glewDeleteShader' /usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x1490): undefined reference to __glewDeleteShader’
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x14b5): undefined reference to `__glewDeleteProgram’
collect2: error: ld returned 1 exit status
gmake[2]: *** [gui/imgui/CMakeFiles/sonic-pi-imgui.dir/build.make:334: gui/imgui/sonic-pi-imgui] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:501: gui/imgui/CMakeFiles/sonic-pi-imgui.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

Hi @nashtier,

thanks so much for trying to get things working on Fedora. We definitely want to help with this if we can.

However, would it be possible to move the conversation over to a GitHub issue just so we can keep the forums focussed on user support. We prefer to do dev support over here: Issues · sonic-pi-net/sonic-pi · GitHub