Building GCC for Cortex

classic Classic list List threaded Threaded
9 messages Options
John Hind John Hind
Reply | Threaded
Open this post in threaded view
|

Building GCC for Cortex

I am trying to follow the tutorial "Building GCC for Cortex", but I am new
to Ubuntu and am running into the sand at Step 1 (the easiest step!). As it
has already taken me several hours of head-banging to get this far, I am
appealing for help!

The problem starts with the "make all" step (for binutils). It terminates
with "make: *** [all] Error 2". A few lines above this there are 5
occurrences of "tc-arm.c: xxxx: error: format not a string literal and no
format arguments".

I have tried the complete procedure to this point several times, with both
the latest release (binutils-2.19.1.tar.bz2) and the recommended one
(binutils-2.19.tar.bz2) always with the same result. This on a fresh
installation of Ubuntu 8.10 Desktop.

Anyone solved this one before or do I need to do some more head-banging?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3200 bytes
Desc: not available
Url : https://lists.berlios.de/pipermail/elua-dev/attachments/20090219/01b56ce9/attachment.bin 

Joern Kaipf Joern Kaipf
Reply | Threaded
Open this post in threaded view
|

Building GCC for Cortex

John Hind wrote:

> The problem starts with the "make all" step (for binutils). It terminates
> with "make: *** [all] Error 2". A few lines above this there are 5
> occurrences of "tc-arm.c: xxxx: error: format not a string literal and no
> format arguments".

I got the same problem some time ago. The bug and the fix is descripted
here:

http://www.mail-archive.com/bug-binutils at gnu.org/msg06475.html

Joern

BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Building GCC for Cortex

Yes, but after I did that I remembered that gas didn't work properly with
Thumb2 anymore (no idea why), giving some errors about invalid assembler
statements. The only things that seems to work is 2.19.50.

Best,
Bogdan

On Fri, Feb 20, 2009 at 12:10 AM, Joern Kaipf <lists at joernline.de> wrote:

> John Hind wrote:
>
> > The problem starts with the "make all" step (for binutils). It terminates
> > with "make: *** [all] Error 2". A few lines above this there are 5
> > occurrences of "tc-arm.c: xxxx: error: format not a string literal and no
> > format arguments".
>
> I got the same problem some time ago. The bug and the fix is descripted
> here:
>
> http://www.mail-archive.com/bug-binutils at gnu.org/msg06475.html
>
> Joern
> _______________________________________________
> Elua-dev mailing list
> Elua-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090220/76685d5e/attachment.html 

John Hind John Hind
Reply | Threaded
Open this post in threaded view
|

Building GCC for Cortex

Hay Ho! I ran into this one (the assembler errors) too. I decided yesterday
to start again with the exact versions recommended by Bogdan, but ran into
the sand again last night and was firmly told to drop it before I gave
myself an aneurism. Not wishing to stoke up the Linux fans out there, I am
beginning to remember why I am a die-hard Windows user. My first Lua build
in VS5 took less than 10 minutes from downloading the sources! I've said it
before and I'll say it again: "Life is too short for command lines!" (Rant
over - now I'll try again)

 

Thanks Bogdan and Joern for your help!

 

Update: I'm still seeing the same problem as last night - "sudo make
install" for newlib terminates Error 2 and further up there are messages
"arm-elf-ranlib: command not found", but typing "arm-elf-ranlib" at the
command prompt prints help information on that command - so it IS there.
This really has me baffled and it did not happen on the last attempt.

 

Any thoughts on this?

 

From: elua-dev-bounces at lists.berlios.de
[mailto:elua-dev-bounces at lists.berlios.de] On Behalf Of Bogdan Marinescu
Sent: 20 February 2009 08:58
To: lists at joernline.de; eLua Users and Development List
Subject: Re: [eLua-dev] Building GCC for Cortex

 

Yes, but after I did that I remembered that gas didn't work properly with
Thumb2 anymore (no idea why), giving some errors about invalid assembler
statements. The only things that seems to work is 2.19.50.

Best,
Bogdan

On Fri, Feb 20, 2009 at 12:10 AM, Joern Kaipf <lists at joernline.de> wrote:

John Hind wrote:

