You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/06/02 08:56:53 UTC

[GitHub] [incubator-nuttx] AlexanderVasiljev opened a new issue #3826: arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles

AlexanderVasiljev opened a new issue #3826:
URL: https://github.com/apache/incubator-nuttx/issues/3826


   I have faced the same issue as https://github.com/apache/incubator-nuttx/issues/3209.
   
   I have just installed Ubuntu 21.04. The first build on new Ubuntu failed with this error.
   
   LOG
   ```
   LD: nuttx
   arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles (did you mean --nostartfiles ?)
   make[1]: *** [Makefile:156: nuttx] Error 1
   ```
   
   GCC version
   ```
   arm-none-eabi-gcc --version
   arm-none-eabi-gcc (15:9-2019-q4-0ubuntu2) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]
   ```
   
   Ld version
   ```
   rm-none-eabi-ld --version
   GNU ld (2.36.1-0ubuntu1+14build1) 2.36.1
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] davids5 closed issue #3826: arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles

Posted by GitBox <gi...@apache.org>.
davids5 closed issue #3826:
URL: https://github.com/apache/incubator-nuttx/issues/3826


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] AlexanderVasiljev edited a comment on issue #3826: arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles

Posted by GitBox <gi...@apache.org>.
AlexanderVasiljev edited a comment on issue #3826:
URL: https://github.com/apache/incubator-nuttx/issues/3826#issuecomment-852914267


   The flag nostartfiles is not a flag of ld. So it shouldn't appear in LDFLAGS += -nostartfiles
   
   I assume that we should change 
   `LDFLAGS += -nostartfiles -nodefaultlibs`
   to 
   `CXXFLAGS += -nostartfiles -nodefaultlibs
   `
   in every board Make.defs
   
   It works for my board


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] Ouss4 commented on issue #3826: arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on issue #3826:
URL: https://github.com/apache/incubator-nuttx/issues/3826#issuecomment-852910624


   Oh this issue is now on Debian based distros as well?
   
   We've seen this (a general did you mean --option instead of -option) in arch based distros.  We couldn't see any references in the GNU project where -option is replaced with --option, so we assumed an issue in the Arch package.
   
   Anyway, did you try to download the toolchain as described in https://github.com/apache/incubator-nuttx/issues/3209?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] AlexanderVasiljev edited a comment on issue #3826: arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles

Posted by GitBox <gi...@apache.org>.
AlexanderVasiljev edited a comment on issue #3826:
URL: https://github.com/apache/incubator-nuttx/issues/3826#issuecomment-852912391


   See my question on binutils
   https://sourceware.org/pipermail/binutils/2021-June/116825.html
   
   The answer https://sourceware.org/pipermail/binutils/2021-June/116826.html
   from nickc@redhat.com  is
   
   > The -nostartfiles option is a gcc command line option, not a linker
   > command line option.  It is used when gcc is creating an executable
   > binary and it tells gcc not to include the standard system files
   > (eg crt1.o, crtbegin.o, crtend.o etc) when gcc invokes the linker.
   > 
   > All of which means that in your build system somewhere you have:
   > 
   >    arm-none-eabi-ld -nostartfiles ...
   > 
   > whereas you probably meant to have:
   > 
   >    arm-none-eabi-gcc -nostartfiles ...
   > 
   > Note: the reason why this problem has appeared when you upgraded is
   > that we recently added some extra error checking to the linker to
   > attempt to detect mis-spelt command line options.  In particular the
   > linker interprets options that start with a single dash as if they
   > were multiple, single letter options.  So "-nostartfiles" would be
   > treated as "-n" "-o startfiles" which is probably not what the user
   > wanted.  Hence the error message.
   > 
   > Plus, just to be clear, the linker does not support a --nostartfiles
   > option.  The code that generates the error message does not actually
   > check to see if the double dash version of the option exists...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] AlexanderVasiljev edited a comment on issue #3826: arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles

Posted by GitBox <gi...@apache.org>.
AlexanderVasiljev edited a comment on issue #3826:
URL: https://github.com/apache/incubator-nuttx/issues/3826#issuecomment-852914267


   The flag nostartfiles is not a flag of ld. So it shouldn't appear in LDFLAGS += -nostartfiles
   
   I assume that we should change 
   `LDFLAGS += -nostartfiles -nodefaultlibs`
   to 
   `CXXFLAGS += -nostartfiles -nodefaultlibs
   `
   in every board configuration


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] AlexanderVasiljev commented on issue #3826: arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles

Posted by GitBox <gi...@apache.org>.
AlexanderVasiljev commented on issue #3826:
URL: https://github.com/apache/incubator-nuttx/issues/3826#issuecomment-853661449


   #3836 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] AlexanderVasiljev commented on issue #3826: arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles

Posted by GitBox <gi...@apache.org>.
AlexanderVasiljev commented on issue #3826:
URL: https://github.com/apache/incubator-nuttx/issues/3826#issuecomment-852914267


   The flag nostartfiles is not a flag of ld. So it shouldn't appear in LDFLAGS += -nostartfiles


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] AlexanderVasiljev edited a comment on issue #3826: arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles

Posted by GitBox <gi...@apache.org>.
AlexanderVasiljev edited a comment on issue #3826:
URL: https://github.com/apache/incubator-nuttx/issues/3826#issuecomment-852912391


   See my question on binutils
   https://sourceware.org/pipermail/binutils/2021-June/116825.html
   
   The answer from nickc@redhat.com  is
   
   > The -nostartfiles option is a gcc command line option, not a linker
   > command line option.  It is used when gcc is creating an executable
   > binary and it tells gcc not to include the standard system files
   > (eg crt1.o, crtbegin.o, crtend.o etc) when gcc invokes the linker.
   > 
   > All of which means that in your build system somewhere you have:
   > 
   >    arm-none-eabi-ld -nostartfiles ...
   > 
   > whereas you probably meant to have:
   > 
   >    arm-none-eabi-gcc -nostartfiles ...
   > 
   > Note: the reason why this problem has appeared when you upgraded is
   > that we recently added some extra error checking to the linker to
   > attempt to detect mis-spelt command line options.  In particular the
   > linker interprets options that start with a single dash as if they
   > were multiple, single letter options.  So "-nostartfiles" would be
   > treated as "-n" "-o startfiles" which is probably not what the user
   > wanted.  Hence the error message.
   > 
   > Plus, just to be clear, the linker does not support a --nostartfiles
   > option.  The code that generates the error message does not actually
   > check to see if the double dash version of the option exists...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] AlexanderVasiljev edited a comment on issue #3826: arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles

Posted by GitBox <gi...@apache.org>.
AlexanderVasiljev edited a comment on issue #3826:
URL: https://github.com/apache/incubator-nuttx/issues/3826#issuecomment-852912391


   See my question on binutils
   https://sourceware.org/pipermail/binutils/2021-June/116825.html
   
   The answer https://sourceware.org/pipermail/binutils/2021-June/116826.html
   from nickc@redhat.com  is
   
   > The -nostartfiles option is a gcc command line option, not a linker
   > command line option.  It is used when gcc is creating an executable
   > binary and it tells gcc not to include the standard system files
   > (eg crt1.o, crtbegin.o, crtend.o etc) when gcc invokes the linker.
   > 
   > All of which means that in your build system somewhere you have:
   > 
   >    arm-none-eabi-ld -nostartfiles ...
   > 
   > whereas you probably meant to have:
   > 
   >    arm-none-eabi-gcc -nostartfiles ...
   > 
   > Note: the reason why this problem has appeared when you upgraded is
   > that **we recently added some extra error checking to the linker to
   > attempt to detect mis-spelt command line options.**  In particular the
   > linker interprets options that start with a single dash as if they
   > were multiple, single letter options.  So "-nostartfiles" would be
   > treated as "-n" "-o startfiles" which is probably not what the user
   > wanted.  Hence the error message.
   > 
   > Plus, just to be clear, the linker does not support a --nostartfiles
   > option.  The code that generates the error message does not actually
   > check to see if the double dash version of the option exists...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] hartmannathan commented on issue #3826: arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles

Posted by GitBox <gi...@apache.org>.
hartmannathan commented on issue #3826:
URL: https://github.com/apache/incubator-nuttx/issues/3826#issuecomment-859117731


   This is caused by Binutils being updated to the 2.36.x line.
   
   This is fixed by PR #3836
   
   This is now documented at Release Notes for the (future) NuttX-10.2 release:
   
   [https://cwiki.apache.org/confluence/display/NUTTX/NuttX+10.2#ld-now-called-through-gcc](https://cwiki.apache.org/confluence/display/NUTTX/NuttX+10.2#ld-now-called-through-gcc)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] AlexanderVasiljev commented on issue #3826: arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles

Posted by GitBox <gi...@apache.org>.
AlexanderVasiljev commented on issue #3826:
URL: https://github.com/apache/incubator-nuttx/issues/3826#issuecomment-853661449


   #3836 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] AlexanderVasiljev commented on issue #3826: arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles

Posted by GitBox <gi...@apache.org>.
AlexanderVasiljev commented on issue #3826:
URL: https://github.com/apache/incubator-nuttx/issues/3826#issuecomment-852912391


   See my question on binutils
   https://sourceware.org/pipermail/binutils/2021-June/116825.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org