bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compile problem when cross compiling


From: Bruno Haible
Subject: Re: Compile problem when cross compiling
Date: Fri, 14 Jun 2024 15:40:29 +0200

Hi,

> some problem trying to cross compile (see below).
> ...
> v0.22.5
> 
> xport NDK=/home/user/Android/Sdk/ndk/26.1.10909125
> export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
> export TARGET=aarch64-linux-android
> export API=25
> export AR=$TOOLCHAIN/bin/llvm-ar
> export CC=$TOOLCHAIN/bin/$TARGET$API-clang
> export AS=$CC
> export CXX=$TOOLCHAIN/bin/$TARGET$API-clang++
> export LD=$TOOLCHAIN/bin/ld
> export RANLIB=$TOOLCHAIN/bin/llvm-ranlib
> export STRIP=$TOOLCHAIN/bin/llvm-strip
> 
> PATH=$PATH:$TOOLCHAIN/bin/
> 
> autopull.sh
> 
> autogen.sh
> 
> ./configure --host=$TARGET
> 
> make
> 
> /home/user/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android25-clang
>  
> -DHAVE_CONFIG_H -I. -I..  -I. -I. -I.. -I.. -Iglib -DIN_LIBTEXTSTYLE 
> -DLIBXML_STATIC    -I./libcroco -DDEPENDS_ON_LIBICONV=1  -Wall 
> -Wdate-time -Wdisabled-optimization -Wdouble-promotion -Wextra 
> -Winit-self -Winvalid-pch -Wmissing-include-dirs -Wnested-externs 
> -Wnull-dereference -Woverlength-strings -Wpacked -Wpointer-arith 
> -Wstack-protector -Wstrict-overflow -Wsystem-headers -Wuninitialized 
> -Wunknown-pragmas -Wvariadic-macros -Wwrite-strings -Wformat=2 
> -Wno-empty-body -Wno-cast-align -Wno-format-nonliteral -Wno-sign-compare 
> -Wno-type-limits -Wno-unused-parameter -g -O2 -Wall -w -c ialloc.c
> /home/user/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android25-clang
>  
> -DHAVE_CONFIG_H -I. -I..  -I. -I. -I.. -I.. -Iglib -DIN_LIBTEXTSTYLE 
> -DLIBXML_STATIC    -I./libcroco -DDEPENDS_ON_LIBICONV=1  -Wall 
> -Wdate-time -Wdisabled-optimization -Wdouble-promotion -Wextra 
> -Winit-self -Winvalid-pch -Wmissing-include-dirs -Wnested-externs 
> -Wnull-dereference -Woverlength-strings -Wpacked -Wpointer-arith 
> -Wstack-protector -Wstrict-overflow -Wsystem-headers -Wuninitialized 
> -Wunknown-pragmas -Wvariadic-macros -Wwrite-strings -Wformat=2 
> -Wno-empty-body -Wno-cast-align -Wno-format-nonliteral -Wno-sign-compare 
> -Wno-type-limits -Wno-unused-parameter -g -O2 -Wall -w -c iconv-ostream.c
> iconv-ostream.c:311:3: error: incompatible function pointer types 
> initializing 'void (*)(iconv_ostream_t, ostream_flush_scope_t)' (aka 
> 'void (*)(struct any_ostream_representation *, ostream_flush_scope_t)') 
> with an expression of type 'void (iconv_ostream_t)' (aka 'void (struct 
> any_ostream_representation *)') [-Wincompatible-function-pointer-types]
>    iconv_ostream__flush,
>    ^~~~~~~~~~~~~~~~~~~~
> 1 error generated.

It looks like HAVE_ICONV_H is not defined in your build. This means that
the prerequisite iconv API is not available (or deficient) on your platform.
See the DEPENDENCIES file. This fix is to build and install GNU libiconv
first, and pass a --with-libiconv-prefix option to configure.

Bruno






reply via email to

[Prev in Thread] Current Thread [Next in Thread]