-
Notifications
You must be signed in to change notification settings - Fork 801
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
Fixed warnings of duplicate libs #4177
Conversation
@@ -331,7 +331,6 @@ export APP_LDLIBS := $(PJSUA_LIB_LDLIB) \ | |||
$(PJLIB_LDLIB) \ | |||
@LIBS@ | |||
export APP_LDXXLIBS := $(PJSUA2_LIB_LDLIB) \ | |||
-lstdc++ \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC there was an issue related to missing libstdc++
but can't remember the details (which platform, SDK version, etc).
The point is better duplicated than missed? So please make sure this is always duplicated before removing it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, I wasn't 100% certain about this as well, but since the linker warning pops quite a lot and it can't be suppressed (Apple clang doesn't seem to support -Wl,--allow-multiple-definition
nor -Wl,-z,muldefs
) and I have tested the patch on Mac, iOS, and Android, I thought it should be okay.
But yes, it's probably safer to wait until the release, since the risk is a broken build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reopening this. Passed the CI tests, so the patch seems okay.
As for libstdc++
, it's duplicated here in PJSUA2_LIB_LDFLAGS
:
https://github.com/pjsip/pjproject/blob/master/pjsip/build/Makefile#L156
which should be more appropriate since it belongs to the pjsua2 C++ library, rather than put it in build.mak.in
, which applies to the entire library.
Fixed the following warnings:
ld: warning: ignoring duplicate libraries: '-lSDL2', '-lc++, '-lixml', '-lupnp', '-lvpx'