Cross-compiling for iPhone does not work

Bug #1589188 reported by Avery Magnotti
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
click (Ubuntu)
New
Undecided
Unassigned

Bug Description

When trying to cross-compile click for the iPhone, I am brought this error:

In file included from paths.c:21:
In file included from /usr/include/glib-2.0/glib.h:30:
In file included from /usr/include/glib-2.0/glib/galloca.h:32:
/usr/include/glib-2.0/glib/gtypes.h:422:3: error: '_GStaticAssertCompileTimeAssertion_0' declared as an array with a negative size
  G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:217:103: note: expanded from macro 'G_STATIC_ASSERT'
#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                                                                                                      ^~~~~~~~~~~~~~~
1 warning and 1 error generated.

I use the following script to build click. It's quite messy, but here you go:

#!/bin/bash
rm -rf ~/built/click
PREFIX=~/toolchain/linux/iphone/bin/armv7-apple-darwin11
AR=$PREFIX-ar
AS=$PREFIX-as
CC=$PREFIX-clang
CXX=$PREFIX-clang++
LD=$PREFIX-ld
NM=$PREFIX-nm
OBJDUMP=$PREFIX-objdump
RANLIB=$PREFIX-ranlib
STRIP=$PREFIX-strip
SDK=/home/citrusui/sdks/iPhoneOS9.3.sdk
CFLAGS="-arch armv7 -arch arm64 -isysroot $SDK"
LDFLAGS="-Wl,-segalign,4000"
DESTDIR=~/built/click/
apt install autoconf bzr clang intltool libcurl4-openssl-dev libgee-0.8 libjson-glib-dev libtool xutils-dev debhelper dh-autoreconf python3-all python3-setuptools pep8 python3-pep8 pyflakes python3-sphinx valac gobject-introspection libgirepository1.0-dev libpackagekit-glib2-dev python3-coverage dh-systemd
cd ~
if [ ! -d click ]; then
bzr branch lp:click
fi
cd ~/click
./autogen.sh
./configure cross_compiling=yes --prefix=/home/citrusui/built/click --sysconfdir=/etc --with-systemdsystemunitdir=/lib/systemd/system --with-systemduserunitdir=/usr/lib/systemd/user CC="$CC" CXX="$CXX" CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" STRIP="$STRIP" RANLIB="$RANLIB" NM=$NM AR=$AR AS=$AS LD="$LD" OBJDUMP="$OBJDUMP" LDFLAGS="$LDFLAGS" DESTDIR="$DESTDIR"
make install
cd ~/built/click

Note that ~/toolchain contains data from https://developer.angelxwind.net/Linux/ and ~/sdks/iPhoneOS9.3.sdk contains data from https://jbdevs.org/sdks/.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.