View Issue Details

IDProjectCategoryView StatusLast Update
0008524Talerqtartpublic2024-04-15 21:08
ReporterFlorian Dold Assigned ToMarcS  
PrioritynormalSeverityminorReproducibilityhave not tried
Status assignedResolutionopen 
Target Version0.14 
Summary0008524: resolve include path issues in QuickJS-rt.xcodeproj
DescriptionThe wallet-core C library has taler_wallet_core_lib.h as its main header. This file includes other headers, including quickjs-http.h.

However, the xcode project setup has problems with the transitive include. We include taler_wallet_core_lib.h from FTalerWalletcore-Bridging-Header.h (the main entry point for the wallet-core "Framework" i.e. xcode component). However, despite compiler include paths being set correctly, the include of quickjs-http.h fails when building the Framework in the project that consumes it (i.e. taler-ios.git).

That is because xcode is sometimes invoking clang with "-I quickjs-all-non-framework-target-headers.hmap". Header maps are an Apple-specific concept and can override imports. That leads to "quickjs-http.h" not being found *despite* being on the include path, as confirmed by running clang with "-v".

That only seems to happen when quickjs-http.h is declared under "Headers" in the xcode settings for the Framework. If it is *not* declared there, the Framework can't be used.

The underlying reason is probably that in xcode, a header is either a Framework header (and thus only included by consumers of the Framework) *XOR* a header used when compiling the framework. I have not been able to find proper documentation on this though.

As a workaround, we currently use a special taler_wallet_core_lib_preprocessed.h header on iOS. This header is *only* included in FTalerWalletcore-Bridging-Header.h and the include of "quickjs-http.h" manually unrolled.

This hack should be avoided in the future. We need to find a way to set up the project correctly, so that quickjs-http.h (and other headers in the future!) can both be a Framework header included by the Framework consumer *and* a header available when compiling the code of the Framework itself.

TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2024-02-26 22:37 Florian Dold New Issue
2024-02-26 22:37 Florian Dold Status new => assigned
2024-02-26 22:37 Florian Dold Assigned To => MarcS
2024-02-26 22:39 Florian Dold Description Updated
2024-04-15 21:08 Christian Grothoff Target Version 0.11 => 0.14