-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autoconf: use API archives for pkg-config #81
Comments
The commits above show-case the approach but are not finalized yet. |
That looks very reasonable to me. By the way, the more include-specific quirks I see being added to Goa, the more I feel the urge to make use of the import-*.mk files instead. |
Alternatively, we could think about introducing conventions that API archives are expected to follow, similar to the convention of the Genode build system that incorporates include// into the include-search paths whereas the values depend on the architecture. Right now, Goa has only the single obvious convention that headers are searched in include/, which apparently doesn't cut it. In the case of OpenSSL, it is a bit strange to see the include path pointing into src/. Maybe the archive could mirror the headers at include? |
Except for a few special cases (e.g. SDL/SDL2 which required include/SDL2 being added into the include-search paths) introducing architecture-specific conventions should eliminate most quirks.
That's a common pattern if the include files don't reside in the contrib directory but at src/lib/.... |
@nfeske I just noticed that Goa indeed already has a policy in place to add architecture-specific includes paths. The point of the existing quirks is actually that, for some libraries, we need additional subdirectories in the include paths. |
Thanks @jschlatow for the clarification. So we are fine already in this respect. I'm sorry for the noise. |
If a used API contains an import-<api-name>.mk file, we evalute this in order to set the include directories appropriately. This relieves us from most quirks. genodelabs#81
For now this import file is solely there to satisfy the mechansim in Goa that collecteds an incorporates import files for used APIs. Issue genodelabs/goa#81.
@jschlatow thanks for the commit - I've cherry-picked b18045e (and the fixup commit on your branch). It works fine but I had to adapt the |
@cnuke I'm ready to merge the preparatory commits (curl, openssl) to genode staging. Please merge the following cleanup into the import-openssl.mk commit. diff --git a/repos/libports/lib/import/import-libcrypto.mk b/repos/libports/lib/import/import-libcrypto.mk
index 3878ca4a8c8..bd8a17b9d39 100644
--- a/repos/libports/lib/import/import-libcrypto.mk
+++ b/repos/libports/lib/import/import-libcrypto.mk
@@ -1,9 +1,9 @@
LIB_OPENSSL_DIR = $(call select_from_repositories,src/lib/openssl)
-ARCH = $(filter 32bit 64bit,$(SPECS))
-
OPENSSL_DIR := $(call select_from_ports,openssl)
+ARCH = $(filter 32bit 64bit,$(SPECS))
+
INC_DIR += $(OPENSSL_DIR)/include
INC_DIR += $(LIB_OPENSSL_DIR)/spec/$(ARCH)
diff --git a/repos/libports/lib/import/import-libssl.mk b/repos/libports/lib/import/import-libssl.mk
index 54ea68accec..1c50108524d 100644
--- a/repos/libports/lib/import/import-libssl.mk
+++ b/repos/libports/lib/import/import-libssl.mk
@@ -2,9 +2,9 @@ LIB_OPENSSL_DIR = $(call select_from_repositories,src/lib/openssl)
OPENSSL_DIR := $(call select_from_ports,openssl)
-LIBS += libcrypto
-
ARCH = $(filter 32bit 64bit,$(SPECS))
INC_DIR += $(OPENSSL_DIR)/include
INC_DIR += $(LIB_OPENSSL_DIR)/spec/$(ARCH)
+
+LIBS += libcrypto |
For now this import file is solely there to satisfy the mechansim in Goa that collects and incorporates import files for used APIs. Issue genodelabs/goa#81.
For now this import file is solely there to satisfy the mechansim in Goa that collects and incorporates import files for used APIs. Issue genodelabs/goa#81.
For now this import file is solely there to satisfy the mechansim in Goa that collects and incorporates import files for used APIs. Issue genodelabs/goa#81.
While porting uacme I encountered configure problems because host libraries got picked up instead of the ones provides by Genode. Since we already went down the road of providing cmake files in the API archives doing the same for pkg-config feels natural.
The text was updated successfully, but these errors were encountered: