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

Duplicate Symbols #14

Open
troya2 opened this issue Aug 19, 2014 · 3 comments
Open

Duplicate Symbols #14

troya2 opened this issue Aug 19, 2014 · 3 comments

Comments

@troya2
Copy link

troya2 commented Aug 19, 2014

I followed the read me, including building a fat binary. I included the project into my workspace and added libc++.dylib to my project to get everything to compile. However, I'm getting 56 duplicate symbols in libGossip.o when linking. One from error.o, about half in sdp.o, and the rest in sdp_cmp.o.

duplicate symbol _pjmedia_strerror in error.o
duplicate symbol _pjmedia_sdp_attr_create in sdp.o
duplicate symbol _pjmedia_sdp_attr_clone in sdp.o
duplicate symbol _pjmedia_sdp_attr_find in sdp.o
...
duplicate symbol _pjmedia_sdp_media_cmp in sdp_cmp.o
duplicate symbol _pjmedia_sdp_session_cmp in sdp_cmp.o
duplicate symbol _pjmedia_sdp_conn_cmp in sdp_cmp.o
...

Any idea what I need to do to eliminate the duplicate symbols?

Thanks!

@chakrit
Copy link
Owner

chakrit commented Aug 19, 2014

Hmmm, how does your build settings looks like? Are you by any chance linking PJSIP twice? I think there might be some duplicate libs being linked somewhere (from Gossip or otherwise.) I'll give a full fresh build this weekend and see if there's anything to be updated but that's my initial thoughts.

Also, feel free to PR if you find anything broken or incorrect. : )

@troya2
Copy link
Author

troya2 commented Aug 19, 2014

I think it was my mistake - I added libGossip.a to my link build phase. I didn't realize that Xcode would link to it automatically because it is part of the workspace.

@troya2
Copy link
Author

troya2 commented Aug 19, 2014

On further investigation, it appears that libGossip.a does need to be in the link build phase, and that results in the duplicate symbols. I ran ar on libGossip.a and see that there are a number of .o files duplicated - is this normal, or could it be the source of the problem? The duplicated .o files are:

% ar xv libGossip.a | sort | uniq -d
x - endpoint.o
x - errno.o
x - json.o
x - lpc.o
x - preprocess.o
x - presence.o
x - sdp.o
x - sdp_cmp.o
x - sdp_neg.o
x - sha1.o
x - string.o
x - types.o

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