Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#2256 closed defect (fixed)

Failed building SWIG java binding for android (x86 target)

Reported by: riza Owned by: nanang
Priority: normal Milestone: release-2.10
Component: applications Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description

Currently builing SWIG java binding for android (x86 target) failed.

libwebrtc-x86-unknown-linux-android.a(aec_core.o):aec_core.c:function WebRtcAec_CreateAec: error: undefined reference to 'WebRtc_GetCPUInfo'
libwebrtc-x86-unknown-linux-android.a(aec_core.o):aec_core.c:function WebRtcAec_CreateAec: error: undefined reference to 'WebRtcAec_InitAec_SSE2'
libwebrtc-x86-unknown-linux-android.a(aec_rdft.o):aec_rdft.c:function aec_rdft_init: error: undefined reference to 'WebRtc_GetCPUInfo'
libwebrtc-x86-unknown-linux-android.a(aec_rdft.o):aec_rdft.c:function aec_rdft_init: error: undefined reference to 'aec_rdft_init_sse2'

It was reported that r6066 has caused this. The fix is intended to fix build error using NDK r20b, however it seems to trigger another error which also effect older NDK.
Until a better solution is found, it is recommended to use older NDK (e.g: r19) without the the fix on r6066.

Thanks to Samuel Fornes for the report.

Change History (3)

comment:1 Changed 4 years ago by nanang

  • Owner set to nanang
  • Resolution set to fixed
  • Status changed from new to closed

In 6120:

Fix #2256: Mini refactored Android configure script:

  • added CXXFLAGS & LDFLAGS parsing (from ndk-build output), CXXFLAGS was set to CFLAGS.
  • updated WebRTC instruction set to use SSE2, was generic, for Android emulator (x86 ABI).
  • updated C++ library/STL backend to use c++_shared, somehow '-lc++_static' is ignored after the refactor, also the official NDK docs mentions that c++_static may cause undefined behavior for app with multiple shared libraries (note pjsua2 app may use other shared libraries).

comment:2 Changed 4 years ago by nanang

In 6121:

Re #2256: Fixed build error for iOS target due to changes in r6120.

comment:3 Changed 4 years ago by nanang

In 6122:

Re #2256: Readjusted build configs (after r6120 & r6121) to accomodate the convention that CXXFLAGS always includes CFLAGS in all PJSIP modules.

Note: See TracTickets for help on using tickets.