You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't seem to find anything anywhere indicating how to build Fish for multiple architectures other than the host system's arch, and I'm not as familiar with CMake as I'd like to be. I've noticed that the nightly build servers are building the Fedora variant of Fish for all four architectures that I'd like to target (arm, arm64, x86, and x64), so hopefully I'm in the right place to ask:
How does one configure the build environment to build for a different architecture without modifying the CMake configuration files? i.e. environment variables, make parameters, etc
I've just fixed the runtime check, so there's no impediment to cross-compiling the current git master that I'm aware of - if you could give it a go (I haven't got any useful targets) and let us know that would be great!
joshuadoes@joshuadoes:~/Projects/fish-shell/build$ cmake -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_C_COMPILER=arm-linux-gnueabi-gcc -DTHREADS_PTHREAD_ARG=0 ..
[...]
-- The following features have been enabled:
* gettext, translate messages with gettext
-- The following OPTIONAL packages have been found:
* Curses
* Intl
* Gettext
-- The following REQUIRED packages have been found:
* Threads
-- The following features have been disabled:
* Documentation, user manual and documentation
-- Configuring done
-- Generating done
-- Build files have been written to: /home/joshuadoes/Projects/fish-shell/build
joshuadoes@joshuadoes:~/Projects/fish-shell/build$ make
Scanning dependencies of target CHECK-FISH-BUILD-VERSION-FILE
FISH_BUILD_VERSION=3.0.2-1011-g05b2d4ee
[ 0%] Built target CHECK-FISH-BUILD-VERSION-FILE
Scanning dependencies of target fishlib
[ 1%] Building CXX object CMakeFiles/fishlib.dir/src/autoload.cpp.o
In file included from /home/joshuadoes/Projects/fish-shell/src/autoload.h:9:0,
from /home/joshuadoes/Projects/fish-shell/src/autoload.cpp:4:
/home/joshuadoes/Projects/fish-shell/src/wutil.h:15:10: fatal error: xlocale.h: No such file or directory
#include <xlocale.h>
^~~~~~~~~~~
compilation terminated.
CMakeFiles/fishlib.dir/build.make:65: recipe for target 'CMakeFiles/fishlib.dir/src/autoload.cpp.o' failed
make[2]: *** [CMakeFiles/fishlib.dir/src/autoload.cpp.o] Error 1
CMakeFiles/Makefile2:947: recipe for target 'CMakeFiles/fishlib.dir/all' failed
make[1]: *** [CMakeFiles/fishlib.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Activity
zanchey commentedon Apr 28, 2019
All of the continuous builds are done with native building, so that's not a great indication.
https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/CrossCompiling has the information you need, although I have no idea whether it will work. The old build system never supported cross-compilation (see #1067). In particular the check for
/proc/self/stat(mostly used in calculating CPU usage) runs on the build system, not against the target, so that might blow up if your target doesn't have that file. The other check referenced in that issue has been removed, thankfully.zanchey commentedon Apr 30, 2019
I've just fixed the runtime check, so there's no impediment to cross-compiling the current git master that I'm aware of - if you could give it a go (I haven't got any useful targets) and let us know that would be great!
JoshuaDoes commentedon Apr 30, 2019
I apologize for the lack of reply, but thank you!
I'll give it a go later on today and let you know how it turns out.
JoshuaDoes commentedon Apr 30, 2019
Update: Attempted the following:
Any idea of where to go from here?
faho commentedon Apr 30, 2019
@JoshuaDoes: That include is only used if
HAVE_XLOCALE_His set by cmake:So it looks like cmake is failing to check the correct include path.
zanchey commentedon May 1, 2019
Those arguments won't be enough - you almost certainly need
CMAKE_FIND_ROOT_PATHas well.