sac2c issueshttps://gitlab.sac-home.org/sac-group/sac2c/-/issues2022-02-16T15:34:59Zhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/2256MacOS sysroot path is to specific, highly dependent on Xcode version2022-02-16T15:34:59ZHans-Nikolai ViessmannMacOS sysroot path is to specific, highly dependent on Xcode versionWhen compiling sac2c on MacOS, we append to `CCFLAGS` the `-isysroot` flag to the CMake variable [`CMAKE_OSX_SYSROOT`](https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_SYSROOT.html). This is needed so that when using sac2c we are a...When compiling sac2c on MacOS, we append to `CCFLAGS` the `-isysroot` flag to the CMake variable [`CMAKE_OSX_SYSROOT`](https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_SYSROOT.html). This is needed so that when using sac2c we are able to find C-libraries and other system libraries. We store `CCFLAGS` in the sac2crc files.
It is not clear to me, but for whatever reason the `CMAKE_OSX_SYSROOT` variable resolves to a path which is Xcode version specific, e.g. `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk`. This can cause problems whenever a newer version of Xcode is installed. MacOS PKG files have no notion of inter-dependency --- it is not a package manager as such.
Furthermore, if there are multiple versions of Xcode on the system, then we are totally doomed. This was experienced in Stdlib [PR 44](https://github.com/SacBase/Stdlib/pull/44).
It is not clear to me how best to resolve this, here are a few idea:
- there seems to be a generic sysroot path, of the form `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk`, but its not clear to me if this is dependable enough to rely on it.
- another is to poll for it when calling sac2c, using `xcode-select --print-path` or similar.
- as this path is encoded in the sac2crc files, we just need to update this. This could be possible as part of the [CPack productbuild process](https://cmake.org/cmake/help/git-stage/cpack_gen/productbuild.html) using the `CPACK_POSTFLIGHT_<COMP>_SCRIPT` variable to set a script which looks for the _correct_ path, and updates the sac2crc files **during** install.Hans-Nikolai ViessmannHans-Nikolai Viessmannhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/2224Slight name confusion on sac2c binaries2018-04-30T22:17:12ZRobert BerneckySlight name confusion on sac2c binariesThe DEBUG version of sac2c is called sac2c_d. This is good.
The RELEASE version of sac2c is called sac2c_p. This is bad. Presumably, it
meant PRODUCTION in the bad old days...
If we rename the RELEASE version to be sac2c_r, the name wil...The DEBUG version of sac2c is called sac2c_d. This is good.
The RELEASE version of sac2c is called sac2c_p. This is bad. Presumably, it
meant PRODUCTION in the bad old days...
If we rename the RELEASE version to be sac2c_r, the name will make more sense.