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

Linux ARM / aarch64 support #3647

Closed
TheCycoONE opened this issue Jun 3, 2018 · 17 comments
Closed

Linux ARM / aarch64 support #3647

TheCycoONE opened this issue Jun 3, 2018 · 17 comments
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed

Comments

@TheCycoONE
Copy link
Contributor

Currently ./bootstrap-vcpkg.sh does not attempt to detect architecture, assuming x86_64 on Linux. This means that the bootstrap tools that are fetched cannot run. I see the following output in the terminal:

➜  vcpkg git:(corsixth) ./bootstrap-vcpkg.sh 
/home/stephen/github/vcpkg/scripts/bootstrap.sh: line 193: /home/stephen/github/vcpkg/downloads/tools/cmake-3.10.2-linux/cmake-3.10.2-Linux-x86_64/bin/cmake: cannot execute binary file: Exec format error
/home/stephen/github/vcpkg/scripts/bootstrap.sh: line 194: /home/stephen/github/vcpkg/downloads/tools/cmake-3.10.2-linux/cmake-3.10.2-Linux-x86_64/bin/cmake: cannot execute binary file: Exec format error
cp: cannot stat '/home/stephen/github/vcpkg/toolsrc/build.rel/vcpkg': No such file or directory

Is there interest from the project in supporting aarch64 (and maybe other architectures?)

@jarruda
Copy link
Contributor

jarruda commented Jan 21, 2019

Yes indeed there is! In particular, I started out using vcpkg for a few projects with the hope that it supported ARM to make targeting the Raspberry Pi a possibility.

At the very least, it would be desirable to note this lack of architecture support in the documentation (README or readthedocs). There is no mention of x86 dependence that I could find.

@PhoebeHui PhoebeHui added the category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed label Feb 28, 2019
@YoDaMa
Copy link

YoDaMa commented Mar 1, 2019

Our team is also very much interested in this feature! Would make deploying to devices significantly simpler.

@zweistein-frm2
Copy link

vcpkg can be build quite easily on a raspberry pi
First you must build cmake 3.14 from sources as the raspberry pi buster has 3.13 cmake only.
cmake-3.14 must be the default cmake.

Then simply:
cd /vcpkg # or where your vcpkg is
mkdir out
cd out
cmake -S /vcpkg/toolsrc -B /vcpkg/out
cd out
make
cd ..
cp out/vcpkg ./vcpkg

but then triplets have to be defined...

@meitiever
Copy link

build cmake-3.15 from source and install to /usr/bin and /usr/share
append -useSystemBinaries to command like bootstrap-vcpkg.sh -useSystemBinaries
and then vcpkg will ignore cmake downloading and building process.
this works for me and everything is all right now.

@bramburn
Copy link

@meitiever thanks steve

@raix
Copy link

raix commented Apr 14, 2020

on jetson nano ubuntu 18.04lts is using 3.10.2

@makidoll
Copy link
Contributor

makidoll commented Jul 9, 2020

On Debian 10, I have to compile CMake 3.14+ from source and -useSystemBinaries works when bootstrapping. However when I run vcpkg install it'll try to download CMake for x86_64 again.

@makidoll
Copy link
Contributor

makidoll commented Jul 9, 2020

This works for me for now

  • ./bootstrap-vcpkg.sh -useSystemBinaries
  • VCPKG_FORCE_SYSTEM_BINARIES=1 ./vcpkg install ...

@nfbyte
Copy link

nfbyte commented Jul 15, 2020

Here's how I got it working:

  • install vcpkg (you need to have zip, unzip, ninja, cmake)
./bootstrap-vcpkg.sh -useSystemBinaries
  • add the triplet ./triplets/arm64-linux.cmake:
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Linux)
  • add environment variables:
export VCPKG_DEFAULT_TRIPLET=arm64-linux
export VCPKG_FORCE_SYSTEM_BINARIES=1
  • set VCPKG_TARGET_TRIPLET=arm64-linux when using cmake:
cmake -B [build directory] -S . -DVCPKG_TARGET_TRIPLET=arm64-linux -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake

@linquize
Copy link

Please also improve #12362

@jagrme00
Copy link

jagrme00 commented Jul 24, 2020

The sudo ./bootstrap-vcpkg.sh -useSystemBinaries does not work for me on aarch64 Ubuntu 16.04.
My shell hangs up when I press return. Waiting for over a half hour does not produce any output in my shell.
Can anybody help?

@advra
Copy link

advra commented Oct 21, 2020

The sudo ./bootstrap-vcpkg.sh -useSystemBinaries does not work for me on aarch64 Ubuntu 16.04.
My shell hangs up when I press return. Waiting for over a half hour does not produce any output in my shell.
Can anybody help?

@jagrme00 I am having the same issue with Ubuntu 20.04 shell hangs and nothing happens. Did you ever figure it out?

@linquize
Copy link

@jagrme00 why sudo?

@jagrme00
Copy link

The sudo ./bootstrap-vcpkg.sh -useSystemBinaries does not work for me on aarch64 Ubuntu 16.04.
My shell hangs up when I press return. Waiting for over a half hour does not produce any output in my shell.
Can anybody help?

@jagrme00 I am having the same issue with Ubuntu 20.04 shell hangs and nothing happens. Did you ever figure it out?

@advra Unfortunately I had no time to analyze this behavior. Since I needed only a few libraries, I built them from source with CMake.

@jagrme00 why sudo?

@linquize I'm not a linux expert, but I thought it's better to try it with sudo because I don't know what commands are executed by this script. In addition I was too lazy to look inside the script. As far as I can see it shouldn't be the reason for the problem.

The device I was using was based on a NVIDIA Tegra X2. Maybe someone got it running on this platform?

@linquize
Copy link

@jagrme00
vcpkg minimum requirement is gcc 6.
Ubuntu 16.04 has only gcc 5.3, which is not supported.

@jagrme00
Copy link

@linquize Thanks for this information.

@PhoebeHui
Copy link
Contributor

Move the discussion to #17738.

namark added a commit to namark/vircadia that referenced this issue Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed
Projects
None yet
Development

No branches or pull requests