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

No strndup on FreeBSD/OSX #4

Open
sirvaliance opened this issue Jan 22, 2012 · 4 comments
Open

No strndup on FreeBSD/OSX #4

sirvaliance opened this issue Jan 22, 2012 · 4 comments

Comments

@sirvaliance
Copy link

So on building Inverarity on OSX, the following error occurs:

Undefined symbols:
"_strndup", referenced from:
_load_distribution in dist.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

I will look for the best route to fix this issue.

@sirvaliance
Copy link
Author

I guess strndup was added in Lion, but otherwise the user has to create or add it themselves. Will continure to look into it.

@nmathewson
Copy link
Owner

Weird that it compiled in the first place. Are you sure there isn't some error before the linker?

@sirvaliance
Copy link
Author

Here is the full output of make:

cc -c -Wall -g -O2 `pkg-config --cflags-only-other libevent libevent_pthreads libevent_openssl openssl` `pkg-config --cflags-only-I libevent libevent_pthreads libevent_openssl openssl`  -o dist.o dist.c
dist.c: In function ‘parse_distribution_fname’:
dist.c:141: warning: implicit declaration of function ‘strndup’
dist.c:141: warning: incompatible implicit declaration of built-in function ‘strndup’
cc -Wall -g -O2 `pkg-config --cflags-only-other libevent libevent_pthreads libevent_openssl openssl` `pkg-config --cflags-only-I libevent libevent_pthreads libevent_openssl openssl` `pkg-config --libs-only-L --libs-only-other libevent libevent_pthreads libevent_openssl openssl` -o inverarity dist.o hash.o logging.o main.o net.o request.o util.o worker.o `pkg-config --libs-only-l libevent libevent_pthreads libevent_openssl openssl`
Undefined symbols:
  "_strndup", referenced from:
      _load_distribution in dist.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [inverarity] Error 1

@nmathewson
Copy link
Owner

Ick. I suppose it might be time to add an autoconf dependency. Or, since I keep meaning to learn cmake, to add a cmakefile.

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