frostwire / frostwire-jlibtorrent

A swig Java interface for libtorrent by the makers of FrostWire. Develop libtorrent based apps with the joy of coding in Java.
http://www.frostwire.com
MIT License
444 stars 137 forks source link

Build with Boost 1.74 #250

Closed master255 closed 3 years ago

master255 commented 3 years ago

@gubatron You must add "cxxflags-frtti" in all config files. Then the project compiles with 1.74 boost without errors.

https://github.com/frostwire/frostwire-jlibtorrent/blob/00d14ca52baf414a0005cabf25e444402627dcc7/swig/config/android-arm64-config.jam#L11

second bug: https://github.com/frostwire/frostwire-jlibtorrent/blob/00d14ca52baf414a0005cabf25e444402627dcc7/swig/config/android-arm-config.jam#L6

you forgot to add ":" and check all configs for these bugs.

master255 commented 3 years ago

And fix it in your script https://github.com/aldenml/libtorrent4j/issues/155#issuecomment-766350089

Restore it to the way it was before:

`prepare_android_toolchain() { abort_if_var_unset "SRC" ${SRC} abort_if_var_unset "NDK_VERSION" ${NDK_VERSION} abort_if_var_unset "os_arch" ${os_arch} abort_if_var_unset "android_api" ${android_api} pushd ${SRC}

host_os="linux" if [[ "$OSTYPE" == "darwin"* ]]; then host_os="darwin" fi

if [ ! -f android-ndk-${NDK_VERSION}.zip ]; then prompt_msg "Downloading android-ndk-${NDK_VERSION}" wget -4 -O android-ndk-${NDK_VERSION}.zip https://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-${host_os}-x86_64.zip; prompt_msg "Extracting NDK...wait"; unzip -qq android-ndk-${NDK_VERSION}.zip; fi NDK=$PWD/android-ndk-${NDK_VERSION}; prompt_msg "NDK=${NDK}" TOOLCHAIN_FOLDER="android-toolchain-${osarch}-api${android_api}" prompt_msg "Creating android toolchain --arch ${os_arch} --api ${android_api} --stl libc++ --install-dir ${TOOLCHAIN_FOLDER}" python3 $NDK/build/tools/make_standalone_toolchain.py --arch ${os_arch} --api ${android_api} --stl libc++ --install-dir ${TOOLCHAIN_FOLDER}; ANDROID_TOOLCHAIN=${PWD}/${TOOLCHAIN_FOLDER}

prompt_msg "Setting prebuilt ANDROID_TOOLCHAIN (arch ${os_arch}, api ${android_api})"

prompt_msg "ANDROID_TOOLCHAIN=${ANDROID_TOOLCHAIN}" popd }`

To support Android 19.

master255 commented 3 years ago

And I think we need to move away from using Travis. Travis is a paid service that requires money for compilation. The compilation can be done for free, on the local computer.

master255 commented 3 years ago

@gubatron I win the game! I was able to compile libtorrent version 1.2.12.0 with boost 1.75 and still keep compatibility with Android 4.4. Before you start, erase everything you have in src. The attached file is a 100% working swig. Fix your code with it. swig.zip

And I used the local computer to compile, not Travis.

gubatron commented 3 years ago

Beautiful initiative.

if you pay attention to my latest commits, Ive beeb making sure the local builds work, precisely because Travis Community is no more.

I'm only having issues now linking the android 32-bit libraries (both arm and 64bit)

I'll try some of what you've done here and include it on the local builds.

Once that's working, the plan is to the port the build scripts to create the artifacts using GitHub actions.

Will get back to you as I work more on this and take a closer look