Attempted build on MacOS fails #7

Open
opened 2024-09-08 09:13:04 +02:00 by Frityet · 2 comments
Frityet commented 2024-09-08 09:13:04 +02:00 (Migrated from github.com)
❯ swift build -c debug --static-swift-stdlib
warning: prohibited flag(s): -mfpmath=sse, -msse, -msse2
warning: Swift compiler no longer supports statically linking the Swift libraries. They're included in the OS by default starting with macOS Mojave 10.14.4 beta 3. For macOS Mojave 10.14.3 and earlier, there's an optional Swift library package that can be downloaded from "More Downloads" for Apple Developers at https://developer.apple.com/download/more/
warning: Swift compiler no longer supports statically linking the Swift libraries. They're included in the OS by default starting with macOS Mojave 10.14.4 beta 3. For macOS Mojave 10.14.3 and earlier, there's an optional Swift library package that can be downloaded from "More Downloads" for Apple Developers at https://developer.apple.com/download/more/
Building for debugging...
clang: error: unknown argument: '-index-store-path'
clang: error: no such file or directory: '/Users/frityet/Documents/AdwaitaTemplate/.build/plugins/tools/debug/index/store'
clang: error: unknown argument: '-index-store-path'
clang: error: no such file or directory: '/Users/frityet/Documents/AdwaitaTemplate/.build/plugins/tools/debug/index/store'
clang: error: unknown argument: '-index-store-path'
clang: error: no such file or directory: '/Users/frityet/Documents/AdwaitaTemplate/.build/plugins/tools/debug/index/store'
clang: error: unknown argument: '-index-store-path'
clang: error: no such file or directory: '/Users/frityet/Documents/AdwaitaTemplate/.build/plugins/tools/debug/index/store'
clang: error: unknown argument: '-index-store-path'
clang: error: no such file or directory: '/Users/frityet/Documents/AdwaitaTemplate/.build/plugins/tools/debug/index/store'
clang: error: unknown argument: '-index-store-path'
clang: error: no such file or directory: '/Users/frityet/Documents/AdwaitaTemplate/.build/plugins/tools/debug/index/store'
[0/7] Compiling writer.c

its same result with xcrun swift and swift from homebrew

```yaml ❯ swift build -c debug --static-swift-stdlib warning: prohibited flag(s): -mfpmath=sse, -msse, -msse2 warning: Swift compiler no longer supports statically linking the Swift libraries. They're included in the OS by default starting with macOS Mojave 10.14.4 beta 3. For macOS Mojave 10.14.3 and earlier, there's an optional Swift library package that can be downloaded from "More Downloads" for Apple Developers at https://developer.apple.com/download/more/ warning: Swift compiler no longer supports statically linking the Swift libraries. They're included in the OS by default starting with macOS Mojave 10.14.4 beta 3. For macOS Mojave 10.14.3 and earlier, there's an optional Swift library package that can be downloaded from "More Downloads" for Apple Developers at https://developer.apple.com/download/more/ Building for debugging... clang: error: unknown argument: '-index-store-path' clang: error: no such file or directory: '/Users/frityet/Documents/AdwaitaTemplate/.build/plugins/tools/debug/index/store' clang: error: unknown argument: '-index-store-path' clang: error: no such file or directory: '/Users/frityet/Documents/AdwaitaTemplate/.build/plugins/tools/debug/index/store' clang: error: unknown argument: '-index-store-path' clang: error: no such file or directory: '/Users/frityet/Documents/AdwaitaTemplate/.build/plugins/tools/debug/index/store' clang: error: unknown argument: '-index-store-path' clang: error: no such file or directory: '/Users/frityet/Documents/AdwaitaTemplate/.build/plugins/tools/debug/index/store' clang: error: unknown argument: '-index-store-path' clang: error: no such file or directory: '/Users/frityet/Documents/AdwaitaTemplate/.build/plugins/tools/debug/index/store' clang: error: unknown argument: '-index-store-path' clang: error: no such file or directory: '/Users/frityet/Documents/AdwaitaTemplate/.build/plugins/tools/debug/index/store' [0/7] Compiling writer.c ``` its same result with `xcrun swift` and `swift` from homebrew
david-swift commented 2024-09-08 12:04:26 +02:00 (Migrated from github.com)

You can fix the warnings by removing the --static-swift-stdlib. Unfortunately, I have no idea about the error messages. On my macOS installation, it works without any problems.

Adwaita works best on Linux, so I recommend building Adwaita apps on Linux rather than macOS or Windows.

You can fix the warnings by removing the `--static-swift-stdlib`. Unfortunately, I have no idea about the error messages. On my macOS installation, it works without any problems. Adwaita works best on Linux, so I recommend building Adwaita apps on Linux rather than macOS or Windows.
david-swift added the
bug
label 2024-10-07 15:11:42 +02:00

I am facing the same issue on the latest version of Xcode 16.4. Looks like the header file is installed (with brew) /usr/local/Cellar/libadwaita/1.7.5/include/libadwaita-1/adwaita.h but can't be found when building the CAdw shim.

The project was newly setup, not via the template, as I don't like to use Flatpak. Both Adwaita and localized were added as a dependency. Adwaita with the 0.1.0 release and Localized with the main branch (due to a not-yet release fix to allow it to compile on Mac OS.

This could possibly be related to the newly introduced handling of package dependencies in Xcode, which by default is now done via the package dependencies manager. I do remember hitting a similar issue with a barcode library some years back, but I have to dig deeper into my memory to find the exact cause. My first impression is, that the path shown above is not searched as an include path by the compiler, as it has been installed outside of Xcode package management. I will look a bit further into that.

I am facing the same issue on the latest version of Xcode 16.4. Looks like the header file is installed (with brew) `/usr/local/Cellar/libadwaita/1.7.5/include/libadwaita-1/adwaita.h` but can't be found when building the `CAdw` shim. The project was newly setup, not via the template, as I don't like to use Flatpak. Both `Adwaita` and `localized` were added as a dependency. `Adwaita` with the 0.1.0 release and Localized with the main branch (due to a not-yet release fix to allow it to compile on Mac OS. This could possibly be related to the newly introduced handling of package dependencies in Xcode, which by default is now done via the package dependencies manager. I do remember hitting a similar issue with a barcode library some years back, but I have to dig deeper into my memory to find the exact cause. My first impression is, that the path shown above is not searched as an include path by the compiler, as it has been installed outside of Xcode package management. I will look a bit further into that.
Sign in to join this conversation.
No Milestone
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: aparoksha/adwaita-template#7
No description provided.