Skip to contentSkip to conversation

Fix installation of crosstool-ng libraries to target

PATCH New Floris Bos 4 participants 7 messages Jan 6, 2013

lore
Share & tools
lore

Floris Bos

author
#0 lore raw

PATCH 1/1 Fix installation of crosstool-ng libraries to target

When using the crosstool-ng toolchain option, the libc libraries were not installed to target. Buildroot calls the show-tuple function to determine the directory to copy from, and it seems that outputs the result to stderr instead of stdout

---
 toolchain/toolchain-crosstool-ng/crosstool-ng.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
toolchain/toolchain-crosstool-ng/crosstool-ng.mk +1 -1
index 6f81e30..553c9ee 100644
@@ -66,7 +66,7 @@ endif
 # Actual copy
 $(STAMP_DIR)/ct-ng-toolchain-installed: $(STAMP_DIR)/ct-ng-toolchain-built
 	$(Q)mkdir -p $(TARGET_DIR)/lib
-	$(Q)CTNG_TUPLE="$$( $(call ctng,show-tuple) )";                     \
+	$(Q)CTNG_TUPLE="$$( $(call ctng,show-tuple 2>&1) )";                \
 	    CTNG_SYSROOT="$(HOST_DIR)/usr/$${CTNG_TUPLE}/sysroot";          \
 	    echo "CTNG_TUPLE='$${CTNG_TUPLE}'";                             \
 	    echo "CTNG_SYSROOT='$${CTNG_SYSROOT}'";                         \
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 Fix installation of crosstool-ng libraries to target

Floris, All,

Quoted 14 lines · On Sunday 06 January 2013 Floris Bos wrote:

When using the crosstool-ng toolchain option, the libc libraries were not installed to target. Buildroot calls the show-tuple function to determine the directory to copy from, and it seems that outputs the result to stderr instead of stdout

---
 toolchain/toolchain-crosstool-ng/crosstool-ng.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
toolchain/toolchain-crosstool-ng/crosstool-ng.mk +0 -0
index 6f81e30..553c9ee 100644

toolchain/toolchain-crosstool-ng/crosstool-ng.mk endif · line 69

Quoted 5 lines
toolchain/toolchain-crosstool-ng/crosstool-ng.mk +1 -1
@@ -66,7 +66,7 @@ endif
 # Actual copy
 $(STAMP_DIR)/ct-ng-toolchain-installed: $(STAMP_DIR)/ct-ng-toolchain-built
 	$(Q)mkdir -p $(TARGET_DIR)/lib
-	$(Q)CTNG_TUPLE="$$( $(call ctng,show-tuple) )";                     \
+	$(Q)CTNG_TUPLE="$$( $(call ctng,show-tuple 2>&1) )";                \

Indeed, that's going to stderr. That's a but in crostool-NG, it should go to stdout. Will fix in ct-ng.

In the meantime:

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 Fix installation of crosstool-ng libraries to target

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Hi,

Quoted 2 lines

toolchain/toolchain-crosstool-ng/crosstool-ng.mk endif · line 69

Quoted 2 lines
toolchain/toolchain-crosstool-ng/crosstool-ng.mk +1 -1
-	$(Q)CTNG_TUPLE="$$( $(call ctng,show-tuple) )";                     \
+	$(Q)CTNG_TUPLE="$$( $(call ctng,show-tuple 2>&1) )";                \

Yann> Indeed, that's going to stderr. That's a but in crostool-NG, it Yann> should go to stdout. Will fix in ct-ng.

Yann> In the meantime:
Yann> Acked-by: "Yann E. MORIN" <[email protected]>

Thanks. Does this mean the internal ctng backend has never worked at runtime?

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/1 Fix installation of crosstool-ng libraries to target

Peter, All,

Quoted 11 lines · On Sunday 06 January 2013 Peter Korsgaard wrote:
Quoted 3 lines

toolchain/toolchain-crosstool-ng/crosstool-ng.mk endif · line 69

Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

toolchain/toolchain-crosstool-ng/crosstool-ng.mk +1 -1
-	$(Q)CTNG_TUPLE="$$( $(call ctng,show-tuple) )";                     \
+	$(Q)CTNG_TUPLE="$$( $(call ctng,show-tuple 2>&1) )";                \

Yann> Indeed, that's going to stderr. That's a but in crostool-NG, it Yann> should go to stdout. Will fix in ct-ng.

Yann> In the meantime:
Yann> Acked-by: "Yann E. MORIN" <[email protected]>

Thanks. Does this mean the internal ctng backend has never worked at runtime?

Nope, it's only since the last update.

Long story made short:
- ct-ng uses some fd redirection for its log
- previously, fd #7 was not used for this
- showtuple redirected fd #7 to stdout, and it worked
- last ct-ng version introduced the 'debug-shell' feature
- the debug-shell redirects fd #7 to stderr
- and it breaks now.

I did not catch this, as I did not do the update to ct-ng in Buildroot, so did not run any test. Also, I'm currently using pre-built toolchains for my current experiments, so it slipped through...

I've already fixed it in ct-ng right now, and I'm testing integration in Buildroot (first test just finished OK).

I will push an updated patch later today.

It also means that people seldom use the ct-ng backend, and people either use the internal backend, or external toolchains. So, a couple of questions:
- should we finally switch over to using the ct-ng backend by default?
- is it worth maintaing the ct-ng backend at all?

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

PATCH 1/1 Fix installation of crosstool-ng libraries to target

Dear Yann E. MORIN,

Quoted 4 lines · Yann E. MORIN

It also means that people seldom use the ct-ng backend, and people either use the internal backend, or external toolchains. So, a couple of questions:
- should we finally switch over to using the ct-ng backend by default?
- is it worth maintaing the ct-ng backend at all?

As far as autobuilders are concerned, the ct-ng backend is tested, but this bug was apparently not breaking the build, but only the execution. Therefore, it was not detected by the autobuilders.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#5 lore raw

PATCH 1/1 Fix installation of crosstool-ng libraries to target

In reply to Yann E. MORIN
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Hi,

Yann> It also means that people seldom use the ct-ng backend, and Yann> people either use the internal backend, or external Yann> toolchains. So, a couple of questions:

Yann> - should we finally switch over to using the ct-ng backend by default?
Yann> - is it worth maintaing the ct-ng backend at all?

I think we all agree that the long term plan is to deprecate the internal toolchain option. I do think that it's getting a bit late for the current cycle, but lets discuss at the dev day and change the default for the 2013.05 cycle if everyone agrees.

Signature · 1 line
Bye, Peter Korsgaard
#6 lore raw

PATCH 1/1 Fix installation of crosstool-ng libraries to target

In reply to Floris Bos
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Floris" == Floris Bos <[email protected]> writes:

Floris> When using the crosstool-ng toolchain option, the libc Floris> libraries were not installed to target. Buildroot calls the Floris> show-tuple function to determine the directory to copy from, Floris> and it seems that outputs the result to stderr instead of Floris> stdout

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard