Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

欧拉 2203 鲲鹏920CPU 安装nginx-module make 报错 #99

Open
xuyong6 opened this issue May 10, 2023 · 1 comment
Open

欧拉 2203 鲲鹏920CPU 安装nginx-module make 报错 #99

xuyong6 opened this issue May 10, 2023 · 1 comment

Comments

@xuyong6
Copy link

xuyong6 commented May 10, 2023

/usr/local/src/fastdfs-nginx-module-1.22/src//common.c:903:42: error: ‘%s’ directive output may be truncated writing up to 510 bytes into a region of size between 111 and 127 [-Werror=format-truncation=]
902 | file_id_without_group = uri + 1; //skip /
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
903 | snprintf(file_id, sizeof(file_id), "%s/%s",
| ^~
/usr/local/src/fastdfs-nginx-module-1.22/src//common.c:903:3: note: ‘snprintf’ output between 2 and 528 bytes into a destination of size 128
903 | snprintf(file_id, sizeof(file_id), "%s/%s",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
904 | my_group_name, file_id_without_group);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/src/fastdfs-nginx-module-1.22/src//common.c:857:39: error: ‘%s’ directive output may be truncated writing up to 510 bytes into a region of size 128 [-Werror=format-truncation=]
857 | snprintf(file_id, sizeof(file_id), "%s", uri + 1);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/usr/local/src/fastdfs-nginx-module-1.22/src//common.c:857:3: note: ‘snprintf’ output between 1 and 511 bytes into a destination of size 128
857 | snprintf(file_id, sizeof(file_id), "%s", uri + 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [objs/Makefile:1207: objs/addon/src/ngx_http_fastdfs_module.o] Error 1
make[1]: Leaving directory '/usr/local/src/nginx-1.19.2'
make: *** [Makefile:8: build] Error 2

@miraclemie
Copy link

miraclemie commented May 11, 2023

帮报错的注掉后,报这个错,是不是只支持glibc-2.17的
其中编译的命令去掉了--with-http_perl_module就不会报下面的错

/usr/bin/ld: objs/src/core/nginx.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol environ@@GLIBC_2.17' which may bind externally can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: objs/src/core/nginx.o(.text+0xc8c): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol environ@@GLIBC_2.17'
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[1]: *** [objs/Makefile:326: objs/nginx] Error 1
make[1]: Leaving directory '/opt/nginx-1.22.0'
make: *** [Makefile:10: build] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants