Skip to content

About crosscompile julia with aarch64 #56869

Open
@billfang2024

Description

We crosscompile julia V1.10.6 on aarch64,met this problem,

My host setting is :

Linux 0ea0ffc92e59 5.10.0-153.56.0.134.oe2203sp2.x86_64 #1 SMP Wed May 29 14:04:28 CST 2024 x86_64 x86_64 x86_64 GNU/Linux

crosscompile setting is :

SRCDIR=`pwd`
GCCDIR="${SRCDIR}/musl-cross-make/output/bin"
JULIADIR="${SRCDIR}/julia-1.10.6"
target_host=aarch64-linux-musleabi

export AR=$GCCDIR/$target_host-ar
export AS=$GCCDIR/$target_host-as
export CC=$GCCDIR/$target_host-gcc
export CXX=$GCCDIR/$target_host-g++
export FORTRAN=$GCCDIR/$target_host-gfortran
export LD=$GCCDIR/$target_host-ld
export RANLIB=$GCCDIR/$target_host-ranlib
export STRIP=$GCCDIR/$target_host-strip
export OBJDUMP=$GCCDIR/$target_host-objdump
export OBJCOPY=$GCCDIR/$target_host-objcopy
export NM=$GCCDIR/$target_host-nm

export CPPFLAGS="-I${JULIADIR}/usr/include"
export CFLAGS="-fPIC -D__MUSL__=1 -I${JULIADIR}/usr/include"
export CXXFLAGS="-fPIC -D__MUSL__=1 -I${JULIADIR}/usr/include"
export LDFLAGS="-L${JULIADIR}/usr/lib"

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${JULIADIR}/usr/lib
/bin/sh: ../../../bin/llvm-tblgen: cannot execute binary file: Exec format error
include/llvm/IR/CMakeFiles/intrinsics_gen.dir/build.make:153: recipe for target 'include/llvm/IR/Attributes.inc' failed
make[4]: *** [include/llvm/IR/Attributes.inc] Error 126
CMakeFiles/Makefile2:9265: recipe for target 'include/llvm/IR/CMakeFiles/intrinsics_gen.dir/all' failed
make[3]: *** [include/llvm/IR/CMakeFiles/intrinsics_gen.dir/all] Error 2
Makefile:155: recipe for target 'all' failed
make[2]: *** [all] Error 2
/home/openharmony/ohpc-app-julia/julia-1.10.6/deps/llvm.mk:268: recipe for target 'scratch/llvm-julia-15.0.7-10/build_Release/build-compiled' failed
make[1]: *** [scratch/llvm-julia-15.0.7-10/build_Release/build-compiled] Error 2
Makefile:79: recipe for target 'julia-deps' failed

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    buildingBuild system, or building Julia or its dependenciescompiler:muslSupport for musl linked binaries on linux instead of glibcsystem:armARMv7 and AArch64

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions