Skip to content
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

Cannot cross compile to Linux ARM64 on Linux x86_64 #4022

Open
1 of 4 tasks
stormshield-guillaumed opened this issue Dec 22, 2023 · 0 comments
Open
1 of 4 tasks

Cannot cross compile to Linux ARM64 on Linux x86_64 #4022

stormshield-guillaumed opened this issue Dec 22, 2023 · 0 comments
Labels
Milestone

Comments

@stormshield-guillaumed
Copy link

Describe the bug

I get a compilation error when trying to build for Linux ARM64 on the linux-build-xcomp:22.04 docker image while building for Linux x86_64 works. I'm trying to build the secnetperf executable for both architecture.

Affected OS

  • Windows
  • Linux
  • macOS
  • Other (specify below)

Additional OS information

Linux Ubuntu 22.04.3 LTS 5.15.0-91-generic x86_64
Docker version 24.0.7, build afdd53b

MsQuic version

main

Steps taken to reproduce bug

  1. Run the following commands on a Linux machine with docker installed :
docker pull ghcr.io/microsoft/msquic/linux-build-xcomp:22.04
docker run -it --rm --volume "$(pwd)/bin:/work/bin" ghcr.io/microsoft/msquic/linux-build-xcomp:22.04 bash
  1. Run the following commands inside the docker container :
cd work
git clone https://github.com/microsoft/msquic.git
cd msquic
pwsh
  1. Run the following commands inside the powershell :
./scripts/prepare-machine.ps1 -ForContainerBuild
./scripts/build.ps1 -Config Release -Arch arm64 -Platform linux -DisableTools -DisableTest -Clean
  1. See the following error (truncated for brevity) :
...

In file included from ../../../../../../../submodules/openssl3/crypto/armcap.c:26:
../../../../../../../submodules/openssl3/crypto/arm_arch.h:50:6: error: #error "unsupported ARM architecture"
   50 | #    error "unsupported ARM architecture"
      |      ^~~~~

...

make[4]: *** [Makefile:3912: crypto/libcrypto-lib-armcap.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory '/work/msquic/build/linux/arm64_openssl3/_deps/opensslquic-build/submodules/openssl3'
make[3]: *** [Makefile:1406: build_libs] Error 2
make[3]: Leaving directory '/work/msquic/build/linux/arm64_openssl3/_deps/opensslquic-build/submodules/openssl3'
gmake[2]: *** [_deps/opensslquic-build/CMakeFiles/OpenSSL_Target.dir/build.make:74: _deps/opensslquic-build/openssl3/lib/libssl.a] Error 2
gmake[2]: Leaving directory '/work/msquic/build/linux/arm64_openssl3'
gmake[1]: *** [CMakeFiles/Makefile2:226: _deps/opensslquic-build/CMakeFiles/OpenSSL_Target.dir/all] Error 2
gmake[1]: Leaving directory '/work/msquic/build/linux/arm64_openssl3'
gmake: *** [Makefile:146: all] Error 2
Write-Error: /work/msquic/scripts/build.ps1:523
Line |
 523 |      CMake-Execute $Arguments
     |      ~~~~~~~~~~~~~~~~~~~~~~~~
     | [12/22/2023 12:42:21] CMake exited with status code 2

Expected behavior

The build for Linux ARM64 on the linux-build-xcomp:22.04 docker image should succeed.

Actual outcome

The build fail saying the ARM architecture is unsupported.

Additional details

No response

@nibanks nibanks added this to the Future milestone Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants