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

Cross compilation for different CPU fails #103

Open
xnoreq opened this issue Feb 24, 2019 · 3 comments
Open

Cross compilation for different CPU fails #103

xnoreq opened this issue Feb 24, 2019 · 3 comments

Comments

@xnoreq
Copy link

xnoreq commented Feb 24, 2019

Setting -march in C(XX)FLAGS to a different CPU than the host system will result in a build error:

ninja: Entering directory `/home/build/packages/fribidi-prefix/src/fribidi-build'
[1/62] Compiling C object 'gen.tab/1a55e88@@gen-unicode-version@exe/gen-unicode-version.c.obj'.
[2/62] Linking target gen.tab/gen-unicode-version.
[3/62] Generating fribidi-unicode-version.h with a meson_exe.py custom command.
[4/62] Compiling C object 'gen.tab/1a55e88@@gen-bidi-type-tab@exe/gen-bidi-type-tab.c.obj'.
[5/62] Compiling C object 'gen.tab/1a55e88@@gen-bidi-type-tab@exe/packtab.c.obj'.
[6/62] Compiling C object 'gen.tab/1a55e88@@gen-joining-type-tab@exe/packtab.c.obj'.
[7/62] Compiling C object 'gen.tab/1a55e88@@gen-joining-type-tab@exe/gen-joining-type-tab.c.obj'.
[8/62] Linking target gen.tab/gen-bidi-type-tab.
[9/62] Linking target gen.tab/gen-joining-type-tab.
[10/62] Compiling C object 'gen.tab/1a55e88@@gen-arabic-shaping-tab@exe/gen-arabic-shaping-tab.c.obj'.
[11/62] Compiling C object 'gen.tab/1a55e88@@gen-arabic-shaping-tab@exe/packtab.c.obj'.
[12/62] Linking target gen.tab/gen-arabic-shaping-tab.
[13/62] Generating gen-joining-type-tab with a meson_exe.py custom command.
FAILED: gen.tab/joining-type.tab.i
/usr/bin/meson --internal exe /home/build/packages/fribidi-prefix/src/fribidi-build/meson-private/meson_exe_gen-joining-type-tab_27f6141f6867ccd1da41b423057bf31f543bcc63.dat
[14/62] Generating gen-arabic-shaping-tab with a meson_exe.py custom command.
FAILED: gen.tab/arabic-shaping.tab.i
/usr/bin/meson --internal exe /home/build/packages/fribidi-prefix/src/fribidi-build/meson-private/meson_exe_gen-arabic-shaping-tab_f62b79f1df6ab4d3ebb04011e8001e25aaa5f206.dat
[15/62] Generating gen-bidi-type-tab with a meson_exe.py custom command.
FAILED: gen.tab/bidi-type.tab.i
/usr/bin/meson --internal exe /home/build/packages/fribidi-prefix/src/fribidi-build/meson-private/meson_exe_gen-bidi-type-tab_204a27bcdc27e46f326808dff1f7fe3309db873e.dat
ninja: build stopped: subcommand failed.

@behdad
Copy link
Collaborator

behdad commented Feb 25, 2019

I don't think that's how you are supposed to do cross-compilation. But then again, I don't know anything about meson.

@xnoreq
Copy link
Author

xnoreq commented Feb 26, 2019

I am using a meson cross-file with all the correct paths but I don't think you can specify host CFLAGS in there.
And meson seems to use env vars like CFLAGS for the build system instead of the host. Or maybe it does use them for the host too..

@vtorri
Copy link
Contributor

vtorri commented Jun 15, 2019

template :

https://github.com/vtorri/ewpi/blob/master/packages/glib2/cross_toolchain.txt

you have to replace text between @ with the correct value. I use sed for that

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

3 participants