Closed cosinekitty closed 1 year ago
Oh, I wonder if it's because I disabled multilib support when I built gcc? I made it support 64-bit processors only.
no its fPIC. Hold on one second.
We need to add
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
to the CMakeLists.txt before the action. So probably before the project line right after the OSX version line.
OK over in #2 I am fixing the CMake and also put in place GitHub actions to do test builds on PRs (but still not make an installer available). Hold on - lemme merge it if linux and mac work.
Looks like I need to define my own damn pi constant for Windows, LOL.
Nah I have that fixed too. Gimme a second.
We need to define _USE_MATH_DEFINES. Xenaikos found it yesterday and I just didn't push it yet
I'll merge in a minute when all 3 build in CI.
I had to build cmake from source to get a recent enough version. I got it working on the fifth try! I also had to do some manual copying C++ runtime libraries around and ln -s
to point to them. Slightly scary stuff.
i am really surprised you had to move runtime libraries around. what distro are you on?
Anyway the merge I just did means it builds on macOS-latest, windows-2019 and ubuntu 22 out of the box (although it does a few apt gets on ubuntu first). Curious which problems you ran into?
(I'm sure theres a few more settings from surge I need to copy over but it builds now at least!)
I'm on Debian Bullseye. The reason is I built gcc 12.2.0 from source code, and I installed it under my home directory: /home/don/gcc12
. I did this to avoid wrecking my system, so I left the installed gcc Debian package intact. Then I put /home/don/gcc12/bin
at the front of my PATH. This mostly works, only it blew up when trying to build cmake. It used gcc 12 to build the code, but it tried to use the older runtime library that was still in /usr/lib/x86_64-linux-gnu
. I may have to undo this later, but I hacked things by copying the new libstdc++.so.6.0.30 over there and changed the symlink libstdc++.so.6 to point to it instead of the old .25 version. Life in the fast lane...
Oh right. Well you should probably do CXX_COMPILER=/home/don/gcc/bin cmake -B build
then but yeah if you have a system like you describe you will have to do stuff like you describe :)
sorry I mean
cmake -Bbuild -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER=/home/don/blahlbah
and that should find the compiler and linker from your custom.
(whether a daw will subsequently find the glib without a LD_LIBRARY_PATH is a separate question)
OK. In 2023 I will probably buy another development system for a garage/workshop we are building. I'm thinking of trying out Arch Linux, so that I can more easily use more recent tools. Debian is nice because it's stable, but stuff gets a bit old. I have even completed a couple of Linux From Scratch builds, which was very educational, but there is no way I would want to maintain a system that way!
Anyway, your fixes worked great... I nuked the build
directory, pulled, and rebuilt from the top. Everything finished fine. Thanks!
Great!
I ran into this trying to build. Any ideas? It's possible I screwed up my development system when I built gcc 12.2.0 from source. Let me know if you need more info...