Comments (9)
cmake tells users how to set the compiler if it doesnt find it
CMake Error at CMakeLists.txt:92 (project):
The CMAKE_C_COMPILER:
arm-linux-gnueabihf-gcc
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:92 (project):
No CMAKE_ASM_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
from box86.
THis bit is crucial for arm64 build, for it to be plug'n play.
from box86.
Same here but I can't compile without patching your thing
from box86.
Not every GCC compiler has the same triple name.
The one I'm compiling uses armv7h-linux-gnueabihf, now I have to patch so that I can build.
Is it too much to ask from people to adhere to standards instead of hardcoding stuff in?
This is the same with what I experienced with X11 libs, most of them have hard coded paths (look here https://github.com/BredOS/multilib-pkgbuilds, under patches/).
This is how cross compilation should be done
https://github.com/BredOS/multilib-pkgbuilds/blob/main/patches%2Flib32-llvm.patch#L32
Atleast do checks first. Cmake supports those.
User defined Cc CXX should be respected at all costs.
from box86.
but those patch are Arch OS specific. The point is to have box86 buildable everywhere. Currently, most machine still use debian based OS (Debian, Ubuntu, Armbian), and this works perfectly, without the need to use a shell script. Note that this is not really cross-compiling, it' build on the devices directly.
If you find a solution to make this parametrable without breaking debian compatibility, I'm all hears.
Last time I tried, cmake was not not happy and needed the settings of the C compiler very early in the CMake Script, but maybe there is a simpler way?
from box86.
set(COMPILER_TRIPLE arm-linux-gnueabihf-gcc)
find_program(COMPILER_FOUND ${COMPILER_TRIPLE})
if(COMPILER_FOUND)
set(CMAKE_C_COMPILER ${COMPILER_FOUND})
else()
message(STATUS "Cross compiler ${COMPILER_TRIPLE} not found, using CC or -DCMAKE_C_COMPILER")
endif()
Edit: this is the actual fix
from box86.
Ok, looks good to me.
Out of curiosity, is set(COMPILER_TRIPLE arm-linux-gnueabihf-gcc) overloadable? Or does cmake has some specific test that allows it to goes from "arm-linux-gnueabihf-gcc" the actual armhf triplet actually setup in the system?
from box86.
its still hard coded in a way, checks for that toolchain, if it exists sets it and uses it else uses either /usr/bin/gcc OR in the case of most crosscompilations, CC var or if user specified -DCMAKE_C_COMPILER
from box86.
Ah ok, this allows to use fallback instead of just failing. Nice.
from box86.
Related Issues (20)
- Box86 fails to run on Ubuntu 24.04 HOT 11
- Relocation type "0x2a" error running bash. Unable to run bash in nixOS HOT 1
- SteamCMD Via Box86 On Termux Not Loading Steam API HOT 4
- how to solve "bash: No such file or directory"? HOT 2
- Steam installed via install_steam.sh script not working HOT 11
- SteamCMD fails with futex robust_list not initialized by pthreads HOT 6
- Feed and grow : fish dont open (rpi5) HOT 1
- Problems with Vulkan with Wine HOT 2
- wine is broken HOT 11
- Wine cannot create window HOT 3
- RK3588, 6.1 Rockchip Kernel, Joshua Riek Ubuntu Desktop HOT 1
- Infinite checking update steam HOT 1
- Wine reported that the gnutls missing symbol when running counter-strike 1.6 HOT 1
- install_steam.sh on 24.04 & Raspberry Pi 5 HOT 5
- Infinite Loop on SteamCMD Checking for Update.
- [Question] Error occurred while installing steam on KylinOS showing __dprintf_chk not found HOT 16
- Segmentation fault while launching Valheim Server + BepinEX HOT 2
- Segmentation fault on Raspi 5
- Error when launching CSGO game
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from box86.