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

Fixed warnings of duplicate libs #4177

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Fixed warnings of duplicate libs #4177

merged 1 commit into from
Dec 4, 2024

Conversation

sauwming
Copy link
Member

@sauwming sauwming commented Nov 25, 2024

Fixed the following warnings:
ld: warning: ignoring duplicate libraries: '-lSDL2', '-lc++, '-lixml', '-lupnp', '-lvpx'

@sauwming sauwming added this to the release-2.15 milestone Nov 25, 2024
@sauwming sauwming self-assigned this Nov 25, 2024
@@ -331,7 +331,6 @@ export APP_LDLIBS := $(PJSUA_LIB_LDLIB) \
$(PJLIB_LDLIB) \
@LIBS@
export APP_LDXXLIBS := $(PJSUA2_LIB_LDLIB) \
-lstdc++ \
Copy link
Member

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 :)

Copy link
Member Author

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.

Copy link
Member Author

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.

@sauwming sauwming removed this from the release-2.15 milestone Nov 25, 2024
@sauwming sauwming closed this Nov 25, 2024
@sauwming sauwming reopened this Dec 4, 2024
@sauwming sauwming added this to the release-2.16 milestone Dec 4, 2024
@sauwming sauwming requested a review from nanangizz December 4, 2024 01:57
@sauwming sauwming merged commit 8117bc5 into master Dec 4, 2024
68 checks passed
@sauwming sauwming deleted the dup-lib-warning branch December 4, 2024 04:16
sauwming added a commit that referenced this pull request Dec 17, 2024
sauwming added a commit that referenced this pull request Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants