You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Gregory Nutt <sp...@gmail.com> on 2020/08/30 16:28:44 UTC
Cygwin Build Broken?
Has anyone built NuttX under Cygwin recently. I haven't and just did so
today for the first time in a long time. It does not build. I get this
error:
$ tools/configure.sh -c nucleo-l476rg:nsh
$ make -j V=1
Results in:
arm-none-eabi-ld --entry=__start -nostartfiles -nodefaultlibs -g -T
"D:\Spuda\Documents\projects\nuttx\master\nuttx_fork\boards\arm\stm32l4\nucleo-l476rg\scripts\l476rg.ld"
-L"D:\Spuda\Documents\projects\nuttx\master\nuttx_fork\staging"
-L"D:\Spuda\Documents\projects\nuttx\master\nuttx_fork\arch\arm\src\board"
-L "c:/ ./ (x86)/ ./ ./ embedded/
2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/thumb/v7e-m/nofp/"
-L "c:/ ./ (x86)/ ./ ./ embedded/
2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m/nofp/"
\
-o
"D:\Spuda\Documents\projects\nuttx\master\nuttx_fork\nuttx.exe" \
--start-group -lsched -ldrivers -lboards -lc -lmm -larch
-lxx -lapps -lfs -lbinfmt -lboard -lgcc -lm --end-group
C:\Program Files (x86)\GNU Tools ARM Embedded\9
2019-q4-major\bin\arm-none-eabi-ld.exe: cannot find -lgcc
C:\Program Files (x86)\GNU Tools ARM Embedded\9
2019-q4-major\bin\arm-none-eabi-ld.exe: cannot find -lm
make[1]: *** [Makefile:172: nuttx.exe] Error 1
Trying again with a different configuration, no -j and no V=1 gives me
the same error:
$ make distclean
$ tools/configure.sh -c stm32f4discovery:nsh
...
LD: nuttx
C:\Program Files (x86)\GNU Tools ARM Embedded\9
2019-q4-major\bin\arm-none-eabi-ld.exe: cannot find -lgcc
C:\Program Files (x86)\GNU Tools ARM Embedded\9
2019-q4-major\bin\arm-none-eabi-ld.exe: cannot find -lm
make[1]: *** [Makefile:172: nuttx.exe] Error 1
My suspicion would be this commit:
commit 4910d43ab0fc360dbddb1f8a31db2a3ee383b46d
Author: Xiang Xiao <xi...@xiaomi.com>
Date: Wed Jul 15 20:51:26 2020 +0800
build: Move the toolchain library setting to the common place
so all boards support C++ automatically
However, there are compilation problems with the previous version too
(f5311de6b42466ab5c6ef299dab0ecc417131bbe) but of a completely different
nature.
Is anyone else using Cygwin? Are you able to get a clean build?
Re: Cygwin Build Broken?
Posted by Brennan Ashton <ba...@brennanashton.com>.
On Mon, Aug 31, 2020, 8:15 AM Nathan Hartman <ha...@gmail.com>
wrote
>
> It would be a good thing if we had PR pre-checks and/or nightly build
> testing on Windows Cygwin.
>
Work on this is over here:
> https://github.com/apache/incubator-nuttx-testing/pull/39
>
Re: Cygwin Build Broken?
Posted by Nathan Hartman <ha...@gmail.com>.
On Sun, Aug 30, 2020 at 2:04 PM Gregory Nutt <sp...@gmail.com> wrote:
> But look what happens under Cygwin:
>
> $ arm-none-eabi-gcc --print-file-name=libgcc.a
> c:/program files (x86)/gnu tools arm embedded/9
> 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/libgcc.a
>
> $ dir `arm-none-eabi-gcc --print-file-name=libgcc.a`
> dir: cannot access 'c:/program': No such file or directory
> dir: cannot access 'files': No such file or directory
> dir: cannot access '(x86)/gnu': No such file or directory
> dir: cannot access 'arm': No such file or directory
> dir: cannot access 'embedded/9': No such file or directory
> dir: cannot access
> '2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/libgcc.a'$'\r': No
> such file or directory
> ...
>
> Broken!
It would be a good thing if we had PR pre-checks and/or nightly build
testing on Windows Cygwin.
Re: Cygwin Build Broken?
Posted by Gregory Nutt <sp...@gmail.com>.
On 8/30/2020 10:28 AM, Gregory Nutt wrote:
>
> Has anyone built NuttX under Cygwin recently. I haven't and just did
> so today for the first time in a long time. It does not build. I get
> this error:
>
> $ tools/configure.sh -c nucleo-l476rg:nsh
> $ make -j V=1
>
> Results in:
>
> arm-none-eabi-ld --entry=__start -nostartfiles -nodefaultlibs -g
> -T
> "D:\Spuda\Documents\projects\nuttx\master\nuttx_fork\boards\arm\stm32l4\nucleo-l476rg\scripts\l476rg.ld"
> -L"D:\Spuda\Documents\projects\nuttx\master\nuttx_fork\staging"
> -L"D:\Spuda\Documents\projects\nuttx\master\nuttx_fork\arch\arm\src\board"
> -L "c:/ ./ (x86)/ ./ ./ embedded/
> 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/thumb/v7e-m/nofp/"
> -L "c:/ ./ (x86)/ ./ ./ embedded/
> 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m/nofp/"
> \
> -o
> "D:\Spuda\Documents\projects\nuttx\master\nuttx_fork\nuttx.exe" \
> --start-group -lsched -ldrivers -lboards -lc -lmm -larch
> -lxx -lapps -lfs -lbinfmt -lboard -lgcc -lm --end-group
> C:\Program Files (x86)\GNU Tools ARM Embedded\9
> 2019-q4-major\bin\arm-none-eabi-ld.exe: cannot find -lgcc
> C:\Program Files (x86)\GNU Tools ARM Embedded\9
> 2019-q4-major\bin\arm-none-eabi-ld.exe: cannot find -lm
> make[1]: *** [Makefile:172: nuttx.exe] Error 1
>
> Trying again with a different configuration, no -j and no V=1 gives me
> the same error:
>
> $ make distclean
> $ tools/configure.sh -c stm32f4discovery:nsh
> ...
> LD: nuttx
> C:\Program Files (x86)\GNU Tools ARM Embedded\9
> 2019-q4-major\bin\arm-none-eabi-ld.exe: cannot find -lgcc
> C:\Program Files (x86)\GNU Tools ARM Embedded\9
> 2019-q4-major\bin\arm-none-eabi-ld.exe: cannot find -lm
> make[1]: *** [Makefile:172: nuttx.exe] Error 1
>
> My suspicion would be this commit:
>
> commit 4910d43ab0fc360dbddb1f8a31db2a3ee383b46d
> Author: Xiang Xiao <xi...@xiaomi.com>
> Date: Wed Jul 15 20:51:26 2020 +0800
>
> build: Move the toolchain library setting to the common place
>
> so all boards support C++ automatically
>
> However, there are compilation problems with the previous version too
> (f5311de6b42466ab5c6ef299dab0ecc417131bbe) but of a completely
> different nature.
>
> Is anyone else using Cygwin? Are you able to get a clean build?
>
Yes, I think that 4910d43ab0fc360dbddb1f8a31db2a3ee383b46d is the
culprit. It adds logic like the following to all Toolchain.defs files:
+
+# Add the builtin library
+
+EXTRA_LIBS += -lgcc
+EXTRA_LIBPATHS += -L "${dir ${shell $(CC) $(ARCHCPUFLAGS)
--print-file-name=libgcc.a}}"
+
+ifneq ($(CONFIG_LIBM),y)
+ EXTRA_LIBS += -lm
+ EXTRA_LIBPATHS += -L "${dir ${shell $(CC) $(ARCHCPUFLAGS)
--print-file-name=libm.a}}"
+endif
+
+ifeq ($(CONFIG_CXX_LIBSUPCXX),y)
+ EXTRA_LIBS += -lsupc++
+ EXTRA_LIBPATHS += -L "${dir ${shell $(CC) $(ARCHCPUFLAGS)
--print-file-name=libsupc++.a}}"
+endif
But look what happens under Cygwin:
$ arm-none-eabi-gcc --print-file-name=libgcc.a
c:/program files (x86)/gnu tools arm embedded/9
2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/libgcc.a
$ dir `arm-none-eabi-gcc --print-file-name=libgcc.a`
dir: cannot access 'c:/program': No such file or directory
dir: cannot access 'files': No such file or directory
dir: cannot access '(x86)/gnu': No such file or directory
dir: cannot access 'arm': No such file or directory
dir: cannot access 'embedded/9': No such file or directory
dir: cannot access
'2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/libgcc.a'$'\r': No
such file or directory
...
Broken!