On 12/29/14 21:00, Egor Pugin wrote:
> Here are notes about my crosscompiling experience.
>
> As we cannot run arm binaries on i?86/x86_64 I skip the boot stage.
> Generated files were taken from the native build directory. So, there
> are no boot binaries, only master versions. This is related to both
> android/ios.
>
> CMake can use predefined set of rules (toolchain) for crosscompiling.
> When toolchains for Android is powerful
> (https://code.google.com/p/android-cmake/ ,
> https://github.com/taka-no-me/android-cmake), the iOS toolchains is
> not so great (https://code.google.com/p/ios-cmake/). The problem with
> iOS toolchains is that Apple changes things in iOS/Xcode rather
> frequently and users do not use cmake for them very often.
>
> Android:
> CMake toolchain - https://github.com/taka-no-me/android-cmake
> I built all main binaries, libraries, plugins, examples for Android
> (of course including fbclient, Engine12), architecture - arm v7
> 32-bit.
> I did two small changes to build the code: http://pastebin.com/nBXD2Rq6
> It seems Android NDK API (I used ANDROID_NATIVE_API_LEVEL=android-21)
> does not have qsort_r, 3rd argument for open.
> The changes may be a little incorrect, but for my tests, it was ok.

Does it have process-shared mutexes and events?
I wonder cause this always seemed to be main problem for android port.

> iOS:
> I used following config: OS X 10.10.1, Xcode 6.1, iOS target version -
> 8.1, target arch - arm v7 32-bit, AppleClang 6.0, CMake toolchain -
> https://code.google.com/p/ios-cmake/
> List of initial source code changes: http://pastebin.com/rYMjgXdU
> The line in src/remote/protocol.h "arch_arm = 7," uses the free value
> in enum. As I said this is only for testing purposes.
>
> For iPhone 6 simulator (i386) the error is:
> duplicate symbol
> __ZTIN8Firebird15InstanceControl12InstanceLinkINS_12InitInstanceIN12_GLOBAL__N_121DatabaseDirectoryListEEELNS0_12DtorPriorityE3EEE
> in:
>      
> /Users/egor/dev/firebird_cmake/build_ios/src/Debug-iphonesimulator/libengine12_common.a(jrd.o)
>      
> /Users/egor/dev/firebird_cmake/build_ios/src/Debug-iphonesimulator/libcommon.a(db_alias.o)
> duplicate symbol
> __ZTSN8Firebird15InstanceControl12InstanceLinkINS_12InitInstanceIN12_GLOBAL__N_121DatabaseDirectoryListEEELNS0_12DtorPriorityE3EEE
> in:
>      
> /Users/egor/dev/firebird_cmake/build_ios/src/Debug-iphonesimulator/libengine12_common.a(jrd.o)
>      
> /Users/egor/dev/firebird_cmake/build_ios/src/Debug-iphonesimulator/libcommon.a(db_alias.o)
> ld: 2 duplicate symbols for architecture i386
> clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)

Symbols visibility is usual problem with apple OSes. This symbols should 
be weak and therefore should not cause dup errors.

> For iOS 8.1 (arm v7) the error is:
> The build currently stops on linking libfbclient.dylib:
> Undefined symbols for architecture armv7:
>    "_libiconv", referenced from:
>        (anonymous namespace)::IConv::convert(Firebird::AbstractString&,
> void*) in libcommon.a(isc_file.o)
>    "_libiconv_open", referenced from:
>        (anonymous namespace)::IConv::openIconv(char const*, char
> const*) in libcommon.a(isc_file.o)
>    "_libiconv_close", referenced from:
>        (anonymous namespace)::IConv::closeIconv(void*) in 
> libcommon.a(isc_file.o)
> ld: symbol(s) not found for architecture armv7
> clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)
>

That's even more funny. There _is_ .h file that redefined iconv* as 
libiconv*, but there is no such entries in available libraries. Looks 
like additional library should be added to the link.


------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to