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

The code can not compile on MacOS #2

Open
hitsjt opened this issue Feb 24, 2020 · 5 comments
Open

The code can not compile on MacOS #2

hitsjt opened this issue Feb 24, 2020 · 5 comments

Comments

@hitsjt
Copy link

hitsjt commented Feb 24, 2020

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!

@andyrudoff
Copy link
Member

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.

@Demohai
Copy link

Demohai commented Apr 1, 2020

@andyrudoff it does not work. The error also exists.

@firaga
Copy link

firaga commented Jan 6, 2021

@andyrudoff it does not work. The error also exists.

May be related to compiled files, try make a new direcotry

@UnbearableFate
Copy link

In my case, it can be compiled in my mac ,but the compiled lib can not be use in Apple M1 CPU.
Can anyone help?

@lamian111
Copy link

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.

it work,i clone a new project and do this,it's fixed

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

6 participants