diff mbox series

gdb: disable source-highlight

Message ID 20230811093421.300794-1-b.bilas@grinn-global.com
State Accepted
Headers show
Series gdb: disable source-highlight | expand

Commit Message

Bartosz Bilas Aug. 11, 2023, 9:34 a.m. UTC
It's being found from the host's source-highlight library
which results in the following build errors:

../../gdb/source-cache.c:37:10: fatal error: srchilite/sourcehighlight.h: No such file or directory
   37 | #include <srchilite/sourcehighlight.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[4]: *** [Makefile:1645: source-cache.o] Error 1
make[4]: *** Waiting for unfinished jobs....

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
---
 package/gdb/gdb.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Thomas Petazzoni Aug. 12, 2023, 10:50 a.m. UTC | #1
On Fri, 11 Aug 2023 11:34:21 +0200
Bartosz Bilas <b.bilas@grinn-global.com> wrote:

> It's being found from the host's source-highlight library
> which results in the following build errors:
> 
> ../../gdb/source-cache.c:37:10: fatal error: srchilite/sourcehighlight.h: No such file or directory
>    37 | #include <srchilite/sourcehighlight.h>
>       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> compilation terminated.
> make[4]: *** [Makefile:1645: source-cache.o] Error 1
> make[4]: *** Waiting for unfinished jobs....
> 
> Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>

Thanks patch applied to master, after updating the commit title to use
"package/gdb: " as the prefix, to follow our convention.

Also, I am wondering if the same should not be done for the host
variant of gdb. Indeed, we don't want to rely on the system-provided
source highlight if it's not built by Buildroot. Could you have a look
into this, and if it makes sense, send a patch?

Thanks a lot!

Thomas
Bartosz Bilas Aug. 18, 2023, 6:18 a.m. UTC | #2
Hello Thomas,

it seems you are right. I should have done tests using the docker 
instead of my arch OS. I'll try to send the patch today.

Best
Bartek
On 17.08.2023 12:27, Thomas Petazzoni wrote:
> Hello,
>
> On Mon, 14 Aug 2023 08:43:19 +0200
> Bartosz Bilas <b.bilas@grinn-global.com> wrote:
>
>> host-gdb compiles without any problems so there is no need to do that.
> It compiles fine on your machine, but it picks up a dependency that is
> not controlled by Buildroot, so it's a bad idea. Therefore,
> --disable-source-highlight should also be passed to host-gdb. If
> someone one days needs source highlight, then a host source highlight
> package should be added in Buildroot, and used as a dependency of
> host-gdb. Even though we do rely on a number of system-provided tools
> (native toolchain, basic utilities), we try to limit the scope of this
> dependency on system-provided tools/libraries.
>
> Best regards,
>
> Thomas
Peter Korsgaard Sept. 12, 2023, 9:22 p.m. UTC | #3
>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > On Fri, 11 Aug 2023 11:34:21 +0200
 > Bartosz Bilas <b.bilas@grinn-global.com> wrote:

 >> It's being found from the host's source-highlight library
 >> which results in the following build errors:
 >> 
 >> ../../gdb/source-cache.c:37:10: fatal error: srchilite/sourcehighlight.h: No such file or directory
 >> 37 | #include <srchilite/sourcehighlight.h>
 >> |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 >> compilation terminated.
 >> make[4]: *** [Makefile:1645: source-cache.o] Error 1
 >> make[4]: *** Waiting for unfinished jobs....
 >> 
 >> Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>

 > Thanks patch applied to master, after updating the commit title to use
 > "package/gdb: " as the prefix, to follow our convention.

 > Also, I am wondering if the same should not be done for the host
 > variant of gdb. Indeed, we don't want to rely on the system-provided
 > source highlight if it's not built by Buildroot. Could you have a look
 > into this, and if it makes sense, send a patch?

 > Thanks a lot!

Committed to 2023.02.x and 2023.05.x, thanks.
diff mbox series

Patch

diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk
index 4b9c5c6b70..cee7b37bcd 100644
--- a/package/gdb/gdb.mk
+++ b/package/gdb/gdb.mk
@@ -134,7 +134,8 @@  GDB_CONF_OPTS = \
 	--with-system-zlib \
 	--disable-werror \
 	--enable-static \
-	--without-mpfr
+	--without-mpfr \
+	--disable-source-highlight
 
 ifeq ($(BR2_PACKAGE_GDB_DEBUGGER),y)
 GDB_CONF_OPTS += \