문제

I have a problem with building the Platinum UPnP stack with Android NDK on MacOSX 10.6.5.

I've downloaded the latest version of Android NDK for Mac from here, installed SCons (for building) and downloaded the latest version of Platinum form their website.

Than I setup the ANDROID_NDK_HOME to my NDK root directory and tried to build:
scons -Q target=arm-android-linux and I got the following error:

(...) Exception: ANDROID NDK not configured, use host-setup.sh to configure it: (...)

The problem is that this file got removed from the Android NDK according to the documentation:

Previous releases required you to run the 'build/host-setup.sh' script to configure the NDK. However, this step has been removed in release 4.

And now I'm kinda stuck and don't know how to solve this issue.

UPDATE:

I've downloaded the NDK r3 (the last one with the missing file) and configured it with host-setup.sh

But when I try to build the target, it runs for some time and then crashes on:

Build/Targets/arm-android-linux/Debug/Source/Tests/FileMediaServer/FileMediaServerTest.o: In function `main':
/Users/darkh/Platinum-SRC-0-6-3_683/Platinum/Source/Tests/FileMediaServer/FileMediaServerTest.cpp:153: warning: warning: gets() is very unsafe; consider using fgets()

Build/Targets/arm-android-linux/Debug/libPltMediaServer.a(PltMediaItem.o): In function `PLT_MediaItem::DynamicCast(void const*)':
PltMediaItem.cpp:(.text._ZN13PLT_MediaItem11DynamicCastEPKv[PLT_MediaItem::DynamicCast(void const*)]+0x5c): undefined reference to `PLT_MediaItem::_class_PLT_MediaItem'

Build/Targets/arm-android-linux/Debug/libPltMediaServer.a(PltMediaItem.o): In function `PLT_MediaContainer::DynamicCast(void const*)':
PltMediaItem.cpp:(.text._ZN18PLT_MediaContainer11DynamicCastEPKv[PLT_MediaContainer::DynamicCast(void const*)]+0x5c): undefined reference to `PLT_MediaContainer::_class_PLT_MediaContainer'
collect2: ld returned 1 exit status

scons: *** [Build/Targets/arm-android-linux/Debug/FileMediaServerTest] Error 1
도움이 되었습니까?

해결책

Apart from the host-setup.sh issue, it looks like Platinum uses its own SCons based build system that relies on the path of the compiler containing arm-eabi-4.4.0. That has changed in the latest Android NDK too.

You'll either have to hack the build system yourself or wait for them to update it for r5. A good place to start looking would be the file Build/Targets/arm-android-linux/Config.scons, but there are quite a few non-obvious changes you'd have to make to get it up and running.

EDIT:

Try with r4b. Create a file in android-ndk-r4b/out/host/config.mk whose contents is:

HOST_TAG := linux-x86

.. or the equivalent on Mac - whatever the directory in android-ndk-r4b/build/prebuilt/ is called. That should compile the lot - it did here.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top