rpl_malloc找不到的问题

本文记录了解决编译过程中出现的rpl_malloc符号缺失问题的过程。通过逐步排查,最终定位到是某个库文件中定义了malloc为rpl_malloc所导致,并提供了具体的解决办法。
今天编译程序时遇到了一个问题,程序死活提示找不到rpl_malloc符号,网上搜索了一下,有说要把configure.ac中的 AC_MALLOC_FUNC去掉的,去掉了还是不行;有说configure时加with-gnu-ld的也不行;有说configure的cache 文件修改变量值还是不行。
搜索所有的文件内容都没有发现有使用rpl_malloc的地方,知道是malloc被替换的但死活找不到什么时候替换 的。
只好gcc -E 看预处理完的代码,发现所有的malloc已经被替换成了rpl_malloc。
把#include的文件挨个注 释掉,最后发现是引用的别的库的头文件中导致了,再那个头文件中有#define malloc rpl_malloc。修改这个库的头文件即可。

顺便把另外的库中的configure.ac修改了一下,去掉了AC_MALLOC_FUNC,这样即使重新编译这个库也不会导致问题了。
使用conan编译报以下错误如何解决: /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:69:10: note: in expansion of macro 'STAT_TIMESPE' 69 | return STAT_TIMESPEC (st, st_atim).tv_nsec; | ^~~~~~~~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_ctime_ns': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:82:10: note: in expansion of macro 'STAT_TIMESPE' 82 | return STAT_TIMESPEC (st, st_ctim).tv_nsec; | ^~~~~~~~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_mtime_ns': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:95:10: note: in expansion of macro 'STAT_TIMESPE' 95 | return STAT_TIMESPEC (st, st_mtim).tv_nsec; | ^~~~~~~~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_atime': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:121:10: note: in expansion of macro 'STAT_TIMESPEC' 121 | return STAT_TIMESPEC (st, st_atim); | ^~~~~~~~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/careadlinkat.c: In function 'careadlinkat': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_ctime': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/careadlinkat.c:178:5: warning: #warning "GCC might issue a bogus -Wreturn-local-addr warning here." [-Wcpp] 178 | #warning "GCC might issue a bogus -Wreturn-local-addr warning here." | ^~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:135:10: note: in expansion of macro 'STAT_TIMESPEC' 135 | return STAT_TIMESPEC (st, st_ctim); | ^~~~~~~~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/careadlinkat.c:179:5: warning: #warning "See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>." [-Wcpp] 179 | #warning "See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>." | ^~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_mtime': gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -I. -I/c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib -I.. -I../lib -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DNDEBUG -m64 -O3 -c -o stat-w32.o /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-w32.c /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:149:10: note: in expansion of macro 'STAT_TIMESPEC' 149 | return STAT_TIMESPEC (st, st_mtim); | ^~~~~~~~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_birthtime': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/careadlinkat.c:182:10: warning: function may return address of local variable [-Wreturn-local-addr] 182 | return readlink_stk (fd, filename, buffer, buffer_size, alloc, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 183 | preadlinkat, stack_buf); | ~~~~~~~~~~~~~~~~~~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:167:7: note: in expansion of macro 'STAT_TIMESPE' 167 | t = STAT_TIMESPEC (st, st_birthtim); | ^~~~~~~~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/careadlinkat.c:181:8: note: declared here 181 | char stack_buf[STACK_BUF_SIZE]; | ^~~~~~~~~ gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -I. -I/c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib -I.. -I../lib -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DNDEBUG -Wno-cast-qual -Wno-conversion -Wno-float-equal -Wno-sign-compare -Wno-undef -Wno-unused-function -Wno-unused-parameter -Wno-float-conversion -Wimplicit-fallthrough -Wno-pedantic -Wno-sign-conversion -Wno-type-limits -Wno-unsuffixed-float-constants -m64 -O3 -c -o malloc/libicrt_a-scratch_buffer_dupfree.o `test -f 'malloc/scratch_buffer_dupfree.c' || echo '/c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/'`malloc/scratch_buffer_dupfree.c gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -I. -I/c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib -I.. -I../lib -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DNDEBUG -Wno-cast-qual -Wno-conversion -Wno-float-equal -Wno-sign-compare -Wno-undef -Wno-unused-function -Wno-unused-parameter -Wno-float-conversion -Wimplicit-fallthrough -Wno-pedantic -Wno-sign-conversion -Wno-type-limits -Wno-unsuffixed-float-constants -m64 -O3 -c -o malloc/libicrt_a-scratch_buffer_grow.o `test -f 'malloc/scratch_buffer_grow.c' || echo '/c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/'`malloc/scratch_buffer_grow.c gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -I. -I/c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib -I.. -I../lib -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DNDEBUG -Wno-cast-qual -Wno-conversion -Wno-float-equal -Wno-sign-compare -Wno-undef -Wno-unused-function -Wno-unused-parameter -Wno-float-conversion -Wimplicit-fallthrough -Wno-pedantic -Wno-sign-conversion -Wno-type-limits -Wno-unsuffixed-float-constants -m64 -O3 -c -o malloc/libicrt_a-scratch_buffer_grow_preserve.o `test -f 'malloc/scratch_buffer_grow_preserve.c' || echo '/c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/'`malloc/scratch_buffer_grow_preserve.c In file included from /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat.c:54: /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_atime_ns': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:69:10: note: in expansion of macro 'STAT_TIMESPE' 69 | return STAT_TIMESPEC (st, st_atim).tv_nsec; | ^~~~~~~~~~~~~ gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -I. -I/c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib -I.. -I../lib -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DNDEBUG -Wno-cast-qual -Wno-conversion -Wno-float-equal -Wno-sign-compare -Wno-undef -Wno-unused-function -Wno-unused-parameter -Wno-float-conversion -Wimplicit-fallthrough -Wno-pedantic -Wno-sign-conversion -Wno-type-limits -Wno-unsuffixed-float-constants -m64 -O3 -c -o malloc/libicrt_a-scratch_buffer_set_array_size.o `test -f 'malloc/scratch_buffer_set_array_size.c' || echo '/c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/'`malloc/scratch_buffer_set_array_size.c /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/fstat.c: At top level: /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_ctime_ns': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/fstat.c:68:1: error: conflicting types for 'rpl_fstat'; have 'int(int, struct _stati64 *)' 68 | rpl_fstat (int fd, struct stat *buf) | ^~~~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:82:10: note: in expansion of macro 'STAT_TIMESPE' 82 | return STAT_TIMESPEC (st, st_ctim).tv_nsec; | ^~~~~~~~~~~~~ In file included from /usr/include/time.h:158, from ./time.h:47, from /usr/include/sys/stat.h:9, from ./sys/stat.h:32, from /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/fstat.c:25: ./sys/stat.h:955:1: note: previous declaration of 'rpl_fstat' with type 'int(int, struct _stati64 *)' 955 | _GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2))); | ^~~~~~~~~~~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_mtime_ns': In file included from /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.c:21: /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_atime_ns': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/fstat.c: In function 'rpl_fstat': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:95:10: note: in expansion of macro 'STAT_TIMESPE' 95 | return STAT_TIMESPEC (st, st_mtim).tv_nsec; | ^~~~~~~~~~~~~ gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -I. -I/c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib -I.. -I../lib -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DNDEBUG -Wno-cast-qual -Wno-conversion -Wno-float-equal -Wno-sign-compare -Wno-undef -Wno-unused-function -Wno-unused-parameter -Wno-float-conversion -Wimplicit-fallthrough -Wno-pedantic -Wno-sign-conversion -Wno-type-limits -Wno-unsuffixed-float-constants -m64 -O3 -c -o uniwidth/libicrt_a-width.o `test -f 'uniwidth/width.c' || echo '/c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/'`uniwidth/width.c /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:69:10: note: in expansion of macro 'STAT_TIMESPE' 69 | return STAT_TIMESPEC (st, st_atim).tv_nsec; | ^~~~~~~~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/fstat.c:92:47: error: passing argument 2 of 'orig_fstat' from incompatible pointer type [-Wincompatible-pointer-types] 92 | return stat_time_normalize (orig_fstat (fd, buf), buf); | ^~~ | | | struct _stati64 * /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_atime': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_ctime_ns': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/fstat.c:35:34: note: expected 'struct stat *' but argument is of type 'struct _stati64 *' 35 | orig_fstat (int fd, struct stat *buf) | ~~~~~~~~~~~~~^~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:121:10: note: in expansion of macro 'STAT_TIMESPEC' 121 | return STAT_TIMESPEC (st, st_atim); | ^~~~~~~~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:82:10: note: in expansion of macro 'STAT_TIMESPE' 82 | return STAT_TIMESPEC (st, st_ctim).tv_nsec; | ^~~~~~~~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/fstat.c:92:53: error: passing argument 2 of 'stat_time_normalize' from incompatible pointer type [-Wincompatible-pointer-types] 92 | return stat_time_normalize (orig_fstat (fd, buf), buf); | ^~~ | | | struct _stati64 * /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_ctime': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_mtime_ns': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:211:58: note: expected 'struct _stati64 *' but argument is of type 'struct _stati64 *' 211 | stat_time_normalize (int result, _GL_UNUSED struct stat *st) /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:135:10: note: in expansion of macro 'STAT_TIMESPEC' 135 | return STAT_TIMESPEC (st, st_ctim); | ^~~~~~~~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:95:10: note: in expansion of macro 'STAT_TIMESPE' 95 | return STAT_TIMESPEC (st, st_mtim).tv_nsec; | ^~~~~~~~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_mtime': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_atime': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:149:10: note: in expansion of macro 'STAT_TIMESPEC' 149 | return STAT_TIMESPEC (st, st_mtim); | ^~~~~~~~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:121:10: note: in expansion of macro 'STAT_TIMESPEC' 121 | return STAT_TIMESPEC (st, st_atim); | ^~~~~~~~~~~~~ make[2]: *** [Makefile:1654: libicrt_a-fstat.o] Error 1 /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_birthtime': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_ctime': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:167:7: note: in expansion of macro 'STAT_TIMESPE' 167 | t = STAT_TIMESPEC (st, st_birthtim); | ^~~~~~~~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:135:10: note: in expansion of macro 'STAT_TIMESPEC' 135 | return STAT_TIMESPEC (st, st_ctim); | ^~~~~~~~~~~~~ make[2]: *** Waiting for unfinished jobs.... /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_mtime': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:149:10: note: in expansion of macro 'STAT_TIMESPEC' 149 | return STAT_TIMESPEC (st, st_mtim); | ^~~~~~~~~~~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h: In function 'get_stat_birthtime': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:52:43: error: invalid use of undefined type 'const struct _stati64' 52 | # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) | ^~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:167:7: note: in expansion of macro 'STAT_TIMESPE' 167 | t = STAT_TIMESPEC (st, st_birthtim); | ^~~~~~~~~~~~~ make[2]: *** [Makefile:1780: libicrt_a-stat-time.o] Error 1 /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat.c: At top level: /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat.c:112:1: error: conflicting types for 'rpl_stat'; have int(const char *, struct _stati64 *)' 112 | rpl_stat (char const *name, struct stat *buf) | ^~~~~~~~ In file included from /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat.c:51: ./sys/stat.h:1363:18: note: previous declaration of 'rpl_stat' with type 'int(const char * restrict, struct _stati64 * restrict)' 1363 | _GL_EXTERN_C int stat (const char *restrict name, struct stat *restrict buf) | ^~~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat.c: In function 'rpl_stat': /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat.c:420:33: error: passing argument 2 of 'orig_stat' from incompatible pointer type [-Wincompatible-pointer-types] 420 | int result = orig_stat (name, buf); | ^~~ | | | struct _stati64 * /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat.c:37:47: note: expected 'struct stat *' but argument is of type 'struct _stati64 *' 37 | orig_stat (const char *filename, struct stat *buf) | ~~~~~~~~~~~~~^~~ /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat.c:436:45: error: passing argument 2 of 'stat_time_normalize' from incompatible pointer type [-Wincompatible-pointer-types] 436 | result = stat_time_normalize (result, buf); | ^~~ | | | struct _stati64 * /c/users/peile/.conan2/p/b/libic5861d38eefb11/b/src/srclib/stat-time.h:211:58: note: expected 'struct _stati64 *' but argument is of type 'struct _stati64 *' 211 | stat_time_normalize (int result, _GL_UNUSED struct stat *st) make[2]: *** [Makefile:1774: libicrt_a-stat.o] Error 1 make[2]: Leaving directory '/c/Users/peile/.conan2/p/b/libic5861d38eefb11/b/build-release/srclib' make[1]: *** [Makefile:1500: all] Error 2 make[1]: Leaving directory '/c/Users/peile/.conan2/p/b/libic5861d38eefb11/b/build-release/srclib' make: *** [Makefile:34: all] Error 2 libiconv/1.17: ERROR: Package 'f8a46f395ffcd3089a1e8f725f80a502bf9374c6' build failed libiconv/1.17: WARN: Build folder C:\Users\peile\.conan2\p\b\libic5861d38eefb11\b\build-release ERROR: libiconv/1.17: Error in build() method, line 121 autotools.make() ConanException: Error 2 while executing
最新发布
10-17
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值