-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add "-no-pie" to CMAKE_EXE_LINKER_FLAGS for executable Standalone Linux #5653
Comments
this also works.... building
in the files
replace -no-pie with -pie
-fPIC -fPIE -no-pie creates an executable then
builds the VST3's as Shared Library and Standalones as Executable |
I think I see the magic to add this to just the standalone in cmake but need Linux which I won’t have for a few days |
-fPIE is already there in the Standalone flags.make files, without adding am testing to see if all it was missing was -no-pie and it does work
the simple solution is adding as well |
it's the gcc compiler, it has --enable-default-pie configured
|
one or all of the following...
after trying only
looks to be enough |
So to be clear: if you use Does this just get solved with editing the README and the azure pipelines script then? |
I think the fix might be, in `./CMakeLists.txt' to add
around line 38 (after the version 17 flag) but I'm really not sure what this will do to every distro out there and all their various configurations and don't know how to test it in all those build envs, which is why I am more leaning towards "README and Azure" btw |
yes, I think it is something that behaves similarly across all Linux distros, if I am reading things correctly it is a GCC issue (-pie is default) as Clang builds the executable without the switch, but I could be wrong about that the files surge/build/src/surge-xt/CMakeFiles/surge-xt_Standalone.dir/flags.make for the Standalone have -fPIE rather than -fPIC
for the Standalones to be an executable rather than a shared library, it requires -no-pie, so
or
will add -no-pie into the links.txt file that is in the same folder as the Standalones as follows:
this builds both XT and FX Standalones as an executable and the VST3's as shared libraries |
right OK so then the test is unix and not apple and gcc and not some-get-out-of-jail-ree-cmake-option set it OK lemme fire up linux and see if i can close this. |
great so if CI works on 5678 we shoud be good i added a get-out-of-jail-free override option as well in case it blows up some distro after the 1.0 release. |
Currently the Standalone for Surge XT and Surge XT FX compile as shared libraries
when adding
-fPIE -no-pie
toCMAKE_CXX_FLAGS
Surge XT and and Surge XT FX Standalones compile as executablethe advantage of the binary being executable rather than a shared library is that it can be opened by double-clicking or click -> Enter from the GUI or file manager
however, these flags appear to need to be removed from or not added to the cmake.flags for the plugins (VST, VST3, AU and LV2), which should remain shared libraries
The text was updated successfully, but these errors were encountered: