cross-compiling

rust compile x86 library on x86_64 machine

穿精又带淫゛_ 提交于 2021-02-19 09:45:29
问题 I have ubuntu x86_64 container and cargo build goes well. But i need to build x86 library version too. As far as I understand i need to add i686 toolchain and target. rustup target add i686-unknown-linux-gnu done successful rustup toolchain install stable-i686-unknown-linux-gnu finished with error $ rustup toolchain install stable-i686-unknown-linux-gnu info: syncing channel updates for 'stable-i686-unknown-linux-gnu' info: latest update on 2018-11-08, rust version 1.30.1 (1433507eb 2018-11

How to build a swift executable for Linux on macOS

混江龙づ霸主 提交于 2021-02-18 22:28:08
问题 I am trying to build a swift executable on my MacBook for my Linux vServer. I already tried using swiftc -target "x86_64-linux test.swift , but my macOS swift compiler shows this error: <unknown>:0: error: unable to load standard library for target 'x86_64--linux' So I looked around and found this question: Swift on OS X compiling for Linux? and tried out this example script from apple to setup a cross-platform toolchain. After trying to build a module like shown in the example text of the

How to build a swift executable for Linux on macOS

你。 提交于 2021-02-18 22:28:06
问题 I am trying to build a swift executable on my MacBook for my Linux vServer. I already tried using swiftc -target "x86_64-linux test.swift , but my macOS swift compiler shows this error: <unknown>:0: error: unable to load standard library for target 'x86_64--linux' So I looked around and found this question: Swift on OS X compiling for Linux? and tried out this example script from apple to setup a cross-platform toolchain. After trying to build a module like shown in the example text of the

cross-compile for ARM64, understanding make TARGET=aarch64

眉间皱痕 提交于 2021-02-11 15:59:05
问题 I'm trying to cross-compile a library for ARM64, I'm using Ubuntu 18.04 x86_64 host system for a build and the way I'm doing the cross-compile as sudo apt-get update sudo apt-get install crossbuild-essential-arm64 and do the make make -j 4 TARGET=aarch64 wonder what a compiler is invoked? Is it possible to set the latest gcc from ARM? FYI. I'm trying to follow TensorFlow cross-compile for ARM64 and set the latest GNU Toolchain for ARM64. 来源: https://stackoverflow.com/questions/62139412/cross

Failed to cross-compile library from Windows to Android

◇◆丶佛笑我妖孽 提交于 2021-02-11 07:13:13
问题 I'm trying to cross-compile a Rust library to 4 Android targets (i386, x86_64, armv7, and aarch64) from Windows. I have set up Android NDK toolchain for these targets and tried to compile my library with help of this tutorial. I think I've set up the toolchain correctly, and I'm able to successfully execute aarch64-linux-android-clang in the terminal. Build log: cargo build --target aarch64-linux-android --release --verbose Fresh cc v1.0.28 Fresh autocfg v0.1.1 Fresh version_check v0.1.5

Failed to cross-compile library from Windows to Android

别等时光非礼了梦想. 提交于 2021-02-11 07:10:51
问题 I'm trying to cross-compile a Rust library to 4 Android targets (i386, x86_64, armv7, and aarch64) from Windows. I have set up Android NDK toolchain for these targets and tried to compile my library with help of this tutorial. I think I've set up the toolchain correctly, and I'm able to successfully execute aarch64-linux-android-clang in the terminal. Build log: cargo build --target aarch64-linux-android --release --verbose Fresh cc v1.0.28 Fresh autocfg v0.1.1 Fresh version_check v0.1.5

Failed to cross-compile library from Windows to Android

爷,独闯天下 提交于 2021-02-11 07:09:22
问题 I'm trying to cross-compile a Rust library to 4 Android targets (i386, x86_64, armv7, and aarch64) from Windows. I have set up Android NDK toolchain for these targets and tried to compile my library with help of this tutorial. I think I've set up the toolchain correctly, and I'm able to successfully execute aarch64-linux-android-clang in the terminal. Build log: cargo build --target aarch64-linux-android --release --verbose Fresh cc v1.0.28 Fresh autocfg v0.1.1 Fresh version_check v0.1.5

Getting warning “include location '/usr/local/include' is unsafe for cross-compilation” every time I try to compile using `clang -Weverything`

泪湿孤枕 提交于 2021-02-10 14:19:41
问题 Apologies if this question isn't clear, I'm struggling to even start debugging this issue. I'm on macOS and I'm now getting the following error / warning every time I compile C programs using clang with -Weverything and -Werror flags: error: include location '/usr/local/include' is unsafe for cross-compilation [-Werror,-Wpoison-system-directories] Initially I thought this was an issue related to my code, but I discovered that this error now occurs with every program I try to compile. I've

Can I use CMAKE_SYSTEM_PROCESSOR, defined in a toolchain file, in CMakeLists?

隐身守侯 提交于 2021-02-10 12:12:21
问题 I'd like to add Raspberry Pi as a cross compilation target to a C++ project which uses CMake. Following the accepted answer to this question, I've set up the environment successfully. The project has many build targets already, all of them defined in the main CMakeLists.txt in a quite ugly way (it's an old project). In this file, there are some compiler flags set, depending on the CMAKE_SYSTEM_PROCESSOR variable, for example: if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm") # do something endif

Can I use CMAKE_SYSTEM_PROCESSOR, defined in a toolchain file, in CMakeLists?

江枫思渺然 提交于 2021-02-10 12:12:02
问题 I'd like to add Raspberry Pi as a cross compilation target to a C++ project which uses CMake. Following the accepted answer to this question, I've set up the environment successfully. The project has many build targets already, all of them defined in the main CMakeLists.txt in a quite ugly way (it's an old project). In this file, there are some compiler flags set, depending on the CMAKE_SYSTEM_PROCESSOR variable, for example: if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm") # do something endif