s2e-core icon indicating copy to clipboard operation
s2e-core copied to clipboard

Fix build on linux64 (non-x86_64)

Open sksat opened this issue 1 year ago • 0 comments
trafficstars

Related issues / PRs

  • #634

Description

Currently, we install the ExtLibraries/cspice by downloading pre-compiled binaries specific to each environment. However, NASA/JPL does not not provide binaries for all environments. Specifically, the PC_Linux_GCC_64bit variant is actually intended for x86_64 Linux environments. As a result, when attempting to use cspice in aarch64 Linux environment, it inadvertently installs the x86_64 version, which causes the build of S2E to fail.

To address this issue, this patch add a mechanism to build cspice from source code in non-x86_64 (but 64bit Linux) environments.

Test results

Provide the test results and a link to the detailed results log.

Impact

Make ExtLibraries/cspice usable in 64-bit Linux environments with non-x86_64 architectures, such as aarch64 Linux (e.g., Raspberry Pi OS).

Supplementary information

The NASA/JPL's original build scripts for cspice indiscriminately apply the -m64 compile option. However, within ExtLibraries/cspice, it is assumed that the C compiler used for building is installed on the target environment’s host. Therefore, there is no need for cross-compilation flags like -m64 (although it is necessary to consider such options when building SILS-S2E with C2A for the i686 architecture, in which case the entire project is built for i686 and uses the PC_Linux_GCC_32bit variant).

Moreover, compile options like -m32 and -m64 are often not implemented in compilers for architectures other than x86_64. For example, it is impossible to use -m64 on an aarch64 Linux system.

Consequently, this patch includes modifications to remove the -m64 option from the cspice original build script prior to building.

sksat avatar May 03 '24 17:05 sksat