> The problem starts with the "make all" step (for binutils). It terminates
> with "make: *** [all] Error 2". A few lines above this there are 5
> occurrences of "tc-arm.c: xxxx: error: format not a string literal and no
> format arguments".

I got the same problem some time ago. The bug and the fix is descripted
here:

http://www.mail-archive.com/bug-binutils at gnu.org/msg06475.html

Joern

_______________________________________________
Elua-dev mailing list
Elua-dev at lists.berlios.de
https://lists.berlios.de/mailman/listinfo/elua-dev

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090220/419d0218/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3200 bytes
Desc: not available
Url : https://lists.berlios.de/pipermail/elua-dev/attachments/20090220/419d0218/attachment.bin 

BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Building GCC for Cortex

In reply to this post by BogdanM
>  Update: I?m still seeing the same problem as last night ? ?sudo make
> install? for newlib terminates Error 2 and further up there are messages
> ?arm-elf-ranlib: command not found?, but typing ?arm-elf-ranlib? at the
> command prompt prints help information on that command ? so it IS there.
> This really has me baffled and it did not happen on the last attempt.
>
>
>
> Any thoughts on this?
>

Yes: check the eluaproject.net webpage :) It says this (in
http://eluaproject.net/en/Building_GCC_for_Cortex):

On my system, the last line above (sudo make install-gcc) terminated with
errors, because it was unable to find our newly compiled binutils. *If this
happens for any kind of "make install" command*, this is a quick way to
solve it:


 $ sudo -s -H

# export PATH=/usr/local/cross-cortex/bin:$PATH
# make install-gcc
# exit


On the other hand, I agree that trying to compile the binutils/gcc/newlib
combo is a huge PITA, and this it should've been much better by now (given
the fact that the combo is old and widely used), but apparently this is the
best we have for now. On the bright side, once you get the hang of it,
you'll be able to amaze your friends with your newly acquired skills :D

Best,
Bogdan



>
>
> *From:* elua-dev-bounces at lists.berlios.de [mailto:
> elua-dev-bounces at lists.berlios.de] *On Behalf Of *Bogdan Marinescu
> *Sent:* 20 February 2009 08:58
> *To:* lists at joernline.de; eLua Users and Development List
> *Subject:* Re: [eLua-dev] Building GCC for Cortex
>
>
>
> Yes, but after I did that I remembered that gas didn't work properly with
> Thumb2 anymore (no idea why), giving some errors about invalid assembler
> statements. The only things that seems to work is 2.19.50.
>
> Best,
> Bogdan
>
> On Fri, Feb 20, 2009 at 12:10 AM, Joern Kaipf <lists at joernline.de> wrote:
>
> John Hind wrote:
>
> > The problem starts with the "make all" step (for binutils). It terminates
> > with "make: *** [all] Error 2". A few lines above this there are 5
> > occurrences of "tc-arm.c: xxxx: error: format not a string literal and no
> > format arguments".
>
> I got the same problem some time ago. The bug and the fix is descripted
> here:
>
> http://www.mail-archive.com/bug-binutils at gnu.org/msg06475.html
>
> Joern
>
> _______________________________________________
> Elua-dev mailing list
> Elua-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>
>
> _______________________________________________
> Elua-dev mailing list
> Elua-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090220/46ab82d2/attachment-0001.html 

John Hind John Hind
Reply | Threaded
Open this post in threaded view
|

Building GCC for Cortex

Thanks again Bogdan, I actually got there just ahead of you - remembered the
advice from Ikea "if all else fails, read the instructions - again!"

 

Any idea *why* this works? (And is only needed *sometimes*?) There seems no
obvious connection between the symptoms and the solution! If you are
revising the instructions, might it be better to just do all the operations
requiring sudo this way, or maybe even do the entire process in a root
terminal?

 

I finally made it to the end - now to see if I can build eLua!

 

Any thoughts on running this toolchain in Eclipse? I'd like to get out of
"command line hell" ASAP!

 

From: elua-dev-bounces at lists.berlios.de
[mailto:elua-dev-bounces at lists.berlios.de] On Behalf Of Bogdan Marinescu
Sent: 20 February 2009 09:51
To: eLua Users and Development List
Subject: Re: [eLua-dev] Building GCC for Cortex

 

 

 Update: I'm still seeing the same problem as last night - "sudo make
