Ticket #2047 (closed defect: fixed)

Opened 2 months ago

Last modified 2 months ago

Use ar/ranlib from android ndk binutils when building using clang with --use-ndk-cflags option

Reported by: riza Owned by: bennylp
Priority: normal Milestone: release-2.7.1
Component: common Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description

At the moment when building android using clang, the build process will use ar/ranlib from host machine's binutils. This is not a problem on linux, however error will be raised on MacOS:

warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: ../lib/libpj-arm-unknown-linux-androideabi.a the table of contents is empty (no object file members in the library define global symbols)
output/pjlib-test-arm-unknown-linux-androideabi/main.o: In function `main':
pjlib/build/../src/pjlib-test/main.c:(.text.main+0x3c): undefined reference to `PJ_SOCK_DGRAM'
pjlib/build/../src/pjlib-test/main.c:(.text.main+0x4c): undefined reference to `PJ_SOCK_DGRAM'
pjlib/build/../src/pjlib-test/main.c:74: undefined reference to `pj_str'
pjlib/build/../src/pjlib-test/main.c:76: undefined reference to `pj_strtoul'
pjlib/build/../src/pjlib-test/main.c:82: undefined reference to `pj_str'
...

This ticket will check and use the binutils from the android ndk.

Change History

comment:1 Changed 2 months ago by riza

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

In 5666:

Close #2047: Use android ndk binutils when building with --use-ndk-cflags options.

Note: See TracTickets for help on using tickets.