Skip to contentSkip to conversation

C++ not supported by bootlin toolchain

Buildroot [email protected] 1 participant 8 messages Oct 7, 2023 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

https://bugs.busybox.net/show_bug.cgi?id=15814

Yann E. MORIN <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |INVALID

--- Comment #1 from Yann E. MORIN <[email protected]> --- stsp, All,

Quoted 3 lines

So it seems the config doesn't allow to
enable C++ support together with selecting
bootlin toolchain.

Have you actually tried to enable a package written in C++?

The symbols you reference are just intermediate symbols, that ultimately select BR2_INSTALL_LIBSTDCPP, which is the one symbol that represents whether C++ is available in the toolchain. All Bootlin toolchains with C++ support do select that symbol.

Quoted 1 line

Is there anything that can be done with that?

No, because it is already working as expected.

Regards,
Yann E. MORIN.

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to a message not in the archive

https://bugs.busybox.net/show_bug.cgi?id=15814

--- Comment #2 from stsp <[email protected]> ---

Quoted 1 line

Have you actually tried to enable a package written in C++?

Of course!
Even if BR2_INSTALL_LIBSTDCPP is enabled,
with bootlin tool-chain there is still no
host g++ so the compilation fails.

Quoted 1 line

No, because it is already working as expected.

I think this is a premature judgement.

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw
In reply to a message not in the archive

https://bugs.busybox.net/show_bug.cgi?id=15814

--- Comment #3 from Yann E. MORIN <[email protected]> --- stsp, All,

Quoted 2 lines

with bootlin tool-chain there is still no
host g++

The Bootlin tolchains are cross toolchains; they compile for the target, not for the host. The host C++ compiler is not provided by the cross toolchain.

The host toolchain (of which g++ is part) is to be provided by the distribution you use on your host system; Buildroot does not handle it at all: it is expected to be present. Install the C++ part of the toolchain from your distribution; if that does not exist, ask your distribution to package it.

Quoted 1 line

so the compilation fails.

What exactly fails? Please provide a log of the failing build.

Quoted 1 line

I think this is a premature judgement.

Maybe... Does not look like it, though: the Bootlin toolchains are widely used, and I know for a fact that they do support C++ for the target, for using that daily.

Regards,
Yann E. MORIN.

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw
In reply to a message not in the archive

https://bugs.busybox.net/show_bug.cgi?id=15814

--- Comment #4 from stsp <[email protected]> ---
OK, I am sorry, "make clean" have
fixed the problem.
The problem was the missing
output/host/bin/x86_64-linux-g++
(host g++), but its now there.
So not sure what happened. :(

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw
In reply to a message not in the archive

https://bugs.busybox.net/show_bug.cgi?id=15814

--- Comment #5 from Yann E. MORIN <[email protected]> --- stsp, All,

Quoted 1 line

"make clean" have fixed the problem.

If you change the toolchain settings in menuconfig, then you have to rebuild from scratch; see the manual:

https://buildroot.org/downloads/manual/manual.html#full-rebuild

Quoted 1 line

output/host/bin/x86_64-linux-g++ (host g++)

This is not the host C++ compiler. This is the cross-compiler.

It looks like you just happen to have an x86-64 target, like you have an x86-64 host.

Regards,
Yann E. MORIN.

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw
In reply to a message not in the archive

https://bugs.busybox.net/show_bug.cgi?id=15814

--- Comment #6 from stsp <[email protected]> ---

Quoted 2 lines

If you change the toolchain settings in menuconfig, then you have to rebuild from scratch; see the manual:

Treating such things anyhow but bugs, is quite unhelpful. :)
If you know "make clean" is now needed, then please tell me so on exit from menuconfig. Either by printing such a message, or, better yet, asking to run "make clean" (ok/cancel) before exiting TUI.

Quoted 2 lines

It looks like you just happen to have an x86-64 target, like you have an x86-64 host.

I see, thanks.
So "host" in a dir name, doesn't make it a host compiler. Just a cross-compiler that runs on host.

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#7 lore raw
In reply to a message not in the archive

https://bugs.busybox.net/show_bug.cgi?id=15814

--- Comment #7 from Yann E. MORIN <[email protected]> --- stsp, All,0

Quoted 8 lines

Treating such things anyhow but bugs, is quite unhelpful. :)
If you know "make clean" is now needed, then please tell me so on exit from menuconfig. Either by printing such a message, or, better yet, asking to run "make clean" (ok/cancel) before exiting TUI.

Rebuilding from scratch after menuconfig is not always required; if one just adds a new package which has no dependency and is not the dependency of another, then this is usually OK, and running "make" again is often just enough.

So no, this is not a bug, and this is expected behaviour. It has limitations, and those are thoroughly explained in the manual.

Regards,
Yann E. MORIN.

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#8 lore raw
In reply to a message not in the archive

https://bugs.busybox.net/show_bug.cgi?id=15814

--- Comment #8 from stsp <[email protected]> ---

Quoted 1 line

Rebuilding from scratch after menuconfig is not always required;

I am not saying about "always". Likewise, you pop up the "save settings?" TUI dialog only if the settings changed. You can do the same here by alerting the user when needed, or even offering to do the "make clean" from TUI.

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot