From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v4 1/3] libgtk3: new package
Date: Mon, 4 Aug 2014 00:22:59 +0200 [thread overview]
Message-ID: <20140803222259.GA27949@itchy> (raw)
In-Reply-To: <20140803121547.0afe9f78@free-electrons.com>
Hi All!
On Sun, Aug 03, 2014 at 12:15:47PM +0200, Thomas Petazzoni wrote:
> Hello,
>
> On Sun, 3 Aug 2014 11:35:35 +0200, Thomas Petazzoni wrote:
>
> > Making all in gtk
> > CCLD extract-strings
> > GEN stamp-gtktypebuiltins.h
> > GEN stamp-gtkprivatetypebuiltins.h
> > GEN stamp-gtkmarshalers.h
> > GEN stamp-icons
> > GEN gtkdbusgenerated.c
> > GEN gtkdbusgenerated.h
> > /usr/bin/ld: skipping incompatible /home/test/outputs/gtk3/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libintl.so when searching for -lintl
> > /usr/bin/ld: skipping incompatible /home/test/outputs/gtk3/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libintl.a when searching for -lintl
> > /usr/bin/ld: cannot find -lintl
> > collect2: ld returned 1 exit status
> > make[4]: *** [extract-strings] Error 1
> > make[4]: *** Waiting for unfinished jobs....
> > /home/test/outputs/gtk3/host/usr/bin/glib-mkenums: gtktextview.h:59: Failed to parse ` /*< private >*/ '
> > /home/test/outputs/gtk3/host/usr/bin/glib-mkenums: gtktextview.h:61: Failed to parse ` /*< public >*/ '
> > make[3]: *** [all-recursive] Error 1
> > make[2]: *** [all] Error 2
> > make[1]: *** [/home/test/outputs/gtk3/build/libgtk3-3.12.2/.stamp_built] Error 2
> > make: *** [_all] Error 2
>
> I've done a little bit more investigation. The problem comes from the
> fact that the extract-strings program is built for the host, but using
> target cflags/ldflags. The gtk3 configure.ac script has provisions to
> specify a PKG_CONFIG_FOR_BUILD, but in the case of Buildroot, our
> PKG_CONFIG_FOR_BUILD is just $(HOST_DIR)/usr/bin/pkg-config, but with
> several environment variables to adjust its behavior (because by
> default, $(HOST_DIR)/usr/bin/pkg-config is cross and returns values for
> target libraries).
>
> So, I tried something like:
>
> LIBGTK3_CONF_ENV += \
> ac_cv_path_PKG_CONFIG_FOR_BUILD='$(HOST_CONFIGURE_OPTS) $(HOST_PKG_CONFIG_BINARY)'
>
> but it didn't work as the autoconf code does not expect the command to
> have multiple, space-separated, tokens.
>
> I've already tried to override GLIB_CFLAGS_FOR_BUILD and
> GLIB_LIBS_FOR_BUILD with no luck.
>
> So, right now, I am wondering if we should provide a
> $(HOST_DIR)/usr/bin/host-pkg-config that has built-in all the necessary
> environment variables to return values appropriate for host libraries.
>
That's the solution I had chosen in my version [1]:
+HOST_LIBGTK3_DEPENDENCIES = host-libglib2 host-libpng host-gdk-pixbuf
+HOST_LIBGTK3_CFLAGS = $(shell $(HOST_DIR)/usr/bin/pkg-config-native \
+ --cflags --libs gdk-pixbuf-2.0)
+
+define HOST_LIBGTK3_INSTALL_PKG_CONFIG_NATIVE
+ $(RM) -f $(HOST_DIR)/usr/bin/pkg-config-native
+ echo -e '#!/bin/sh\n' \
+
'PKG_CONFIG_LIBDIR=$(HOST_DIR)/usr/lib/pkgconfig:$(HOST_DIR)/usr/share/pkgconfig
' \
+ '$(HOST_DIR)/usr/bin/pkgconf $$@' >> $(HOST_DIR)/usr/bin/pkg-config-native
+ chmod +x $(HOST_DIR)/usr/bin/pkg-config-native
+endef
+
+HOST_LIBGTK3_PRE_CONFIGURE_HOOKS += HOST_LIBGTK3_INSTALL_PKG_CONFIG_NATIVE
This hook could easily be moved to package/pkgconf/pkgconf.mk and added to
HOST_PKGCONF_POST_INSTALL_HOOKS. If "host-pkg-config" is preferred over
"pkg-config-native", I can provide a patch using this name.
Best regards,
ELB
[1] https://github.com/elebihan/buildroot/commit/54a0ad6a18481e2db24c6f8f1d0b130b2a830b18
next prev parent reply other threads:[~2014-08-03 22:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-01 1:33 [Buildroot] [PATCH v4 0/3] Add libgtk3 and bump webkit to version 2.4.3 Hadrien Boutteville
2014-08-01 1:33 ` [Buildroot] [PATCH v4 1/3] libgtk3: new package Hadrien Boutteville
2014-08-03 9:35 ` Thomas Petazzoni
2014-08-03 10:15 ` Thomas Petazzoni
2014-08-03 22:22 ` Eric Le Bihan [this message]
2014-08-01 1:33 ` [Buildroot] [PATCH v4 2/3] webkit: bump to version 2.4.3 Hadrien Boutteville
2014-08-01 1:33 ` [Buildroot] [PATCH v4 3/3] midori: bump to version 0.5.8 Hadrien Boutteville
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140803222259.GA27949@itchy \
--to=eric.le.bihan.dev@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.