#1 The code can not compile on MacOS

开启中
simon4 年之前创建 · 1 条评论

When I compiled the code on MacOS 10.15.3 I got the error as shown below

sunjiantaodeAir:libfree bryan$ make gcc -I../lib -g -O2 -D_REENTRANT -Wall -c -o in_cksum.o in_cksum.c gcc -I../lib -g -O2 -D_REENTRANT -Wall -c -o inet_ntop.o inet_ntop.c gcc -I../lib -g -O2 -D_REENTRANT -Wall -c -o inet_pton.o inet_pton.c ar rv ../libunp.a in_cksum.o inet_ntop.o inet_pton.o a - in_cksum.o a - inet_ntop.o a - inet_pton.o /Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../libunp.a(inet_ntop.o) has no symbols ranlib ../libunp.a /Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../libunp.a(inet_ntop.o) has no symbols

Could you please give some help? Thanks!

When I compiled the code on MacOS 10.15.3 I got the error as shown below sunjiantaodeAir:libfree bryan$ make gcc -I../lib -g -O2 -D_REENTRANT -Wall -c -o in_cksum.o in_cksum.c gcc -I../lib -g -O2 -D_REENTRANT -Wall -c -o inet_ntop.o inet_ntop.c gcc -I../lib -g -O2 -D_REENTRANT -Wall -c -o inet_pton.o inet_pton.c ar rv ../libunp.a in_cksum.o inet_ntop.o inet_pton.o a - in_cksum.o a - inet_ntop.o a - inet_pton.o /Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../libunp.a(inet_ntop.o) has no symbols ranlib ../libunp.a /Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../libunp.a(inet_ntop.o) has no symbols Could you please give some help? Thanks!
李晓明 评论于 4 年之前
所有者

Hi, can you try edit the file "configure" at the top level, line 7852, and remove the file name "inet_ntop.o" from that line? The resulting line should look like this:

LIBFREE_OBJS="$LIBFREE_OBJS inet_pton.o" In other words, the build should still use inet_pton.o but no longer use inet_ntop.o since that is provided by your OS.

After making that change, redo the build instructions starting from the ./configure step at the beginning and please let me know if this fixes your issue. If so, I'll commit the change to the repo.

Thanks.

Hi, can you try edit the file "configure" at the top level, line 7852, and remove the file name "inet_ntop.o" from that line? The resulting line should look like this: LIBFREE_OBJS="$LIBFREE_OBJS inet_pton.o" In other words, the build should still use inet_pton.o but no longer use inet_ntop.o since that is provided by your OS. After making that change, redo the build instructions starting from the ./configure step at the beginning and please let me know if this fixes your issue. If so, I'll commit the change to the repo. Thanks.
登录 并参与到对话中。
未选择标签
未选择里程碑
未指派成员
1 名参与者
正在加载...
取消
保存
这个人很懒,什么都没留下。