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

cc1: error: unknown value 'native' for '-march' during cross compiling #40

Open
kunlinyu opened this issue Dec 12, 2024 · 0 comments
Open

Comments

@kunlinyu
Copy link

kunlinyu commented Dec 12, 2024

I try to cross compile GKlib but i failed:

sudo apt install g++-aarch64-linux-gnu
git clone [email protected]:KarypisLab/GKlib.git
cd GKlib
mkdir build && cd build
cmake -DCMAKE_CROSSCOMPILING=ON DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DCMAKE_C_COMPILER=/usr/bin/aarch64-linux-gnu-gcc ..
make

then i got "cc1: error: unknown value 'native' for '-march'"

I think the issue relates to this:
https://github.com/KarypisLab/GKlib/blob/master/GKlibSystem.cmake#L41
and relates to this issue:
#22

here is my system information:

Ubuntu:~/GKlib/build (master)$ uname -a
Linux HV 6.8.0-1018-azure #21~22.04.1-Ubuntu SMP Fri Nov  8 00:21:25 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Ubuntu:~/GKlib/build (master)$ cat /etc/issue
Ubuntu 22.04 LTS \n \l

Ubuntu:~/GKlib/build (master)$ /usr/bin/aarch64-linux-gnu-gcc --version
aarch64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant