* [Buildroot] [PATCH 1/2] package/gobject-introspection/g-ir-scanner: do not set default compiler values
@ 2020-03-20 22:23 aduskett at gmail.com
2020-03-20 22:23 ` [Buildroot] [PATCH 2/2] package/libostree: add introspection support aduskett at gmail.com
2020-03-21 21:47 ` [Buildroot] [PATCH 1/2] package/gobject-introspection/g-ir-scanner: do not set default compiler values Yann E. MORIN
0 siblings, 2 replies; 5+ messages in thread
From: aduskett at gmail.com @ 2020-03-20 22:23 UTC (permalink / raw)
To: buildroot
From: Adam Duskett <Aduskett@gmail.com>
Commit 8b0aeafce2a22913e6a44818227f6a39e3225157 set 7 new variables in
g-ir-scanner.in:
export CPP="${CPP:-${HOST_DIR}/bin/@BASENAME_TARGET_CPP@}"
export CC="${CC:-${HOST_DIR}/bin/@BASENAME_TARGET_CC@}"
export CXX="${CXX:-${HOST_DIR}/bin/@BASENAME_TARGET_CXX@}"
CPPFLAGS="${CPPFLAGS:- at TARGET_CPPFLAGS@}"
CFLAGS="${CFLAGS:- at TARGET_CFLAGS@}"
CXXFLAGS="${CXXFLAGS:- at TARGET_CXXFLAGS@}"
LDFLAGS="${LDFLAGS:- at TARGET_LDFLAGS@}"
However, defaulting to CPP, CC, or CXX breaks some packages because they may
hard code CC to the system CC.
One such package is libostree which has the line
"INTROSPECTION_SCANNER_ENV = CC=gcc" in the Makefile.
Because g-ir-scanner defaults CC to a predefined CC instead of explicitly
overwriting it, the CC passed from the makefile is used, and linking errors
occur as a result.
Remove the defaults for the following and explicitly set the paths to the
proper cross-toolchain binaries:
CPP, CC, CXX
Fixes
http://autobuild.buildroot.org/results/f8a14307e6feff61acd963d6cd2aac289e6d1647
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
---
package/gobject-introspection/g-ir-scanner.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/gobject-introspection/g-ir-scanner.in b/package/gobject-introspection/g-ir-scanner.in
index 22df7be309..6fc495389e 100644
--- a/package/gobject-introspection/g-ir-scanner.in
+++ b/package/gobject-introspection/g-ir-scanner.in
@@ -5,9 +5,9 @@
# the variables blank (LDFLAGS, CFLAGS, and CPPFLAGS.)
# Export these variables to ensure all build systems can generate .gir and
# .typelib files properly.
-export CPP="${CPP:-${HOST_DIR}/bin/@BASENAME_TARGET_CPP@}"
-export CC="${CC:-${HOST_DIR}/bin/@BASENAME_TARGET_CC@}"
-export CXX="${CXX:-${HOST_DIR}/bin/@BASENAME_TARGET_CXX@}"
+export CPP="${HOST_DIR}/bin/@BASENAME_TARGET_CPP@"
+export CC="${HOST_DIR}/bin/@BASENAME_TARGET_CC@"
+export CXX="${HOST_DIR}/bin/@BASENAME_TARGET_CXX@"
export CPPFLAGS="${CPPFLAGS:- at TARGET_CPPFLAGS@}"
export CFLAGS="${CFLAGS:- at TARGET_CFLAGS@}"
export CXXFLAGS="${CXXFLAGS:- at TARGET_CXXFLAGS@}"
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] package/libostree: add introspection support
2020-03-20 22:23 [Buildroot] [PATCH 1/2] package/gobject-introspection/g-ir-scanner: do not set default compiler values aduskett at gmail.com
@ 2020-03-20 22:23 ` aduskett at gmail.com
2020-03-22 9:31 ` Yann E. MORIN
2020-03-21 21:47 ` [Buildroot] [PATCH 1/2] package/gobject-introspection/g-ir-scanner: do not set default compiler values Yann E. MORIN
1 sibling, 1 reply; 5+ messages in thread
From: aduskett at gmail.com @ 2020-03-20 22:23 UTC (permalink / raw)
To: buildroot
From: Adam Duskett <Aduskett@gmail.com>
If gobject-introspection is selected, explicitly set --enable-introspection in
the configure options and add a dependency for gobject-introspection.
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
---
package/libostree/libostree.mk | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/package/libostree/libostree.mk b/package/libostree/libostree.mk
index bdbe6b5aba..63e6bbfde3 100644
--- a/package/libostree/libostree.mk
+++ b/package/libostree/libostree.mk
@@ -30,6 +30,13 @@ else
LIBOSTREE_CONF_OPTS += --without-openssl
endif
+ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
+LIBOSTREE_CONF_OPTS += --enable-introspection
+LIBOSTREE_DEPENDENCIES += gobject-introspection
+else
+LIBOSTREE_CONF_OPTS += --disable-introspection
+endif
+
# Avahi support needs libavahi-client, which is built by avahi if avahi-daemon
# and dbus is selected. Since there is no BR2_PACKAGE_LIBAVAHI_CLIENT config
# option yet, use the avahi-daemon and dbus config symbols to check for
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] package/gobject-introspection/g-ir-scanner: do not set default compiler values
2020-03-20 22:23 [Buildroot] [PATCH 1/2] package/gobject-introspection/g-ir-scanner: do not set default compiler values aduskett at gmail.com
2020-03-20 22:23 ` [Buildroot] [PATCH 2/2] package/libostree: add introspection support aduskett at gmail.com
@ 2020-03-21 21:47 ` Yann E. MORIN
2020-03-22 21:53 ` Yann E. MORIN
1 sibling, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2020-03-21 21:47 UTC (permalink / raw)
To: buildroot
Adam, All,
On 2020-03-20 15:23 -0700, aduskett at gmail.com spake thusly:
> From: Adam Duskett <Aduskett@gmail.com>
>
> Commit 8b0aeafce2a22913e6a44818227f6a39e3225157 set 7 new variables in
> g-ir-scanner.in:
>
> export CPP="${CPP:-${HOST_DIR}/bin/@BASENAME_TARGET_CPP@}"
> export CC="${CC:-${HOST_DIR}/bin/@BASENAME_TARGET_CC@}"
> export CXX="${CXX:-${HOST_DIR}/bin/@BASENAME_TARGET_CXX@}"
> CPPFLAGS="${CPPFLAGS:- at TARGET_CPPFLAGS@}"
> CFLAGS="${CFLAGS:- at TARGET_CFLAGS@}"
> CXXFLAGS="${CXXFLAGS:- at TARGET_CXXFLAGS@}"
> LDFLAGS="${LDFLAGS:- at TARGET_LDFLAGS@}"
>
> However, defaulting to CPP, CC, or CXX breaks some packages because they may
> hard code CC to the system CC.
>
> One such package is libostree which has the line
> "INTROSPECTION_SCANNER_ENV = CC=gcc" in the Makefile.
But then, that's clearly a bug in libostree! They should not ever try to
call a hard-coded compiler. If a user would even do a native build with
an alternate compiler:
CC=${HOME}/foo/bin/my-gcc-12.42 ./configure
Then the above would also break anyway. It's not even just about
cross-compilation. We should fix libostree and send them the fix.
Probably they should do something like:
INTROSPECTION_SCANNER_ENV = CC=${CC}
With that commit log of yours, the problem is now obvious, while it did
not look like it when we discussed on IRC, hence my comments now...
Note that my comments above do not preclude us fixing our wrapper with
this patch of yours, but if there is no need to do, I'd like to avoid
it.
Regards,
Yann E. MORIN.
> Because g-ir-scanner defaults CC to a predefined CC instead of explicitly
> overwriting it, the CC passed from the makefile is used, and linking errors
> occur as a result.
>
> Remove the defaults for the following and explicitly set the paths to the
> proper cross-toolchain binaries:
> CPP, CC, CXX
>
> Fixes
> http://autobuild.buildroot.org/results/f8a14307e6feff61acd963d6cd2aac289e6d1647
>
> Signed-off-by: Adam Duskett <Aduskett@gmail.com>
> ---
> package/gobject-introspection/g-ir-scanner.in | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/package/gobject-introspection/g-ir-scanner.in b/package/gobject-introspection/g-ir-scanner.in
> index 22df7be309..6fc495389e 100644
> --- a/package/gobject-introspection/g-ir-scanner.in
> +++ b/package/gobject-introspection/g-ir-scanner.in
> @@ -5,9 +5,9 @@
> # the variables blank (LDFLAGS, CFLAGS, and CPPFLAGS.)
> # Export these variables to ensure all build systems can generate .gir and
> # .typelib files properly.
> -export CPP="${CPP:-${HOST_DIR}/bin/@BASENAME_TARGET_CPP@}"
> -export CC="${CC:-${HOST_DIR}/bin/@BASENAME_TARGET_CC@}"
> -export CXX="${CXX:-${HOST_DIR}/bin/@BASENAME_TARGET_CXX@}"
> +export CPP="${HOST_DIR}/bin/@BASENAME_TARGET_CPP@"
> +export CC="${HOST_DIR}/bin/@BASENAME_TARGET_CC@"
> +export CXX="${HOST_DIR}/bin/@BASENAME_TARGET_CXX@"
> export CPPFLAGS="${CPPFLAGS:- at TARGET_CPPFLAGS@}"
> export CFLAGS="${CFLAGS:- at TARGET_CFLAGS@}"
> export CXXFLAGS="${CXXFLAGS:- at TARGET_CXXFLAGS@}"
> --
> 2.25.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] package/libostree: add introspection support
2020-03-20 22:23 ` [Buildroot] [PATCH 2/2] package/libostree: add introspection support aduskett at gmail.com
@ 2020-03-22 9:31 ` Yann E. MORIN
0 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2020-03-22 9:31 UTC (permalink / raw)
To: buildroot
Adam, All,
On 2020-03-20 15:23 -0700, aduskett at gmail.com spake thusly:
> From: Adam Duskett <Aduskett@gmail.com>
>
> If gobject-introspection is selected, explicitly set --enable-introspection in
> the configure options and add a dependency for gobject-introspection.
>
> Signed-off-by: Adam Duskett <Aduskett@gmail.com>
I've sent an alternate proposal that replaces this patch, nad gets away
with the previous one too:
https://patchwork.ozlabs.org/patch/1259614/
Regards,
Yann E. MORIN.
> ---
> package/libostree/libostree.mk | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/package/libostree/libostree.mk b/package/libostree/libostree.mk
> index bdbe6b5aba..63e6bbfde3 100644
> --- a/package/libostree/libostree.mk
> +++ b/package/libostree/libostree.mk
> @@ -30,6 +30,13 @@ else
> LIBOSTREE_CONF_OPTS += --without-openssl
> endif
>
> +ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
> +LIBOSTREE_CONF_OPTS += --enable-introspection
> +LIBOSTREE_DEPENDENCIES += gobject-introspection
> +else
> +LIBOSTREE_CONF_OPTS += --disable-introspection
> +endif
> +
> # Avahi support needs libavahi-client, which is built by avahi if avahi-daemon
> # and dbus is selected. Since there is no BR2_PACKAGE_LIBAVAHI_CLIENT config
> # option yet, use the avahi-daemon and dbus config symbols to check for
> --
> 2.25.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] package/gobject-introspection/g-ir-scanner: do not set default compiler values
2020-03-21 21:47 ` [Buildroot] [PATCH 1/2] package/gobject-introspection/g-ir-scanner: do not set default compiler values Yann E. MORIN
@ 2020-03-22 21:53 ` Yann E. MORIN
0 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2020-03-22 21:53 UTC (permalink / raw)
To: buildroot
Adam, All,
On 2020-03-21 22:47 +0100, Yann E. MORIN spake thusly:
> On 2020-03-20 15:23 -0700, aduskett at gmail.com spake thusly:
> > From: Adam Duskett <Aduskett@gmail.com>
> > Commit 8b0aeafce2a22913e6a44818227f6a39e3225157 set 7 new variables in
> > g-ir-scanner.in:
> >
> > export CPP="${CPP:-${HOST_DIR}/bin/@BASENAME_TARGET_CPP@}"
> > export CC="${CC:-${HOST_DIR}/bin/@BASENAME_TARGET_CC@}"
> > export CXX="${CXX:-${HOST_DIR}/bin/@BASENAME_TARGET_CXX@}"
> > CPPFLAGS="${CPPFLAGS:- at TARGET_CPPFLAGS@}"
> > CFLAGS="${CFLAGS:- at TARGET_CFLAGS@}"
> > CXXFLAGS="${CXXFLAGS:- at TARGET_CXXFLAGS@}"
> > LDFLAGS="${LDFLAGS:- at TARGET_LDFLAGS@}"
> >
> > However, defaulting to CPP, CC, or CXX breaks some packages because they may
> > hard code CC to the system CC.
> >
> > One such package is libostree which has the line
> > "INTROSPECTION_SCANNER_ENV = CC=gcc" in the Makefile.
>
> But then, that's clearly a bug in libostree! They should not ever try to
> call a hard-coded compiler.
[--SNIP--]
Mu alternate proposal was just merged, so I've marked this series as
rejected. It anyway helped understand the actual problem, so it was
definitely not in vain. Thanks! :-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-03-22 21:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-20 22:23 [Buildroot] [PATCH 1/2] package/gobject-introspection/g-ir-scanner: do not set default compiler values aduskett at gmail.com
2020-03-20 22:23 ` [Buildroot] [PATCH 2/2] package/libostree: add introspection support aduskett at gmail.com
2020-03-22 9:31 ` Yann E. MORIN
2020-03-21 21:47 ` [Buildroot] [PATCH 1/2] package/gobject-introspection/g-ir-scanner: do not set default compiler values Yann E. MORIN
2020-03-22 21:53 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox