yf13 opened a new issue, #11341:
URL: https://github.com/apache/nuttx/issues/11341

   When buildling `rv-virt:nsh64` with the stock toolchain installed via `sudo 
apt install gcc-riscv64-unknown-elf` on Ubuntu 22.04, I got the following error:
   
   ```
   $ make
   ./stdlib/lib_strtold.c:44:10: fatal error: math.h: No such file or directory
      44 | #include <math.h>
         |          ^~~~~~~~
   compilation terminated.
   ERROR: riscv64-unknown-elf-gcc failed: 1
          command: riscv64-unknown-elf-gcc -MT bin/lib_strtold.o  -M 
'-fno-common' '-Wall' '-Wstrict-prototypes' '-Wshadow' '-Wundef' 
'-Wno-attributes' '-Wno-unknown-pragmas' '-Wno-psabi' '-Os' 
'-fno-strict-aliasing' '-fomit-frame-pointer' '-ffunction-sections' 
'-fdata-sections' '-g' '-mcmodel=medany' '-march=rv64imafdc' '-mabi=lp64d' 
'-isystem' '/home/yf/Projects/Nuttx/nuttx/include' '-D__NuttX__' '-pipe' '-I' 
'/home/yf/Projects/Nuttx/nuttx/libs/libc' ./stdlib/lib_strtold.c
   make[2]: *** [/home/yf/Projects/Nuttx/nuttx/tools/Config.mk:228: 
lib_strtold.ddc] Error 1
   make[1]: *** [Makefile:189: .depend] Error 2
   make: *** [tools/Unix.mk:606: pass1dep] Error 2
   ```
   
   The toolchain has the following version info:
   
   ```
   $ riscv64-unknown-elf-gcc -v
   Using built-in specs.
   COLLECT_GCC=riscv64-unknown-elf-gcc
   COLLECT_LTO_WRAPPER=/usr/lib/gcc/riscv64-unknown-elf/10.2.0/lto-wrapper
   Target: riscv64-unknown-elf
   Configured with: ../configure --build=x86_64-linux-gnu --prefix=/usr 
--includedir='/usr/include' --mandir='/usr/share/man' 
--infodir='/usr/share/info' --sysconfdir=/etc --localstatedir=/var 
--disable-option-checking --disable-silent-rules 
--libdir='/usr/lib/x86_64-linux-gnu' --libexecdir='/usr/lib/x86_64-linux-gnu' 
--disable-maintainer-mode --disable-dependency-tracking 
--target=riscv64-unknown-elf --prefix=/usr 
--infodir=/usr/share/doc/gcc-riscv64-unknown-elf/info --mandir=/usr/share/man 
--htmldir=/usr/share/doc/gcc-riscv64-unknown-elf/html 
--pdfdir=/usr/share/doc/gcc-riscv64-unknown-elf/pdf --bindir=/usr/bin 
--libexecdir=/usr/lib --libdir=/usr/lib --with-pkgversion= --disable-shared 
--disable-threads --enable-languages=c,c++ --enable-tls --with-newlib 
--with-native-system-header-dir=/include --disable-libmudflap --disable-libssp 
--disable-libquadmath --disable-libgomp --disable-nls --with-system-zlib 
--enable-checking=yes --enable-multilib --with-abi=lp64d --disable-libstdcxx-pc
 h --disable-libstdcxx --disable-fixinc --with-arch=rv64imafdc --with-gnu-as 
--with-gnu-ld --with-as=/usr/lib/riscv64-unknown-elf/bin/as 
--with-ld=/usr/lib/riscv64-unknown-elf/bin/ld 
AR_FOR_TARGET=/usr/lib/riscv64-unknown-elf/bin/ar 
AS_FOR_TARGET=/usr/lib/riscv64-unknown-elf/bin/as 
NM_FOR_TARGET=/usr/lib/riscv64-unknown-elf/bin/nm 
LD_FOR_TARGET=/usr/lib/riscv64-unknown-elf/bin/ld 
OBJDUMP_FOR_TARGET=/usr/lib/riscv64-unknown-elf/bin/objdump 
RANLIB_FOR_TARGET=/usr/lib/riscv64-unknown-elf/bin/ranlib 
READELF_FOR_TARGET=/usr/lib/riscv64-unknown-elf/bin/readelf 
STRIP_FOR_TARGET=/usr/lib/riscv64-unknown-elf/bin/strip CFLAGS='-g -O2 
-fdebug-prefix-map=/build/gcc-riscv64-unknown-elf-LkcieF/gcc-riscv64-unknown-elf-10.2.0=.
 -fstack-protector-strong' CPPFLAGS='-Wdate-time -D_FORTIFY_SOURCE=2' 
CXXFLAGS='-g -O2 
-fdebug-prefix-map=/build/gcc-riscv64-unknown-elf-LkcieF/gcc-riscv64-unknown-elf-10.2.0=.
 -fstack-protector-strong' FCFLAGS='-g -O2 
-fdebug-prefix-map=/build/gcc-riscv64-unknown-elf-LkcieF/g
 cc-riscv64-unknown-elf-10.2.0=. -fstack-protector-strong' FFLAGS='-g -O2 
-fdebug-prefix-map=/build/gcc-riscv64-unknown-elf-LkcieF/gcc-riscv64-unknown-elf-10.2.0=.
 -fstack-protector-strong' GCJFLAGS='-g -O2 
-fdebug-prefix-map=/build/gcc-riscv64-unknown-elf-LkcieF/gcc-riscv64-unknown-elf-10.2.0=.
 -fstack-protector-strong' LDFLAGS='-Wl,-Bsymbolic-functions -Wl,-z,relro 
-Wl,-z,now' OBJCFLAGS='-g -O2 
-fdebug-prefix-map=/build/gcc-riscv64-unknown-elf-LkcieF/gcc-riscv64-unknown-elf-10.2.0=.
 -fstack-protector-strong' OBJCXXFLAGS='-g -O2 
-fdebug-prefix-map=/build/gcc-riscv64-unknown-elf-LkcieF/gcc-riscv64-unknown-elf-10.2.0=.
 -fstack-protector-strong' 'CFLAGS_FOR_TARGET=-Os -mcmodel=medany' 
'CXXFLAGS_FOR_TARGET=-Os -mcmodel=medany'
   Thread model: single
   Supported LTO compression algorithms: zlib
   gcc version 10.2.0 ()
   ```
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org.apache.org

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

Reply via email to