Open rayniel opened 7 months ago
Formating code blocks by wrapping them with pairs of ```
[2/11] Building C object src/CMakeFiles/rtty.dir/file.c.o FAILED: src/CMakeFiles/rtty.dir/file.c.o .../staging_dir/toolchain-aarch64_cortex-a53_gcc-13.2.0_musl/bin/aarch64-openwrt-linux-musl-gcc -D_GNU_SOURCE -I.../build_dir/target-aarch64_cortex-a53_musl/rtty-nossl/rtty-8.1.1/src -I.../build_dir/target-aarch64_cortex-a53_musl/rtty-nossl/rtty-8.1.1/src/buffer -Os -pipe -mcpu=cortex-a53 -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=.../build_dir/target-aarch64_cortex-a53_musl/rtty-nossl/rtty-8.1.1=rtty-8.1.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DNDEBUG -O -Wall -Werror --std=gnu99 -MD -MT src/CMakeFiles/rtty.dir/file.c.o -MF src/CMakeFiles/rtty.dir/file.c.o.d -o src/CMakeFiles/rtty.dir/file.c.o -c .../build_dir/target-aarch64_cortex-a53_musl/rtty-nossl/rtty-8.1.1/src/file.c .../build_dir/target-aarch64_cortex-a53_musl/rtty-nossl/rtty-8.1.1/src/file.c: In function 'start_upload_file': .../build_dir/target-aarch64_cortex-a53_musl/rtty-nossl/rtty-8.1.1/src/file.c:156:24: error: implicit declaration of function 'basename' [-Werror=implicit-function-declaration] 156 | const char name = basename(path); | ^~~~ .../build_dir/target-aarch64_cortex-a53_musl/rtty-nossl/rtty-8.1.1/src/file.c:156:24: error: initialization of 'const char ' from 'int' makes pointer from integer without a cast [-Werror=int-conversion] cc1: all warnings being treated as errors ninja: build stopped: subcommand failed.
basename报错,补全#include 也无法解决问题
https://github.com/openwrt/packages/pull/23931
Environment
rtty
rttys
Description
[2/11] Building C object src/CMakeFiles/rtty.dir/file.c.o FAILED: src/CMakeFiles/rtty.dir/file.c.o .../staging_dir/toolchain-aarch64_cortex-a53_gcc-13.2.0_musl/bin/aarch64-openwrt-linux-musl-gcc -D_GNU_SOURCE -I.../build_dir/target-aarch64_cortex-a53_musl/rtty-nossl/rtty-8.1.1/src -I.../build_dir/target-aarch64_cortex-a53_musl/rtty-nossl/rtty-8.1.1/src/buffer -Os -pipe -mcpu=cortex-a53 -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=.../build_dir/target-aarch64_cortex-a53_musl/rtty-nossl/rtty-8.1.1=rtty-8.1.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DNDEBUG -O -Wall -Werror --std=gnu99 -MD -MT src/CMakeFiles/rtty.dir/file.c.o -MF src/CMakeFiles/rtty.dir/file.c.o.d -o src/CMakeFiles/rtty.dir/file.c.o -c .../build_dir/target-aarch64_cortex-a53_musl/rtty-nossl/rtty-8.1.1/src/file.c .../build_dir/target-aarch64_cortex-a53_musl/rtty-nossl/rtty-8.1.1/src/file.c: In function 'start_upload_file': .../build_dir/target-aarch64_cortex-a53_musl/rtty-nossl/rtty-8.1.1/src/file.c:156:24: error: implicit declaration of function 'basename' [-Werror=implicit-function-declaration] 156 | const char name = basename(path); | ^
~~~ .../build_dir/target-aarch64_cortex-a53_musl/rtty-nossl/rtty-8.1.1/src/file.c:156:24: error: initialization of 'const char ' from 'int' makes pointer from integer without a cast [-Werror=int-conversion] cc1: all warnings being treated as errors ninja: build stopped: subcommand failed.basename报错,补全#include也无法解决问题