poco icon indicating copy to clipboard operation
poco copied to clipboard

SharedMemoryPOSIX functions are not found for android build

Open sharmilee opened this issue 6 years ago • 2 comments

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

sharmilee avatar Jun 03 '19 15:06 sharmilee

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

andka428-andka avatar Aug 05 '21 08:08 andka428-andka

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

aleks-f avatar Jun 23 '22 14:06 aleks-f

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

github-actions[bot] avatar Nov 24 '23 02:11 github-actions[bot]