Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android compilation is broken with recent NDK (strerror_r) #85

Open
SirLynix opened this issue Jul 6, 2023 · 1 comment
Open

Android compilation is broken with recent NDK (strerror_r) #85

SirLynix opened this issue Jul 6, 2023 · 1 comment
Milestone

Comments

@SirLynix
Copy link

SirLynix commented Jul 6, 2023

Hi,

It looks like strerror_r changed on Android between SDK versions, sockpp compiles fine with SDK 21 but compilation fails with SDK 29 with the same error as #52.

[ 54%] Building CXX object src/CMakeFiles/sockpp-objs.dir/inet6_address.cpp.o
cd /home/runner/.xmake/cache/packages/2307/s/sockpp/v0.8.1/source/build_d7deac03/src && /home/runner/work/xmake-repo/xmake-repo/android-ndk-r22/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-none-linux-androideabi29 --gcc-toolchain=/home/runner/work/xmake-repo/xmake-repo/android-ndk-r22/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/home/runner/work/xmake-repo/xmake-repo/android-ndk-r22/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/runner/.xmake/cache/packages/2307/s/sockpp/v0.8.1/source/include -I/home/runner/.xmake/cache/packages/2307/s/sockpp/v0.8.1/source/build_d7deac03/generated/include -I/home/runner/.xmake/cache/packages/2307/s/sockpp/v0.8.1/source/src -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security   -Oz -DNDEBUG  -fPIC -Wall -Wextra -Wpedantic -Wdocumentation -MD -MT src/CMakeFiles/sockpp-objs.dir/inet6_address.cpp.o -MF CMakeFiles/sockpp-objs.dir/inet6_address.cpp.o.d -o CMakeFiles/sockpp-objs.dir/inet6_address.cpp.o -c /home/runner/.xmake/cache/packages/2307/s/sockpp/v0.8.1/source/src/inet6_address.cpp
/home/runner/.xmake/cache/packages/2307/s/sockpp/v0.8.1/source/src/exception.cpp:71:9: error: cannot initialize a variable of type 'int' with an rvalue of type 'char *'
                                int e = strerror_r(err, buf, sizeof(buf));
                                    ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Full error log: https://github.com/xmake-io/xmake-repo/actions/runs/5475705045/jobs/9972184478?pr=2284

@waruqi
Copy link

waruqi commented Jul 10, 2023

#86

@fpagliughi fpagliughi added this to the v0.9 milestone Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants