[build2] Building objective C code

Fabian Meyer fabian.meyer at posteo.de
Thu May 5 06:36:22 UTC 2022


Hi build2 users,

I am currently trying to compile some objective-C source files using 
build2 for MacOS builds of SFML (see 
https://github.com/build2-packaging/sfml/blob/master/sfml-window/src/buildfile#L72).
I basically copied the adhoc-recipe from the GLFW package (see 
https://github.com/build2-packaging/glfw/blob/master/glfw/src/buildfile#L24)

It seems to work or at least do something meaningful. However, during 
the build the compilation of some objective-c files fails, because the 
compiler cannot find certain header files (see 
https://github.com/build2-packaging/sfml/runs/6297094892#step:5:568).
The missing header files lie in the sfml-system package, which is 
imported at the top of the buildfile 
https://github.com/build2-packaging/sfml/blob/master/sfml-window/src/buildfile 
<https://github.com/build2-packaging/sfml/blob/master/sfml-window/src/buildfile#L72>. 
BuildingC++ sources, which also need these headers, works.
It seems like the exported include paths of the sfml-system dependency 
are not propagated to the adhoc recipe. I tried adding  the intf_libs 
explicitly to the adhoc recipe but that did not help.

Sadly I have no idea how the include paths are internally managed by 
build2, specifically how and when exported include paths are added to 
the compiler flags of certain targets.

Could anybody give me a hint on how to resolve this or what's basically 
going on internally? Currently I ran out of ideas what I could try out next.

Regards
Fabian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.build2.org/archives/users/attachments/20220505/068835fd/attachment.html>


More information about the users mailing list