fastdfs icon indicating copy to clipboard operation
fastdfs copied to clipboard

fastdfs-nginx-module/src/common.c:683: undefined reference to `dsnprintf'

Open zhengkaiGithub opened this issue 8 months ago • 5 comments

fatdfs版本:5.05

lifastcommon版本:1.0.7

服务器版本:ubuntu22.04

gcc版本:

gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

前面两个模块都编译通过了,但是把nginx模块加入的nginx的编译时报错 /opt/fastdfs-nginx-module/src/common.c:683: undefined reference to `dsnprintf',在centos7中可以编译通过,但是使用的gcc版本是4.8.5

zhengkaiGithub avatar Mar 20 '25 06:03 zhengkaiGithub

从报错信息看,/opt/fastdfs-nginx-module/src/common.c 源码是不是被修改过啊。

happyfish100 avatar Mar 20 '25 13:03 happyfish100

我从另外一台机器复制了一个可以用的过来就好了。没查到具体原因发自我的手机-------- 原始邮件 --------发件人: YuQing @.>日期: 2025年3月20日周四 21:47收件人: happyfish100/fastdfs @.>抄送: zhengkaiGithub @.>, Author @.>主 题: Re: [happyfish100/fastdfs] fastdfs-nginx-module/src/common.c:683: undefined reference to `dsnprintf' (Issue #736) 从报错信息看,/opt/fastdfs-nginx-module/src/common.c 源码是不是被修改过啊。—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

happyfish100 left a comment (happyfish100/fastdfs#736) 从报错信息看,/opt/fastdfs-nginx-module/src/common.c 源码是不是被修改过啊。

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

zhengkaiGithub avatar Mar 20 '25 13:03 zhengkaiGithub

从报错信息看,/opt/fastdfs-nginx-module/src/common.c 源码是不是被修改过啊。

happyfish100 avatar Mar 20 '25 13:03 happyfish100

我了解原因了,原因是因为我用的是ubuntu系统,fastcommon 和其他包编译出来默认是在 /usr/lib64 /usr/lib 和 /lib64/ 最后的/lib64ubuntu不认这个路径下的 *.so,执行 sudo sh -c 'echo "/lib64" > /etc/ld.so.conf.d/libfastcommon.conf' 和 sudo ldconfig 最后执行 ldconfig -v | grep /lib64 (验证是否生效)

zhengkaiGithub avatar Mar 21 '25 00:03 zhengkaiGithub

从报错信息看,/opt/fastdfs-nginx-module/src/common.c 源码是不是被修改过啊。

happyfish100 avatar Mar 21 '25 01:03 happyfish100