From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fhigh3-smtp.messagingengine.com (fhigh3-smtp.messagingengine.com [103.168.172.154]) by sourceware.org (Postfix) with ESMTPS id D59AB3858403 for ; Sat, 3 Feb 2024 02:12:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D59AB3858403 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=keith-magee.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=keith-magee.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D59AB3858403 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=103.168.172.154 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706926327; cv=none; b=ObxJfdUU6Y9ijdlNuStK6xbDLuL4Dj8lBGi2L23u+4RwiGcCYcd8MUTt5jwOgQyftQJOBuJUdChRnF4SCIc07MnC6bHrvDZK5hc7C8QIOPlFAdpNGLHkkgdsbHA5eMqPl7/eXxNbc4X02Oarni2mxeyn5MA+l88PNTqnZiJLZqc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706926327; c=relaxed/simple; bh=q26AW2DvDcQzgrHKXm66yFOzT4gmSjGhI3cdiB35sHY=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Message-ID:Subject: MIME-Version; b=k2/bNPF7imscD9wP+JTbmdG8dhtw5ehwcG2Yx0f/a4yV24Eq7jqb2FLeSIHjCWLA+UsFMAqUzzyw7o5wbCp6q9VhK1xfjb9Lf/Kqd9+GyS5T7XLZmgdB4GfXVxYnrdHg/Be8Z4CreC1GT+bmQKWx+09ykaseaF1XsTHnf0egRGE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 55EB81140078; Fri, 2 Feb 2024 21:12:04 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 02 Feb 2024 21:12:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=keith-magee.com; h=cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1706926324; x=1707012724; bh=/Qg4ejlxJE 7u77p9kAnWJqJIwLFR8Kgtx93NqG7xNdc=; b=etvyPwOc71XlUrPWpNMqRr1UsG qdw9lXmxV07OxjoyIZMvpfhulg96yxJbmTeqki6doLD9qb2F0AS5KUWzeZOBn9e3 kXSdsKwCz2u/sSdcMdnBHYzL21JIe/3RZmzV21ljDRgN1+CYLzvhPm6aSJY09GeL JDhgSt58B2nA2QPDe3lXvs7jV5CnlLUCaPdV7cwkUFZuCRue3Qf5UWAaHw2kBkLU BkQ2ZXkRkOlBIpJyLwDkvI4lAQ5VZHOTVQ2Lc+QgMQq1q2KfUX6QW9gmhK4flkA7 KCo8HLkq2hJdlK3TGmHZ39x1QgsPn0k2sEOtdjfsR1/jjDXywYfMFzX+79lw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1706926324; x=1707012724; bh=/Qg4ejlxJE7u77p9kAnWJqJIwLFR 8Kgtx93NqG7xNdc=; b=R6vIxwR1yW0OFdpJ2agKUs6HY8p96ZQdhZvTAjalA4VZ 1lB5YV5AjffVasBu+i2/fDqWazwPEBNO/n7TkpuvOBARSqztS1Y6t9KQEm8/0gAf s59zp7i8QsuQYJvGTUhLCozIzw8lRXfJhfVgrCFMHRXdANfGiTTuPkMTIYI979wo 8gfR7aW9GrTSaHn+Bv4FL5mj8YoeKNY5NwobRm4pmSTlRaH51G8xu5axz3V3QZzW xlRWmLFIKTTa4EDBe15D24lcGpxKGFOLkXZdTN615s3BefBknRkf1gVDXez1Ea5z UZ6/ycUI48a7T6D8+JeTiwN3QhZMHaQnT8GjIoNbMQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfeduhedggeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffkjghfufggtgesrgdtreertddtjeenucfhrhhomheptfhushhsvghl lhcumfgvihhthhdqofgrghgvvgcuoehruhhsshgvlhhlsehkvghithhhqdhmrghgvggvrd gtohhmqeenucggtffrrghtthgvrhhnpeffhfegtdeufeeuieeuvefhgfejgfdthffhhedt veeiteekffektdelheeifefhffenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprhhushhsvghl lheskhgvihhthhdqmhgrghgvvgdrtghomh X-ME-Proxy: Feedback-ID: i07c14247:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 2 Feb 2024 21:12:02 -0500 (EST) Date: Sat, 3 Feb 2024 10:11:55 +0800 From: Russell Keith-Magee To: saleem gagguturu , "=?utf-8?Q?libffi-discuss=40sourceware.org?=" Message-ID: In-Reply-To: References: Subject: Re: Cross compiling for iOS MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="65bda0f0_4522d2fa_e39a" X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --65bda0f0_4522d2fa_e39a Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I can=E2=80=99t speak to any of the eccentricities introduced by using OSX = Cross, but the build process for iOS isn=E2=80=99t quite the same as it is = for the platforms - it requires some pre- and post- processing. You don't j= ust invoke ./configure from the command line as you would for a =E2=80=9Cno= rmal=E2=80=9D autoconf project. There=E2=80=99s a `generate_darwin_source_and_headers.py` script in the roo= t of the libffi code checkout; when you execute that, it generates `build_`= folders for each architecture, and runs configure for you.=C2=A0 You can see these tools in action in the repo I maintain for libFFI support= on iOS/tvOS/watchOS; here=E2=80=99s the invocation of the helper script: https://github.com/beeware/cpython-apple-source-deps/blob/main/Makefile#L474 And the build itself: https://github.com/beeware/cpython-apple-source-deps/blob/main/Makefile#L33= 9=C2=A0 Each pass will give you a binary for a *single* ABI and architecture; Depen= ding on your intended usage, you may need to combine them into =C2=A0=E2=80= =9Cfat=E2=80=9D binaries for each ABI; depending on how you=E2=80=99re usin= g the library, you may also need to combine the multiple ABI fat binaries i= nto a single XCframework. Or - the releases page for the repo I just linked has pre-built (single ABI= and architecture) binaries. https://github.com/beeware/cpython-apple-source-deps/releases/tag/libFFI-3.= 4.4-1 Hope that helps, Russ Magee %-) On 1 February 2024 at 3:04:54 pm, saleem gagguturu via Libffi-discuss (libf= fi-discuss@sourceware.org) wrote: Hi,=20=20 I'm trying to cross-compile libffi for iOS from Debian. I managed to cross-= compile it successfully for MacOS (arm64 and x86) using OSX Cross but I'm g= etting some errors for iOS.=20=20 My configure command is:=20=20 ./configure --host=3Darm-apple-darwin11 --prefix=3D$IOS_TOOLCHAIN_ROOT --li= bdir=3D$IOS_TOOLCHAIN_ROOT/lib --disable-docs=20=20 This is the error I'm getting:=20=20 libtool: link: ( cd ".libs" && rm -f "libffi_convenience.la" && ln -s "../l= ibffi_convenience.la" "libffi_convenience.la" )=20=20 Undefined symbols for architecture arm64:=20=20 "_ffi_call", referenced from:=20=20 _ffi_raw_call in raw_api.o=20=20 _ffi_java_raw_call in java_raw_api.o=20=20 "_ffi_closure_trampoline_table_page", referenced from:=20=20 _ffi_closure_alloc in closures.o=20=20 "_ffi_prep_cif_machdep", referenced from:=20=20 _ffi_prep_cif_core in prep_cif.o=20=20 "_ffi_prep_cif_machdep_var", referenced from:=20=20 _ffi_prep_cif_core in prep_cif.o=20=20 "_ffi_prep_closure_loc", referenced from:=20=20 _ffi_prep_closure in prep_cif.o=20=20 _ffi_prep_raw_closure_loc in raw_api.o=20=20 _ffi_prep_raw_closure in raw_api.o=20=20 _ffi_prep_java_raw_closure_loc in java_raw_api.o=20=20 _ffi_prep_java_raw_closure in java_raw_api.o=20=20 ld: symbol(s) not found for architecture arm64=20=20 I've raised an issue with full logs here https://github.com/libffi/libffi/i= ssues/821=20=20 Anyone know any workaround for this? I need libffi as it's a dependency to = Glib.=20=20 Thanks=20=20 --65bda0f0_4522d2fa_e39a--