pocoproject / poco

The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
https://pocoproject.org
Other
8.36k stars 2.16k forks source link

SharedMemoryPOSIX functions are not found for android build #2714

Open sharmilee opened 5 years ago

sharmilee commented 5 years ago

Expected behavior

It should build the library for android

Actual behavior

It gives following error log:


[> Configured for Android
> ** Compiling src/SharedMemory.cpp (debug, static)
> ** Compiling src/BinaryWriter.cpp (release, static)
> ** Compiling src/Bugcheck.cpp (release, static)
> ** Compiling src/ByteOrder.cpp (release, static)
> ** Compiling src/Channel.cpp (release, static)
> In file included from src/SharedMemory.cpp:22:
> src/SharedMemory_POSIX.cpp:50:10: error: no member named 'shm_open' in the global namespace
>         _fd = ::shm_open(_name.c_str(), flags, S_IRUSR | S_IWUSR);
>               ~~^
> src/SharedMemory_POSIX.cpp:59:5: error: no member named 'shm_unlink' in the global namespace
>                 ::shm_unlink(_name.c_str());
>                 ~~^
> src/SharedMemory_POSIX.cpp:129:5: error: no member named 'shm_unlink' in the global namespace
>                 ::shm_unlink(_name.c_str());
>                 ~~^
> 3 errors generated.
> make[1]: *** 
[development/projects/poco_lib/Foundation/obj/Android/armeabi-v7a/debug_static/SharedMemory.o] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make: *** [Foundation-libexec] Error 2
> ** Compiling src/SharedMemory.cpp (debug, static)
> ** Compiling src/BinaryWriter.cpp (release, static)
> ** Compiling src/Bugcheck.cpp (release, static)
> ** Compiling src/ByteOrder.cpp (release, static)
> ** Compiling src/Channel.cpp (release, static)
> In file included from src/SharedMemory.cpp:22:
> src/SharedMemory_POSIX.cpp:50:10: error: no member named 'shm_open' in the global namespace
>         _fd = ::shm_open(_name.c_str(), flags, S_IRUSR | S_IWUSR);
>               ~~^
> src/SharedMemory_POSIX.cpp:59:5: error: no member named 'shm_unlink' in the global namespace
>                 ::shm_unlink(_name.c_str());
>                 ~~^
> src/SharedMemory_POSIX.cpp:129:5: error: no member named 'shm_unlink' in the global namespace
>                 ::shm_unlink(_name.c_str());
>                 ~~^
> 3 errors generated.
> make[1]: *** [/development/projects/poco_lib/Foundation/obj/Android/x86/debug_static/SharedMemory.o] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make: *** [Foundation-libexec] Error 2](url)

#### Steps to reproduce the problem
(please make this a [SSCCE](http://www.sscce.org/), if applicable and reasonable)
My script to build poco looks like this:

> cd /Users/$USER/development/projects/poco_lib
> 
> ./configure --config=Android --static --no-tests --no-samples
> 
> export PATH=$PATH:/Users/$USER/development/sharedsdk/android/android-ndk-r19c/toolchains/llvm/prebuilt/darwin-x86_64/bin
> make -s -j4 ANDROID_ABI=armeabi-v7a CC=armv7a-linux-androideabi18-clang CXX=armv7a-linux-androideabi18-clang++ CXXFLAGS="-stdlib=libc++"
> make -s -j4 ANDROID_ABI=x86 CC=i686-linux-android18-clang CXX=i686-linux-android18-clang++ CXXFLAGS="-stdlib=libc++"

#### POCO version
1.9.1
#### Compiler and version
clang
#### Operating system and version
Android 21
#### Other relevant information
andka428-andka commented 3 years ago

Did you find a solution to this. Im +1 on this problem.

aleks-f commented 2 years ago

not supported yet https://github.com/pocoproject/poco/blob/191cbdc97e1d9de023b8a65e0dc844911c06f6a8/doc/99300-AndroidPlatformNotes.page#L105

github-actions[bot] commented 11 months ago

This issue is stale because it has been open for 365 days with no activity.