install" for newlib terminates Error 2 and further up there are messages
"arm-elf-ranlib: command not found", but typing "arm-elf-ranlib" at the
command prompt prints help information on that command - so it IS there.
This really has me baffled and it did not happen on the last attempt.

 

Any thoughts on this?


Yes: check the eluaproject.net webpage :) It says this (in
http://eluaproject.net/en/Building_GCC_for_Cortex):

On my system, the last line above (sudo make install-gcc) terminated with
errors, because it was unable to find our newly compiled binutils. If this
happens for any kind of "make install" command, this is a quick way to solve
it:

 


$ sudo -s -H

# export PATH=/usr/local/cross-cortex/bin:$PATH


# make install-gcc


# exit


On the other hand, I agree that trying to compile the binutils/gcc/newlib
combo is a huge PITA, and this it should've been much better by now (given
the fact that the combo is old and widely used), but apparently this is the
best we have for now. On the bright side, once you get the hang of it,
you'll be able to amaze your friends with your newly acquired skills :D

Best,
Bogdan

 

 

From: elua-dev-bounces at lists.berlios.de
[mailto:elua-dev-bounces at lists.berlios.de] On Behalf Of Bogdan Marinescu
Sent: 20 February 2009 08:58
To: lists at joernline.de; eLua Users and Development List
Subject: Re: [eLua-dev] Building GCC for Cortex

 

Yes, but after I did that I remembered that gas didn't work properly with
Thumb2 anymore (no idea why), giving some errors about invalid assembler
statements. The only things that seems to work is 2.19.50.

Best,
Bogdan

On Fri, Feb 20, 2009 at 12:10 AM, Joern Kaipf <lists at joernline.de> wrote:

John Hind wrote:

> The problem starts with the "make all" step (for binutils). It terminates
> with "make: *** [all] Error 2". A few lines above this there are 5
> occurrences of "tc-arm.c: xxxx: error: format not a string literal and no
> format arguments".

I got the same problem some time ago. The bug and the fix is descripted
here:

http://www.mail-archive.com/bug-binutils at gnu.org/msg06475.html

Joern

_______________________________________________
Elua-dev mailing list
Elua-dev at lists.berlios.de
https://lists.berlios.de/mailman/listinfo/elua-dev

 


_______________________________________________
Elua-dev mailing list
Elua-dev at lists.berlios.de
https://lists.berlios.de/mailman/listinfo/elua-dev

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090220/c6f55b30/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3200 bytes
Desc: not available
Url : https://lists.berlios.de/pipermail/elua-dev/attachments/20090220/c6f55b30/attachment.bin 

BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Building GCC for Cortex

In reply to this post by BogdanM
On Fri, Feb 20, 2009 at 12:32 PM, John Hind <john.hind at zen.co.uk> wrote:

>  Thanks again Bogdan, I actually got there just ahead of you ? remembered
> the advice from Ikea ?if all else fails, read the instructions ? again!?
>
I'm glad it finally worked for you.

>  Any idea **why** this works? (And is only needed **sometimes**?)
>
It's not sometimes, it's just on "some systems". I tried to understand why
this happens a while ago, and I think the conclusion was that "sudo" can be
compiled in two ways: to inherit the environment of the calling process, or
not. Apparently, on Ubuntu it is compiled not to inherit the environment of
the calling process, hence the problem.

Any thoughts on running this toolchain in Eclipse? I?d like to get out of
> ?command line hell? ASAP!
>

Sorry, can't help there. I love the command line, and in fact more than 95%
of eLua is written with vim :)

Best,
Bogdan


>
>
> *From:* elua-dev-bounces at lists.berlios.de [mailto:
> elua-dev-bounces at lists.berlios.de] *On Behalf Of *Bogdan Marinescu
> *Sent:* 20 February 2009 09:51
> *To:* eLua Users and Development List
>
> *Subject:* Re: [eLua-dev] Building GCC for Cortex
>
>
>
>
>
>   Update: I?m still seeing the same problem as last night ? ?sudo make
> install? for newlib terminates Error 2 and further up there are messages
> ?arm-elf-ranlib: command not found?, but typing ?arm-elf-ranlib? at the
> command prompt prints help information on that command ? so it IS there.
> This really has me baffled and it did not happen on the last attempt.
>
>
>
> Any thoughts on this?
>
>
> Yes: check the eluaproject.net webpage :) It says this (in
> http://eluaproject.net/en/Building_GCC_for_Cortex):
>
> On my system, the last line above (sudo make install-gcc) terminated with
> errors, because it was unable to find our newly compiled binutils. *If
> this happens for any kind of "make install" command*, this is a quick way
> to solve it:
>
>
>
> *$ sudo -s -H*
>
> # export PATH=/usr/local/cross-cortex/bin:$PATH
> # make install-gcc
> # exit
>
>
> On the other hand, I agree that trying to compile the binutils/gcc/newlib
> combo is a huge PITA, and this it should've been much better by now (given
> the fact that the combo is old and widely used), but apparently this is the
> best we have for now. On the bright side, once you get the hang of it,
> you'll be able to amaze your friends with your newly acquired skills :D
>
> Best,
> Bogdan
>
>
>
>
>
> *From:* elua-dev-bounces at lists.berlios.de [mailto:
> elua-dev-bounces at lists.berlios.de] *On Behalf Of *Bogdan Marinescu
> *Sent:* 20 February 2009 08:58
> *To:* lists at joernline.de; eLua Users and Development List
> *Subject:* Re: [eLua-dev] Building GCC for Cortex
>
>
>
> Yes, but after I did that I remembered that gas didn't work properly with
> Thumb2 anymore (no idea why), giving some errors about invalid assembler
> statements. The only things that seems to work is 2.19.50.
>
> Best,
> Bogdan
>
> On Fri, Feb 20, 2009 at 12:10 AM, Joern Kaipf <lists at joernline.de> wrote:
>
> John Hind wrote:
>
> > The problem starts with the "make all" step (for binutils). It terminates
> > with "make: *** [all] Error 2". A few lines above this there are 5
> > occurrences of "tc-arm.c: xxxx: error: format not a string literal and no
> > format arguments".
>
> I got the same problem some time ago. The bug and the fix is descripted
> here:
>
> http://www.mail-archive.com/bug-binutils at gnu.org/msg06475.html
>
> Joern
>
> _______________________________________________
> Elua-dev mailing list
> Elua-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>
>
>
> _______________________________________________
> Elua-dev mailing list
> Elua-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>
>
> _______________________________________________
> Elua-dev mailing list
> Elua-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090220/7e8b3317/attachment-0001.html 

John Hind John Hind
Reply | Threaded
Open this post in threaded view
|

Building GCC for Cortex

From: Bogdan Marinescu Sent: 20 February 2009 10:39



It's not sometimes, it's just on "some systems". I tried to understand why
this happens a while ago, and I think the conclusion was that "sudo" can be
compiled in two ways: to inherit the environment of the calling process, or
not. Apparently, on Ubuntu it is compiled not to inherit the environment of
the calling process, hence the problem.

For me, sudo worked fine for all the install steps EXCEPT Newlib, and it
worked fine even for Newlib when I was using the later version. I was
impressed by the ease of installation of Ubuntu, but they seem to have
created an even more annoying lock-down system than Vista, and that takes
some doing!

Sorry, can't help there. I love the command line, and in fact more than 95%
of eLua is written with vim :)

Now I'm suspecting you of masochistic tendencies :}

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090220/80a7e777/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3200 bytes
Desc: not available
Url : https://lists.berlios.de/pipermail/elua-dev/attachments/20090220/80a7e777/attachment.bin 

BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Building GCC for Cortex

In reply to this post by BogdanM
> For me, sudo worked fine for all the install steps EXCEPT Newlib, and it
> worked fine even for Newlib when I was using the later version.
>
This is indeed strange, and I don't have an explanation for it. Might be a
matter of specifying the full paths in the automatically generated
installation script, this way you won't need a properly set PATH. And maybe
different versions of Newlib do this differently, or don't do it at all and
rely solely on the PATH.


>  Now I?m suspecting you of masochistic tendencies :}
>

:) Not at all actually, it just happens that "vim" is the most powerful text
editor I know of (on par with Emacs, but I like vim better). And I'm not
even what you'd call an "advanced vim user", but even with my not-so-great
vim knowledge, I can persuade him to perform some very powerfull magic for
my benefit :)

Best,
Bogdan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090220/e8e50295/attachment.html