* [Buildroot] [PATCH 0/2] Some more netsurf fixes
@ 2019-05-09 20:28 Thomas Petazzoni
2019-05-09 20:28 ` [Buildroot] [PATCH 1/2] package/netsurf: change how CFLAGS/LDFLAGS are passed Thomas Petazzoni
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2019-05-09 20:28 UTC (permalink / raw)
To: buildroot
Hello,
On my machine, netsurf does not even build due to commit
6da049f8ae61b956d135526722ce58fc2f67626a. My PATCH 1/2 fixes that, but
it still remains fragile as CFLAGS/LDFLAGS are used for both building
target objects and host tools. For example, with my PATCH 1/2 applied,
if BR2_STATIC_LIBS is enabled, -static is passed in LDFLAGS, and
netsurf fails to build on my machine with "-lc not found" because it
passes -static when building host tools, and I don't have a static
glibc installed on my machine.
PATCH 2/2 disable static linking for netsurf, which was anyway failing
to build for months in the autobuilders.
To be honest, the netsurf build system is broken beyond repair, and is
a royal pain to work with. Since nobody has acted to fix those build
issues for the past months, if my patches are not sufficient (and as I
said, they *are* fragile), I will propose to simply remove the netsurf
package.
Best regards,
Thomas
Thomas Petazzoni (2):
package/netsurf: change how CFLAGS/LDFLAGS are passed
package/netsurf: do not allow on static linking configurations
package/netsurf/Config.in | 5 +++++
package/netsurf/netsurf.mk | 9 +++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
--
2.21.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 1/2] package/netsurf: change how CFLAGS/LDFLAGS are passed
2019-05-09 20:28 [Buildroot] [PATCH 0/2] Some more netsurf fixes Thomas Petazzoni
@ 2019-05-09 20:28 ` Thomas Petazzoni
2019-05-09 20:52 ` Thomas Petazzoni
2019-06-05 21:01 ` Peter Korsgaard
2019-05-09 20:28 ` [Buildroot] [PATCH 2/2] package/netsurf: do not allow on static linking configurations Thomas Petazzoni
2019-05-26 11:42 ` [Buildroot] [PATCH 0/2] Some more netsurf fixes Arnout Vandecappelle
2 siblings, 2 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2019-05-09 20:28 UTC (permalink / raw)
To: buildroot
In commit 6da049f8ae61b956d135526722ce58fc2f67626a ("package/netsurf:
fix build"), the CC variable passed to netsurf's build system was
extended to pass some special -I and -L options needed for netsurf to
find its own headers/libraries.
Unfortunately, on some systems (including mine), it breaks the build,
due to:
toolpath_ := $(shell /bin/which $(CC__))
when $(CC__) contains some -I/-L options, they are considered to be
options "to which", which causes the funny:
/usr/bin/make install --directory=libnslog HOST=arm-buildroot-linux-uclibcgnueabi PREFIX=/home/thomas/projets/outputs/shared-netsurf/build/netsurf-3.8/tmpusr Q=@ WARNFLAGS='-Wall -W -Wno-error' DESTDIR=
make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
/bin/which: invalid option -- 'I'
/bin/which: invalid option -- '/'
/bin/which: invalid option -- 'h'
/bin/which: invalid option -- 'o'
/bin/which: invalid option -- 'm'
/bin/which: invalid option -- 'e'
/bin/which: invalid option -- '/'
/bin/which: invalid option -- 't'
/bin/which: invalid option -- 'h'
/bin/which: invalid option -- 'o'
/bin/which: invalid option -- 'm'
/bin/which: invalid option -- 's'
/bin/which: invalid option -- '/'
[...]
/bin/which: invalid option -- 'l'
/bin/which: invalid option -- 'b'
/bin/which: --read-alias, -i: Warning: stdin is a tty.
and the build simply hangs.
We cannot pass CFLAGS/LDFLAGS as make options, as they would override
the CFLAGS definitions in netsurf Makefiles. However, those Makefiles
use the construct:
CFLAGS := $(CFLAGS) -more-flags
so by passing CFLAGS and LDFLAGS through the make environment, which
can achieve our goal.
It is worth mentioning that it remains very fragile, because
CFLAGS/LDFLAGS are used both for building target objects but also some
host tools. The netsurf build system is really not good.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
package/netsurf/netsurf.mk | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/package/netsurf/netsurf.mk b/package/netsurf/netsurf.mk
index e617707ade..31cf9e62b8 100644
--- a/package/netsurf/netsurf.mk
+++ b/package/netsurf/netsurf.mk
@@ -70,13 +70,18 @@ define NETSURF_CONFIGURE_CMDS
$(NETSURF_CURL_CONFIGURE_CMDS)
endef
+NETSURF_MAKE_ENV = \
+ $(TARGET_MAKE_ENV) \
+ CFLAGS="$(TARGET_CFLAGS) -I$(@D)/tmpusr/include" \
+ LDFLAGS="$(TARGET_LDFLAGS) -L$(@D)/tmpusr/lib"
+
NETSURF_MAKE_OPTS = \
TARGET=$(NETSURF_FRONTEND) \
BISON="$(HOST_DIR)/bin/bison" \
FLEX="$(HOST_DIR)/bin/flex" \
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
BUILD_CC="$(HOSTCC)" \
- CC="$(TARGET_CC) -I$(@D)/tmpusr/include -L$(@D)/tmpusr/lib" \
+ CC="$(TARGET_CC)" \
AR="$(TARGET_AR)" \
TMP_PREFIX=$(@D)/tmpusr \
NETSURF_CONFIG="$(NETSURF_CONFIG)" \
@@ -84,7 +89,7 @@ NETSURF_MAKE_OPTS = \
define NETSURF_BUILD_CMDS
mkdir -p $(@D)/tmpusr
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(NETSURF_MAKE_OPTS) \
+ $(NETSURF_MAKE_ENV) $(MAKE) -C $(@D) $(NETSURF_MAKE_OPTS) \
build
endef
--
2.21.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 2/2] package/netsurf: do not allow on static linking configurations
2019-05-09 20:28 [Buildroot] [PATCH 0/2] Some more netsurf fixes Thomas Petazzoni
2019-05-09 20:28 ` [Buildroot] [PATCH 1/2] package/netsurf: change how CFLAGS/LDFLAGS are passed Thomas Petazzoni
@ 2019-05-09 20:28 ` Thomas Petazzoni
2019-05-14 21:13 ` Peter Korsgaard
2019-06-05 21:01 ` Peter Korsgaard
2019-05-26 11:42 ` [Buildroot] [PATCH 0/2] Some more netsurf fixes Arnout Vandecappelle
2 siblings, 2 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2019-05-09 20:28 UTC (permalink / raw)
To: buildroot
Static linking does not work properly in netsurf, nobody fixed it, and
the netsurf build system is completely broken. Let's disable the
package for static linking configurations.
Fixes:
http://autobuild.buildroot.net/results/28b43c29e241080e23c87145797ea00dc4b3970d/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
package/netsurf/Config.in | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/package/netsurf/Config.in b/package/netsurf/Config.in
index 8a301e6218..30b2695309 100644
--- a/package/netsurf/Config.in
+++ b/package/netsurf/Config.in
@@ -1,5 +1,10 @@
+comment "netsurf needs a toolchain w/ dynamic library"
+ depends on BR2_STATIC_LIBS
+
config BR2_PACKAGE_NETSURF
bool "netsurf"
+ # static linking support is broken beyond repair
+ depends on !BR2_STATIC_LIBS
select BR2_PACKAGE_EXPAT
select BR2_PACKAGE_JPEG
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
--
2.21.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 1/2] package/netsurf: change how CFLAGS/LDFLAGS are passed
2019-05-09 20:28 ` [Buildroot] [PATCH 1/2] package/netsurf: change how CFLAGS/LDFLAGS are passed Thomas Petazzoni
@ 2019-05-09 20:52 ` Thomas Petazzoni
2019-05-14 21:12 ` Peter Korsgaard
2019-06-05 21:01 ` Peter Korsgaard
1 sibling, 1 reply; 10+ messages in thread
From: Thomas Petazzoni @ 2019-05-09 20:52 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, 9 May 2019 22:28:07 +0200
Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> In commit 6da049f8ae61b956d135526722ce58fc2f67626a ("package/netsurf:
> fix build"), the CC variable passed to netsurf's build system was
> extended to pass some special -I and -L options needed for netsurf to
> find its own headers/libraries.
>
> Unfortunately, on some systems (including mine), it breaks the build,
> due to:
>
> toolpath_ := $(shell /bin/which $(CC__))
>
> when $(CC__) contains some -I/-L options, they are considered to be
> options "to which", which causes the funny:
>
> /usr/bin/make install --directory=libnslog HOST=arm-buildroot-linux-uclibcgnueabi PREFIX=/home/thomas/projets/outputs/shared-netsurf/build/netsurf-3.8/tmpusr Q=@ WARNFLAGS='-Wall -W -Wno-error' DESTDIR=
> make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
In fact, I discovered that the autobuilders have encountered this issue
as well:
powerpc64 | netsurf | TIM | http://autobuild.buildroot.net/results/eeb2863c6237aac8428e49a5ee514d43088b0fb8 |
x86_64 | netsurf | TIM | http://autobuild.buildroot.net/results/f938fd1515f1d6e11b57aa6e314135789da52a44 |
Both of those timeouts would be fixed by this patch.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 1/2] package/netsurf: change how CFLAGS/LDFLAGS are passed
2019-05-09 20:52 ` Thomas Petazzoni
@ 2019-05-14 21:12 ` Peter Korsgaard
0 siblings, 0 replies; 10+ messages in thread
From: Peter Korsgaard @ 2019-05-14 21:12 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> Hello,
> On Thu, 9 May 2019 22:28:07 +0200
> Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
>> In commit 6da049f8ae61b956d135526722ce58fc2f67626a ("package/netsurf:
>> fix build"), the CC variable passed to netsurf's build system was
>> extended to pass some special -I and -L options needed for netsurf to
>> find its own headers/libraries.
>>
>> Unfortunately, on some systems (including mine), it breaks the build,
>> due to:
>>
>> toolpath_ := $(shell /bin/which $(CC__))
>>
>> when $(CC__) contains some -I/-L options, they are considered to be
>> options "to which", which causes the funny:
>>
>> /usr/bin/make install --directory=libnslog
>> HOST=arm-buildroot-linux-uclibcgnueabi
>> PREFIX=/home/thomas/projets/outputs/shared-netsurf/build/netsurf-3.8/tmpusr
>> Q=@ WARNFLAGS='-Wall -W -Wno-error' DESTDIR=
>> make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
> In fact, I discovered that the autobuilders have encountered this issue
> as well:
> powerpc64 | netsurf | TIM | http://autobuild.buildroot.net/results/eeb2863c6237aac8428e49a5ee514d43088b0fb8 |
> x86_64 | netsurf | TIM | http://autobuild.buildroot.net/results/f938fd1515f1d6e11b57aa6e314135789da52a44 |
> Both of those timeouts would be fixed by this patch.
Committed after adding these two autobuilder references, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 2/2] package/netsurf: do not allow on static linking configurations
2019-05-09 20:28 ` [Buildroot] [PATCH 2/2] package/netsurf: do not allow on static linking configurations Thomas Petazzoni
@ 2019-05-14 21:13 ` Peter Korsgaard
2019-06-05 21:01 ` Peter Korsgaard
1 sibling, 0 replies; 10+ messages in thread
From: Peter Korsgaard @ 2019-05-14 21:13 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> Static linking does not work properly in netsurf, nobody fixed it, and
> the netsurf build system is completely broken. Let's disable the
> package for static linking configurations.
> Fixes:
> http://autobuild.buildroot.net/results/28b43c29e241080e23c87145797ea00dc4b3970d/
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 0/2] Some more netsurf fixes
2019-05-09 20:28 [Buildroot] [PATCH 0/2] Some more netsurf fixes Thomas Petazzoni
2019-05-09 20:28 ` [Buildroot] [PATCH 1/2] package/netsurf: change how CFLAGS/LDFLAGS are passed Thomas Petazzoni
2019-05-09 20:28 ` [Buildroot] [PATCH 2/2] package/netsurf: do not allow on static linking configurations Thomas Petazzoni
@ 2019-05-26 11:42 ` Arnout Vandecappelle
2019-05-26 21:15 ` Peter Korsgaard
2 siblings, 1 reply; 10+ messages in thread
From: Arnout Vandecappelle @ 2019-05-26 11:42 UTC (permalink / raw)
To: buildroot
On 09/05/2019 22:28, Thomas Petazzoni wrote:
> Hello,
>
> On my machine, netsurf does not even build due to commit
> 6da049f8ae61b956d135526722ce58fc2f67626a. My PATCH 1/2 fixes that, but
> it still remains fragile as CFLAGS/LDFLAGS are used for both building
> target objects and host tools. For example, with my PATCH 1/2 applied,
> if BR2_STATIC_LIBS is enabled, -static is passed in LDFLAGS, and
> netsurf fails to build on my machine with "-lc not found" because it
> passes -static when building host tools, and I don't have a static
> glibc installed on my machine.
>
> PATCH 2/2 disable static linking for netsurf, which was anyway failing
> to build for months in the autobuilders.
>
> To be honest, the netsurf build system is broken beyond repair, and is
> a royal pain to work with. Since nobody has acted to fix those build
I have taken a quick look, and it doesn't seem *that* bad... There's just
nsgenbind that needs to be built for the host, and it could be done by make a
host-netsurf package that sets NSLIB_TARG to empty, and set NSBUILD_TARG to
empty in the target build. It seems to find the binary through PATH, so there's
not even a need to patch anything.
> issues for the past months, if my patches are not sufficient (and as I
> said, they *are* fragile), I will propose to simply remove the netsurf
> package.
However, since indeed nobody stepped up, I'm definitely in favour of removing
the package entirely.
Regards,
Arnout
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 0/2] Some more netsurf fixes
2019-05-26 11:42 ` [Buildroot] [PATCH 0/2] Some more netsurf fixes Arnout Vandecappelle
@ 2019-05-26 21:15 ` Peter Korsgaard
0 siblings, 0 replies; 10+ messages in thread
From: Peter Korsgaard @ 2019-05-26 21:15 UTC (permalink / raw)
To: buildroot
>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:
Hi,
>> issues for the past months, if my patches are not sufficient (and as I
>> said, they *are* fragile), I will propose to simply remove the netsurf
>> package.
> However, since indeed nobody stepped up, I'm definitely in favour of removing
> the package entirely.
Me too, carrying a broken package that nobody is interested in fixing
doesn't make much sense.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 1/2] package/netsurf: change how CFLAGS/LDFLAGS are passed
2019-05-09 20:28 ` [Buildroot] [PATCH 1/2] package/netsurf: change how CFLAGS/LDFLAGS are passed Thomas Petazzoni
2019-05-09 20:52 ` Thomas Petazzoni
@ 2019-06-05 21:01 ` Peter Korsgaard
1 sibling, 0 replies; 10+ messages in thread
From: Peter Korsgaard @ 2019-06-05 21:01 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> In commit 6da049f8ae61b956d135526722ce58fc2f67626a ("package/netsurf:
> fix build"), the CC variable passed to netsurf's build system was
> extended to pass some special -I and -L options needed for netsurf to
> find its own headers/libraries.
> Unfortunately, on some systems (including mine), it breaks the build,
> due to:
> toolpath_ := $(shell /bin/which $(CC__))
> when $(CC__) contains some -I/-L options, they are considered to be
> options "to which", which causes the funny:
> /usr/bin/make install --directory=libnslog HOST=arm-buildroot-linux-uclibcgnueabi PREFIX=/home/thomas/projets/outputs/shared-netsurf/build/netsurf-3.8/tmpusr Q=@ WARNFLAGS='-Wall -W -Wno-error' DESTDIR=
> make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
> /bin/which: invalid option -- 'I'
> /bin/which: invalid option -- '/'
> /bin/which: invalid option -- 'h'
> /bin/which: invalid option -- 'o'
> /bin/which: invalid option -- 'm'
> /bin/which: invalid option -- 'e'
> /bin/which: invalid option -- '/'
> /bin/which: invalid option -- 't'
> /bin/which: invalid option -- 'h'
> /bin/which: invalid option -- 'o'
> /bin/which: invalid option -- 'm'
> /bin/which: invalid option -- 's'
> /bin/which: invalid option -- '/'
> [...]
> /bin/which: invalid option -- 'l'
> /bin/which: invalid option -- 'b'
> /bin/which: --read-alias, -i: Warning: stdin is a tty.
> and the build simply hangs.
> We cannot pass CFLAGS/LDFLAGS as make options, as they would override
> the CFLAGS definitions in netsurf Makefiles. However, those Makefiles
> use the construct:
> CFLAGS := $(CFLAGS) -more-flags
> so by passing CFLAGS and LDFLAGS through the make environment, which
> can achieve our goal.
> It is worth mentioning that it remains very fragile, because
> CFLAGS/LDFLAGS are used both for building target objects but also some
> host tools. The netsurf build system is really not good.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Committed to 2019.02.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 2/2] package/netsurf: do not allow on static linking configurations
2019-05-09 20:28 ` [Buildroot] [PATCH 2/2] package/netsurf: do not allow on static linking configurations Thomas Petazzoni
2019-05-14 21:13 ` Peter Korsgaard
@ 2019-06-05 21:01 ` Peter Korsgaard
1 sibling, 0 replies; 10+ messages in thread
From: Peter Korsgaard @ 2019-06-05 21:01 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> Static linking does not work properly in netsurf, nobody fixed it, and
> the netsurf build system is completely broken. Let's disable the
> package for static linking configurations.
> Fixes:
> http://autobuild.buildroot.net/results/28b43c29e241080e23c87145797ea00dc4b3970d/
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Committed to 2019.02.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-06-05 21:01 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-09 20:28 [Buildroot] [PATCH 0/2] Some more netsurf fixes Thomas Petazzoni
2019-05-09 20:28 ` [Buildroot] [PATCH 1/2] package/netsurf: change how CFLAGS/LDFLAGS are passed Thomas Petazzoni
2019-05-09 20:52 ` Thomas Petazzoni
2019-05-14 21:12 ` Peter Korsgaard
2019-06-05 21:01 ` Peter Korsgaard
2019-05-09 20:28 ` [Buildroot] [PATCH 2/2] package/netsurf: do not allow on static linking configurations Thomas Petazzoni
2019-05-14 21:13 ` Peter Korsgaard
2019-06-05 21:01 ` Peter Korsgaard
2019-05-26 11:42 ` [Buildroot] [PATCH 0/2] Some more netsurf fixes Arnout Vandecappelle
2019-05-26 21:15 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox