* [Buildroot] ARM cross compiler path error "no such file or directory"
@ 2017-07-06 14:34 Mark Jackson
2017-07-06 15:35 ` Thomas Petazzoni
0 siblings, 1 reply; 9+ messages in thread
From: Mark Jackson @ 2017-07-06 14:34 UTC (permalink / raw)
To: buildroot
I can successfully compile "beaglebone_defconfig".
$ make clean
$ make beaglebone_defconfig
$ make
And in output/host/usr/bin, I can find all the "arm-linux-xyz" cross compiler tools (gcc, strings, strip, etc).
But when I try to use these to compile my own code, I get an error as follows:-
$ which arm-linux-gcc
/home/mpfj/buildroot/output/host/usr/bin/arm-linux-gcc
$ arm-linux-gcc
/home/mpfj/buildroot/output/usr/bin/arm-linux-gcc.br_real: No such file or directory
Quite correctly, "output/usr/bin" doesn't exist ... the files are in "output/host/usr/bin"
^^^^
arm-linux-gcc is just a symlink to toolchain-wrapper, so toolchain-wrapper seems to be pointing to the wrong directory!!
I'm sure was working yesterday, but I did a "git pull" this morning, so it may be something quite recent ??
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] ARM cross compiler path error "no such file or directory"
2017-07-06 14:34 [Buildroot] ARM cross compiler path error "no such file or directory" Mark Jackson
@ 2017-07-06 15:35 ` Thomas Petazzoni
2017-07-06 21:50 ` Arnout Vandecappelle
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2017-07-06 15:35 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, 6 Jul 2017 15:34:27 +0100, Mark Jackson wrote:
> I can successfully compile "beaglebone_defconfig".
>
> $ make clean
> $ make beaglebone_defconfig
> $ make
>
> And in output/host/usr/bin, I can find all the "arm-linux-xyz" cross compiler tools (gcc, strings, strip, etc).
>
> But when I try to use these to compile my own code, I get an error as follows:-
>
> $ which arm-linux-gcc
> /home/mpfj/buildroot/output/host/usr/bin/arm-linux-gcc
> $ arm-linux-gcc
> /home/mpfj/buildroot/output/usr/bin/arm-linux-gcc.br_real: No such file or directory
>
> Quite correctly, "output/usr/bin" doesn't exist ... the files are in "output/host/usr/bin"
>
> arm-linux-gcc is just a symlink to toolchain-wrapper, so toolchain-wrapper seems to be pointing to the wrong directory!!
>
> I'm sure was working yesterday, but I did a "git pull" this morning, so it may be something quite recent ??
We pushed some changes over the last few days that moved everything in
$(HOST_DIR)/usr up into $(HOST_DIR), so it is possible that there are
some regressions.
Arnout? :-)
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] ARM cross compiler path error "no such file or directory"
2017-07-06 15:35 ` Thomas Petazzoni
@ 2017-07-06 21:50 ` Arnout Vandecappelle
2017-07-07 7:24 ` Thomas Petazzoni
2017-07-08 14:08 ` [Buildroot] ARM cross compiler path error "no such file or directory" Marcus Hoffmann
0 siblings, 2 replies; 9+ messages in thread
From: Arnout Vandecappelle @ 2017-07-06 21:50 UTC (permalink / raw)
To: buildroot
On 06-07-17 17:35, Thomas Petazzoni wrote:
> Hello,
>
> On Thu, 6 Jul 2017 15:34:27 +0100, Mark Jackson wrote:
>
>> I can successfully compile "beaglebone_defconfig".
>>
>> $ make clean
>> $ make beaglebone_defconfig
>> $ make
>>
>> And in output/host/usr/bin, I can find all the "arm-linux-xyz" cross compiler tools (gcc, strings, strip, etc).
>>
>> But when I try to use these to compile my own code, I get an error as follows:-
>>
>> $ which arm-linux-gcc
>> /home/mpfj/buildroot/output/host/usr/bin/arm-linux-gcc
>> $ arm-linux-gcc
>> /home/mpfj/buildroot/output/usr/bin/arm-linux-gcc.br_real: No such file or directory
>>
>> Quite correctly, "output/usr/bin" doesn't exist ... the files are in "output/host/usr/bin"
>>
>> arm-linux-gcc is just a symlink to toolchain-wrapper, so toolchain-wrapper seems to be pointing to the wrong directory!!
>>
>> I'm sure was working yesterday, but I did a "git pull" this morning, so it may be something quite recent ??
>
> We pushed some changes over the last few days that moved everything in
> $(HOST_DIR)/usr up into $(HOST_DIR), so it is possible that there are
> some regressions.
You need to rebuild the toolchain (actually the toolchain wrapper) after this
change. And probably other things need to be rebuilt as well. To be safe, do a
"make clean; make".
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] ARM cross compiler path error "no such file or directory"
2017-07-06 21:50 ` Arnout Vandecappelle
@ 2017-07-07 7:24 ` Thomas Petazzoni
2017-07-07 7:43 ` [Buildroot] [PATCH] toolchain-wrapper: fix breakage after host/usr removal Arnout Vandecappelle
2017-07-08 14:08 ` [Buildroot] ARM cross compiler path error "no such file or directory" Marcus Hoffmann
1 sibling, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2017-07-07 7:24 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, 6 Jul 2017 23:50:39 +0200, Arnout Vandecappelle wrote:
> > On Thu, 6 Jul 2017 15:34:27 +0100, Mark Jackson wrote:
> >
> >> I can successfully compile "beaglebone_defconfig".
> >>
> >> $ make clean
> >> $ make beaglebone_defconfig
> >> $ make
> >>
> >> And in output/host/usr/bin, I can find all the "arm-linux-xyz" cross compiler tools (gcc, strings, strip, etc).
> >>
> >> But when I try to use these to compile my own code, I get an error as follows:-
> >>
> >> $ which arm-linux-gcc
> >> /home/mpfj/buildroot/output/host/usr/bin/arm-linux-gcc
> >> $ arm-linux-gcc
> >> /home/mpfj/buildroot/output/usr/bin/arm-linux-gcc.br_real: No such file or directory
> >>
> >> Quite correctly, "output/usr/bin" doesn't exist ... the files are in "output/host/usr/bin"
> >>
> >> arm-linux-gcc is just a symlink to toolchain-wrapper, so toolchain-wrapper seems to be pointing to the wrong directory!!
> >>
> >> I'm sure was working yesterday, but I did a "git pull" this morning, so it may be something quite recent ??
> >
> > We pushed some changes over the last few days that moved everything in
> > $(HOST_DIR)/usr up into $(HOST_DIR), so it is possible that there are
> > some regressions.
>
> You need to rebuild the toolchain (actually the toolchain wrapper) after this
> change. And probably other things need to be rebuilt as well. To be safe, do a
> "make clean; make".
Re-read the original message from Mark: he starts by saying that he has
done "make clean; make beaglebone_defconfig; make".
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] toolchain-wrapper: fix breakage after host/usr removal
2017-07-07 7:24 ` Thomas Petazzoni
@ 2017-07-07 7:43 ` Arnout Vandecappelle
2017-07-07 11:12 ` Mark Jackson
2017-07-07 11:58 ` Thomas Petazzoni
0 siblings, 2 replies; 9+ messages in thread
From: Arnout Vandecappelle @ 2017-07-07 7:43 UTC (permalink / raw)
To: buildroot
The toolchain wrapper, when called through PATH, strips the last three
levels of /proc/self/exe to find HOST_DIR. However, after the host/usr
removal, this should be just two levels.
The toolchain wrapper has different logic for when it is called with a
full path (i.e. $HOST_DIR/usr/bin/arm-linux-gcc) then when it is called
through the PATH (i.e. just arm-linux-gcc). The latter is never used
internally in Buildroot, that's why this wasn't discovered through
testing.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Mark Jackson <mpfj-list@newflow.co.uk>
---
Sorry for the breakage :-)
Note to self: add a test for calling the toolchain through PATH.
To fix an existing toolchain without rebuilding:
make host-gcc-final-rebuild
(or make host-toolchain-external-custom-rebuild if that's what you're
using).
---
toolchain/toolchain-wrapper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/toolchain/toolchain-wrapper.c b/toolchain/toolchain-wrapper.c
index 3a4455ff82..a73e6d6f94 100644
--- a/toolchain/toolchain-wrapper.c
+++ b/toolchain/toolchain-wrapper.c
@@ -192,7 +192,7 @@ int main(int argc, char **argv)
for (i = ret; i > 0; i--) {
if (absbasedir[i] == '/') {
absbasedir[i] = '\0';
- if (++count == 3)
+ if (++count == 2)
break;
}
}
--
2.13.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] toolchain-wrapper: fix breakage after host/usr removal
2017-07-07 7:43 ` [Buildroot] [PATCH] toolchain-wrapper: fix breakage after host/usr removal Arnout Vandecappelle
@ 2017-07-07 11:12 ` Mark Jackson
2017-07-07 11:58 ` Thomas Petazzoni
1 sibling, 0 replies; 9+ messages in thread
From: Mark Jackson @ 2017-07-07 11:12 UTC (permalink / raw)
To: buildroot
On 07/07/17 08:43, Arnout Vandecappelle (Essensium/Mind) wrote:
> The toolchain wrapper, when called through PATH, strips the last three
> levels of /proc/self/exe to find HOST_DIR. However, after the host/usr
> removal, this should be just two levels.
>
> The toolchain wrapper has different logic for when it is called with a
> full path (i.e. $HOST_DIR/usr/bin/arm-linux-gcc) then when it is called
> through the PATH (i.e. just arm-linux-gcc). The latter is never used
> internally in Buildroot, that's why this wasn't discovered through
> testing.
>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Cc: Mark Jackson <mpfj-list@newflow.co.uk>
Tested-by: Mark Jackson <mpfj-list@newflow.co.uk>
Works fine now. Cheers.
> ---
> Sorry for the breakage :-)
>
> Note to self: add a test for calling the toolchain through PATH.
>
> To fix an existing toolchain without rebuilding:
> make host-gcc-final-rebuild
> (or make host-toolchain-external-custom-rebuild if that's what you're
> using).
> ---
> toolchain/toolchain-wrapper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/toolchain/toolchain-wrapper.c b/toolchain/toolchain-wrapper.c
> index 3a4455ff82..a73e6d6f94 100644
> --- a/toolchain/toolchain-wrapper.c
> +++ b/toolchain/toolchain-wrapper.c
> @@ -192,7 +192,7 @@ int main(int argc, char **argv)
> for (i = ret; i > 0; i--) {
> if (absbasedir[i] == '/') {
> absbasedir[i] = '\0';
> - if (++count == 3)
> + if (++count == 2)
> break;
> }
> }
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] toolchain-wrapper: fix breakage after host/usr removal
2017-07-07 7:43 ` [Buildroot] [PATCH] toolchain-wrapper: fix breakage after host/usr removal Arnout Vandecappelle
2017-07-07 11:12 ` Mark Jackson
@ 2017-07-07 11:58 ` Thomas Petazzoni
1 sibling, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2017-07-07 11:58 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 7 Jul 2017 09:43:30 +0200, Arnout Vandecappelle
(Essensium/Mind) wrote:
> The toolchain wrapper, when called through PATH, strips the last three
> levels of /proc/self/exe to find HOST_DIR. However, after the host/usr
> removal, this should be just two levels.
>
> The toolchain wrapper has different logic for when it is called with a
> full path (i.e. $HOST_DIR/usr/bin/arm-linux-gcc) then when it is called
> through the PATH (i.e. just arm-linux-gcc). The latter is never used
> internally in Buildroot, that's why this wasn't discovered through
> testing.
>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Cc: Mark Jackson <mpfj-list@newflow.co.uk>
> ---
> Sorry for the breakage :-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] ARM cross compiler path error "no such file or directory"
2017-07-06 21:50 ` Arnout Vandecappelle
2017-07-07 7:24 ` Thomas Petazzoni
@ 2017-07-08 14:08 ` Marcus Hoffmann
2017-07-08 15:20 ` Arnout Vandecappelle
1 sibling, 1 reply; 9+ messages in thread
From: Marcus Hoffmann @ 2017-07-08 14:08 UTC (permalink / raw)
To: buildroot
Hey Arnout,
On 06.07.2017 23:50, Arnout Vandecappelle wrote:
>
>
> On 06-07-17 17:35, Thomas Petazzoni wrote:
>> Hello,
>>
>> On Thu, 6 Jul 2017 15:34:27 +0100, Mark Jackson wrote:
>>
>>> I can successfully compile "beaglebone_defconfig".
>>>
>>> $ make clean
>>> $ make beaglebone_defconfig
>>> $ make
>>>
>>> And in output/host/usr/bin, I can find all the "arm-linux-xyz" cross compiler tools (gcc, strings, strip, etc).
>>>
>>> But when I try to use these to compile my own code, I get an error as follows:-
>>>
>>> $ which arm-linux-gcc
>>> /home/mpfj/buildroot/output/host/usr/bin/arm-linux-gcc
>>> $ arm-linux-gcc
>>> /home/mpfj/buildroot/output/usr/bin/arm-linux-gcc.br_real: No such file or directory
>>>
>>> Quite correctly, "output/usr/bin" doesn't exist ... the files are in "output/host/usr/bin"
>>>
>>> arm-linux-gcc is just a symlink to toolchain-wrapper, so toolchain-wrapper seems to be pointing to the wrong directory!!
>>>
>>> I'm sure was working yesterday, but I did a "git pull" this morning, so it may be something quite recent ??
>>
>> We pushed some changes over the last few days that moved everything in
>> $(HOST_DIR)/usr up into $(HOST_DIR), so it is possible that there are
>> some regressions.
>
> You need to rebuild the toolchain (actually the toolchain wrapper) after this
> change. And probably other things need to be rebuilt as well. To be safe, do a
> "make clean; make".
Now I wonder, is there any difference to doing "make clean all"?
>
> Regards,
> Arnout
Best wishes,
Marcus
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] ARM cross compiler path error "no such file or directory"
2017-07-08 14:08 ` [Buildroot] ARM cross compiler path error "no such file or directory" Marcus Hoffmann
@ 2017-07-08 15:20 ` Arnout Vandecappelle
0 siblings, 0 replies; 9+ messages in thread
From: Arnout Vandecappelle @ 2017-07-08 15:20 UTC (permalink / raw)
To: buildroot
On 08-07-17 16:08, Marcus Hoffmann wrote:
> Hey Arnout,
>
> On 06.07.2017 23:50, Arnout Vandecappelle wrote:
[snip]
>> You need to rebuild the toolchain (actually the toolchain wrapper) after this
>> change. And probably other things need to be rebuilt as well. To be safe, do a
>> "make clean; make".
>
> Now I wonder, is there any difference to doing "make clean all"?
That should indeed be the same.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-07-08 15:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-06 14:34 [Buildroot] ARM cross compiler path error "no such file or directory" Mark Jackson
2017-07-06 15:35 ` Thomas Petazzoni
2017-07-06 21:50 ` Arnout Vandecappelle
2017-07-07 7:24 ` Thomas Petazzoni
2017-07-07 7:43 ` [Buildroot] [PATCH] toolchain-wrapper: fix breakage after host/usr removal Arnout Vandecappelle
2017-07-07 11:12 ` Mark Jackson
2017-07-07 11:58 ` Thomas Petazzoni
2017-07-08 14:08 ` [Buildroot] ARM cross compiler path error "no such file or directory" Marcus Hoffmann
2017-07-08 15:20 ` Arnout Vandecappelle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox