View Issue Details

IDProjectCategoryView StatusLast Update
0008524Talerqtartpublic2025-05-10 02:11
ReporterFlorian Dold Assigned ToMarcS Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version1.0Fixed in Version1.0 
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.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

MarcS

2025-03-12 18:34

developer   ~0024186

Using "#if TARGET_OS_IPHONE", i was able to specify the path for "quickjs-http.h" without breaking the compilation on other platforms.

Issue History

Date ModifiedUsernameFieldChange
2024-02-26 21:37Florian DoldNew Issue
2024-02-26 21:37Florian DoldStatusnew => assigned
2024-02-26 21:37Florian DoldAssigned To => MarcS
2024-02-26 21:39Florian DoldDescription Updated
2024-04-15 19:08Christian GrothoffTarget Version0.11 => 0.14
2024-07-25 22:08Christian GrothoffTarget Version0.14 => post-1.0
2025-03-12 18:34MarcSStatusassigned => informing
2025-03-12 18:34MarcSResolutionopen => fixed
2025-03-12 18:34MarcSFixed in Version => 1.0
2025-03-12 18:34MarcSNote Added: 0024186
2025-03-21 12:02Christian GrothoffProduct Version => git (master)
2025-03-21 12:02Christian GrothoffTarget Versionpost-1.0 => 1.0
2025-05-10 02:11Christian GrothoffStatusinforming => closed