[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Request for Help: ioquake3



Hi,

ioquake3 FTCBFS at the moment. On digging, it looks like it is because two pkg-config flags that it tries to load do not get in as intended.
More specifically, these lines in the Makefile:

	OPUS_CFLAGS ?= $(shell $(PKG_CONFIG) --silence-errors --cflags opusfile opus || true)
	OPUS_LIBS ?= $(shell $(PKG_CONFIG) --silence-errors --libs opusfile opus || echo -lopusfile -lopus)

As it is evident from the log[1] the -I/usr/include/opus is not correctly outputted via pkg-config and instead the condition after ORed pipe is executed (which is "true")
I went ahead and removed the "|| true" and the build fails.

While in principle it is very simple to fix it with (although I prefer removing --silence-errors here):

--- a/Makefile
+++ b/Makefile
@@ -1075,8 +1075,8 @@
       -I$(OPUSDIR)/include -I$(OPUSDIR)/celt -I$(OPUSDIR)/silk \
       -I$(OPUSDIR)/silk/float -I$(OPUSFILEDIR)/include
   else
-    OPUS_CFLAGS ?= $(shell $(PKG_CONFIG) --silence-errors --cflags opusfile opus || true)
-    OPUS_LIBS ?= $(shell $(PKG_CONFIG) --silence-errors --libs opusfile opus || echo -lopusfile -lopus)
+    OPUS_CFLAGS ?= $(shell $(PKG_CONFIG) --silence-errors --cflags opusfile opus || echo -I/usr/include/opus)
+    OPUS_LIBS ?= $(shell $(PKG_CONFIG) --silence-errors --libs opusfile opus || echo -lopusfile -lopus)
   endif
   CLIENT_CFLAGS += $(OPUS_CFLAGS)
   CLIENT_LIBS += $(OPUS_LIBS)


(The cross build works after this change ^^)

I do not understand the reason for PKG_CONFIG not delivering the right opts. I checked and it takes in the PKG_CONFIG of host rather than build compiler, except dh_clean which is probably not important here.
Please let me know.

Nilesh


Reply to: