I hope this message finds you well.
I am currently working on integrating the DCMTK library into an Android project on a macOS Monterey system with an Apple M2 chip. Despite following the guidelines outlined in your DCMTK Android Compilation Wiki, I have encountered persistent issues during the configuration and installation process.
System and Development Environment Details:
Operating System:
macOS Monterey
Apple M2 Chip
Android Studio Setup:
Version: Android Studio Ladybug | 2024.2.1 Patch 3
SDK Platform: Android 13.0 ("Tiramisu") API Level 33
Android SDK Build-Tools: 33.0.1
NDK (Side by Side): 27.2.12479018
Android SDK Command-line Tools: 17.0 (latest)
Android Emulator: 35.2.10 (latest)
CMake: 3.31.1
Steps Followed:
Cloned the DCMTK Repository:
git clone https://github.com/DCMTK/dcmtk.git
Attempted to Configure with CMake in terminal:
cmake -G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=RELEASE \
-DWITH_TESTING=OFF \
-DCMAKE_SYSTEM_NAME=Android \
-DCMAKE_SYSTEM_VERSION=33 \
-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \
-DCMAKE_ANDROID_SDK=/Users/xxx/Library/Android/sdk \
-DCMAKE_ANDROID_NDK=/Users/xxx/Library/Android/sdk/ndk/27.2.12479018 \
-DANDROID_EMULATOR_AVD="Pixel_3a_API_33_arm64-v8a" \
-DCMAKE_ANDROID_STL_TYPE=gnustl_static \
-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang \. >>>>> OR WITH toolchain from ndk<<<<<
-DDCMTK_BUILD_TESTS=OFF \
/Users/xxx/AndroidStudioProjects/dcmtk
Encountered Error:
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
Call Stack (most recent call first):
/Users/xxx/Library/Android/sdk/ndk/27.2.12479018/build/cmake/android.toolchain.cmake:55 (include)
/Users/xxx/AndroidStudioProjects/dcmtk-android-build/CMakeFiles/3.31.2/CMakeSystem.cmake:6 (include)
/Users/xxx/AndroidStudioProjects/dcmtk-android-build/CMakeFiles/CMakeScratch/TryCompile-Mya4b0/CMakeLists.txt:3 (project)
CMake Deprecation Warning at /Users/xxx/Library/Android/sdk/ndk/27.2.12479018/build/cmake/flags.cmake:18 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
Call Stack (most recent call first):
/Applications/CMake.app/Contents/share/cmake-3.31/Modules/Platform/Android-Clang.cmake:23 (include)
/Applications/CMake.app/Contents/share/cmake-3.31/Modules/Platform/Android-Clang-C.cmake:1 (include)
/Applications/CMake.app/Contents/share/cmake-3.31/Modules/CMakeCInformation.cmake:48 (include)
/Users/xxx/AndroidStudioProjects/dcmtk-android-build/CMakeFiles/CMakeScratch/TryCompile-Mya4b0/CMakeLists.txt:3 (project)
Looking for socket in socket - not found
Found BISON: /usr/bin/bison (found version "2.3")
Found FLEX: /usr/bin/flex (found version "2.6.4")
Waiting until the Android device emulator is ready to receive instructions...
Issues Encountered:
Emulator Interaction Stalls Build: Despite having the Android emulator running on three different AVDs and on two separate Mac computers, the CMake configuration process consistently halts with the message:
"Waiting until the Android device emulator is ready to receive instructions..."
Toolchain File Availability: The DCMTK Android Compilation Wiki mentions a built-in toolchain file (android.toolchain.cmake) within the CMake subdirectory of the repository. However, I am unable to locate this file in the cloned repository. This leads me to believe that the wiki may be outdated.
CMake GUI Behavior: When using the CMake GUI, at least some build files are generated, but the final result remains the same— the build process waits indefinitely for emulator readiness with the same message "Waiting on emulator...".
What is interesting is that when I want to select ANDROID_EMULATOR_AVD, the dropdown list is empty in CMake GUI!
If we run it, we get an error saying:
CMake Error at CMake/dcmtkUseAndroidSDK.cmake:301 (MESSAGE):
Please select which Android emulator Android Virtual Device (AVD)
configuration to use!
I added it manually but when running configuration the result is the same.
I have also tried to remove OUTPUT_QUIET and ERROR_QUIET in dcmtkUseAndroidSDK.cmake, this is the printed Log:
CMake Deprecation Warning at /Users/xxx/Library/Android/sdk/ndk/27.2.12479018/build/cmake/android.toolchain.cmake:35 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
Call Stack (most recent call first):
/Users/xxx/AndroidStudioProjects/dcmtk-android-build/CMakeFiles/3.31.2/CMakeSystem.cmake:6 (include)
CMakeLists.txt:5 (project)
CMake Deprecation Warning at /Users/xxx/Library/Android/sdk/ndk/27.2.12479018/build/cmake/android-legacy.toolchain.cmake:35 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
Call Stack (most recent call first):
/Users/xxx/Library/Android/sdk/ndk/27.2.12479018/build/cmake/android.toolchain.cmake:55 (include)
/Users/xxx/AndroidStudioProjects/dcmtk-android-build/CMakeFiles/3.31.2/CMakeSystem.cmake:6 (include)
CMakeLists.txt:5 (project)
ANDROID_PLATFORM not set. Defaulting to minimum supported version
21.
CMake Deprecation Warning at /Users/xxx/Library/Android/sdk/ndk/27.2.12479018/build/cmake/flags.cmake:18 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
Call Stack (most recent call first):
/Applications/CMake.app/Contents/share/cmake-3.31/Modules/Platform/Android-Clang.cmake:23 (include)
/Applications/CMake.app/Contents/share/cmake-3.31/Modules/Platform/Android-Clang-C.cmake:1 (include)
/Applications/CMake.app/Contents/share/cmake-3.31/Modules/CMakeCInformation.cmake:48 (include)
CMakeLists.txt:5 (project)
Found previously started Android device emulator, checking if it's still present...
Found previously started Android device emulator, checking if it's still present... no
Starting the Android device emulator...
Info: DCMTK ZLIB support will be enabled
Info: DCMTK will compile with external default dictionary
Info: DCMTK will load dictionaries defined by DCMDICTPATH environment variable
Info: DCMTK's builtin private dictionary support will be disabled
Info: Thread support will be enabled
Info: Wide char file I/O functions will be disabled
Info: Wide char main function for command line tools will be disabled
Info: Building DCMTK with character set conversion support using built-in oficonv module
Info: Building DCMTK without large file support, files >4GB may be inaccessible!
Info: C++11 features enabled
Info: C++14 features disabled
Info: C++17 features disabled
Info: C++20 features disabled
Info: STL algorithm support disabled
Info: STL list support disabled
Info: STL map support disabled
Info: STL memory support disabled
Info: STL stack support disabled
Info: STL string support disabled
Info: STL vector support disabled
Info: STL type_traits support disabled
Info: STL tuple support disabled
Info: STL system_error support disabled
Info: STL atomic support disabled
Waiting until the Android device emulator is ready to receive instructions...
Stack Overflow Reference: I found a similar issue on Stack Overflow, where the solution involved setting the JAVA_HOME environment variable. Here is the link to the discussion: DCMTK Library Configuration for Android. I have already set JAVA_HOME as per the suggestion but continue to face the same issue.
Questions:
Could you provide a verified CMake command that is compatible with the latest Android SDK and NDK versions? Or at least a command and emulator/sdk setup you are sure it works. Maybe my command written above is missing something or is wrong.
Are there any specific flags or parameters that need to be adjusted for macOS Monterey with Apple M2 chips?
Where can I find the android.toolchain.cmake file mentioned in the wiki?
Has the location or availability of this file changed in recent DCMTK releases?
I can not upload an image that would show CMake GUI setup that at least generates some files. But you have it on stackoverflow:
https://stackoverflow.com/questions/79 ... r-android
Ensuring a smooth integration of DCMTK into my Android project is crucial for its success, and your support would be invaluable in achieving this goal.
Thank you very much for your time and support. I look forward to your response.
DCMTK Configuration & Generation on Android
Moderator: Moderator Team
-
- OFFIS DICOM Team
- Posts: 1511
- Joined: Tue, 2004-11-02, 17:22
- Location: Oldenburg, Germany
- Contact:
Re: DCMTK Configuration & Generation on Android
This looks like an incompatibility between an outdated CMake build script and a relatively new version of CMake.
The error is caused by a cmake_minimum_required() statement in one of the CMake scripts,
I guess somewhere in /Users/xxx/Library/Android/sdk/ndk/27.2.12479018/build/cmake.
The statement probably looks like this (with a version number < 3.10):
Try changing this statement like this:
and then check what happens.
Alternatively, you can try to install an old version of CMake, which might also work.
The error is caused by a cmake_minimum_required() statement in one of the CMake scripts,
I guess somewhere in /Users/xxx/Library/Android/sdk/ndk/27.2.12479018/build/cmake.
The statement probably looks like this (with a version number < 3.10):
Code: Select all
cmake_minimum_required(VERSION 3.1)
Code: Select all
cmake_minimum_required(VERSION 3.7.0...3.10.0)
Alternatively, you can try to install an old version of CMake, which might also work.
Re: DCMTK Configuration & Generation on Android
Hi Marco Eichelberg, thank you for your quick response.
I did try both options, but the result is the same. Using Cmake GUI stops at the same flow step with a message "Waiting until the Android device emulator is ready to receive instructions..."
At this point(clicking on configure) I do see generated files, 31 of them. Is there any particular file/folder that needs to be generated to execute generation after configuration setup, in order to use in android project?
I am thinking on trying to execute it on win OS and see what happens.
I tried older version of Cmake (3.19.1), running on three different API emulators, different version of NDK.
I removed OUTPUT_QUIET and ERROR_QUIET in execute_process, if it helps here is the output:
ANDROID_PLATFORM not set. Defaulting to minimum supported version
21.
Starting the Android device emulator...
Warning: TIFF support will be disabled because libtiff was not found.
Warning: PNG support will be disabled because libpng was not found.
Warning: OPENSSL support will be disabled because openssl was not found.
Warning: XML support will be disabled because libxml2 was not found.
Info: DCMTK ZLIB support will be enabled
Warning: SNDFILE support will be disabled because libsndfile was not found.
Performing Test Iconv_IS_BUILT_IN
Performing Test Iconv_IS_BUILT_IN - Failed
Warning: ICONV support will be disabled because libiconv was not found. Correct LIBICONV_LIBDIR and LIBICONV_INCLUDE_DIR and re-enable DCMTK_WITH_ICONV.
Warning: WRAP support will be disabled because libwrap was not found.
Warning: OpenJPEG support will be disabled because the OpenJPEG library was not found.
Performing Test WITH_STDLIBC_ICONV
Performing Test WITH_STDLIBC_ICONV - Failed
Warning: DOXYGEN support will be disabled because doxygen was not found.
Info: DCMTK will compile with external default dictionary
Info: DCMTK will load dictionaries defined by DCMDICTPATH environment variable
Info: DCMTK's builtin private dictionary support will be disabled
Info: Thread support will be enabled
Info: Wide char file I/O functions will be disabled
Info: Wide char main function for command line tools will be disabled
Info: Building DCMTK with character set conversion support using built-in oficonv module
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of double
Check size of double - done
Check size of float
Check size of float - done
Check size of int
Check size of int - done
Check size of long
Check size of long - done
Check size of short
Check size of short - done
Check size of void*
Check size of void* - done
Looking for __FUNCTION__
Looking for __FUNCTION__ - found
Looking for __FUNCTION__
Looking for __FUNCTION__ - found
Looking for __PRETTY_FUNCTION__
Looking for __PRETTY_FUNCTION__ - found
Looking for __PRETTY_FUNCTION__
Looking for __PRETTY_FUNCTION__ - found
Looking for __func__
Looking for __func__ - found
Looking for __func__
Looking for __func__ - found
Looking for C++ include alloca.h
Looking for C++ include alloca.h - found
Looking for C++ include arpa/inet.h
Looking for C++ include arpa/inet.h - found
Looking for C++ include cstdint
Looking for C++ include cstdint - found
Looking for C++ include dirent.h
Looking for C++ include dirent.h - found
Looking for C++ include err.h
Looking for C++ include err.h - found
Looking for C++ include fcntl.h
Looking for C++ include fcntl.h - found
Looking for C++ include fnmatch.h
Looking for C++ include fnmatch.h - found
Looking for C++ include grp.h
Looking for C++ include grp.h - found
Looking for C++ include ieeefp.h
Looking for C++ include ieeefp.h - not found
Looking for C++ include io.h
Looking for C++ include io.h - not found
Looking for C++ include langinfo.h
Looking for C++ include langinfo.h - found
Looking for C++ include libc.h
Looking for C++ include libc.h - not found
Looking for C++ include malloc.h
Looking for C++ include malloc.h - found
Looking for C++ include mqueue.h
Looking for C++ include mqueue.h - not found
Looking for C++ include netdb.h
Looking for C++ include netdb.h - found
Looking for C++ include png.h
Looking for C++ include png.h - not found
Looking for C++ include process.h
Looking for C++ include process.h - not found
Looking for C++ include pthread.h
Looking for C++ include pthread.h - found
Looking for C++ include pwd.h
Looking for C++ include pwd.h - found
Looking for C++ include semaphore.h
Looking for C++ include semaphore.h - found
Looking for C++ include strings.h
Looking for C++ include strings.h - found
Looking for C++ include synch.h
Looking for C++ include synch.h - not found
Looking for C++ include sys/dir.h
Looking for C++ include sys/dir.h - not found
Looking for C++ include sys/errno.h
Looking for C++ include sys/errno.h - found
Looking for C++ include sys/file.h
Looking for C++ include sys/file.h - found
Looking for C++ include sys/mman.h
Looking for C++ include sys/mman.h - found
Looking for C++ include sys/msg.h
Looking for C++ include sys/msg.h - found
Looking for C++ include sys/param.h
Looking for C++ include sys/param.h - found
Looking for C++ include sys/queue.h
Looking for C++ include sys/queue.h - found
Looking for C++ include sys/resource.h
Looking for C++ include sys/resource.h - found
Looking for C++ include sys/select.h
Looking for C++ include sys/select.h - found
Looking for C++ include sys/socket.h
Looking for C++ include sys/socket.h - found
Looking for C++ include sys/stat.h
Looking for C++ include sys/stat.h - found
Looking for C++ include sys/syscall.h
Looking for C++ include sys/syscall.h - found
Looking for C++ include sys/systeminfo.h
Looking for C++ include sys/systeminfo.h - not found
Looking for C++ include sys/time.h
Looking for C++ include sys/time.h - found
Looking for C++ include sys/timeb.h
Looking for C++ include sys/timeb.h - not found
Looking for C++ include sys/un.h
Looking for C++ include sys/un.h - found
Looking for C++ include sys/utime.h
Looking for C++ include sys/utime.h - not found
Looking for C++ include sys/utsname.h
Looking for C++ include sys/utsname.h - found
Looking for C++ include sys/wait.h
Looking for C++ include sys/wait.h - found
Looking for C++ include syslog.h
Looking for C++ include syslog.h - found
Looking for C++ include thread.h
Looking for C++ include thread.h - not found
Looking for C++ include unistd.h
Looking for C++ include unistd.h - found
Looking for C++ include unix.h
Looking for C++ include unix.h - not found
Looking for C++ include utime.h
Looking for C++ include utime.h - found
Looking for C++ include system_error
Looking for C++ include system_error - found
Looking for C++ include tuple
Looking for C++ include tuple - found
Looking for C++ include type_traits
Looking for C++ include type_traits - found
Looking for C++ include atomic
Looking for C++ include atomic - found
Looking for C++ include poll.h
Looking for C++ include poll.h - found
Looking for include files sys/types.h, netinet/in_systm.h
Looking for include files sys/types.h, netinet/in_systm.h - found
Looking for 3 include files sys/types.h, ..., netinet/in.h
Looking for 3 include files sys/types.h, ..., netinet/in.h - found
Looking for 4 include files sys/types.h, ..., netinet/tcp.h
Looking for 4 include files sys/types.h, ..., netinet/tcp.h - found
Looking for C++ include libpng/png.h
Looking for C++ include libpng/png.h - not found
Looking for _findfirst
Looking for _findfirst - not found
Looking for _set_output_format
Looking for _set_output_format - not found
Looking for access
Looking for access - found
Looking for atoll
Looking for atoll - found
Looking for bcmp
Looking for bcmp - not found
Looking for cuserid
Looking for cuserid - not found
Looking for fgetln
Looking for fgetln - found
Looking for finite
Looking for finite - found
Looking for flock
Looking for flock - found
Looking for fork
Looking for fork - found
Looking for fseeko
Looking for fseeko - found
Looking for ftime
Looking for ftime - not found
Looking for geteuid
Looking for geteuid - found
Looking for getgrnam
Looking for getgrnam - found
Looking for gethostbyaddr_r
Looking for gethostbyaddr_r - not found
Looking for gethostbyname_r
Looking for gethostbyname_r - found
Looking for gethostid
Looking for gethostid - not found
Looking for getlogin
Looking for getlogin - found
Looking for getlogin_r
Looking for getlogin_r - not found
Looking for getpid
Looking for getpid - found
Looking for getpwnam
Looking for getpwnam - found
Looking for getrusage
Looking for getrusage - found
Looking for gettimeofday
Looking for gettimeofday - found
Looking for getuid
Looking for getuid - found
Looking for gmtime_r
Looking for gmtime_r - found
Looking for index
Looking for index - not found
Looking for itoa
Looking for itoa - not found
Looking for listen
Looking for listen - found
Looking for localtime_r
Looking for localtime_r - found
Looking for lockf
Looking for lockf - not found
Looking for lstat
Looking for lstat - found
Looking for malloc_debug
Looking for malloc_debug - not found
Looking for mkstemp
Looking for mkstemp - found
Looking for mktemp
Looking for mktemp - found
Looking for nanosleep
Looking for nanosleep - found
Looking for rindex
Looking for rindex - not found
Looking for setuid
Looking for setuid - found
Looking for sleep
Looking for sleep - found
Looking for stat
Looking for stat - found
Looking for strdup
Looking for strdup - found
Looking for strlcat
Looking for strlcat - found
Looking for strlcpy
Looking for strlcpy - found
Looking for sysinfo
Looking for sysinfo - found
Looking for uname
Looking for uname - found
Looking for usleep
Looking for usleep - found
Looking for waitpid
Looking for waitpid - found
Looking for strcasestr
Looking for strcasestr - found
Looking for prototype of feenableexcept
Looking for prototype of feenableexcept - not found.
Looking for prototype of finite
Looking for prototype of finite - found
Looking for prototype of std::isinf(0.)
Looking for prototype of std::isinf(0.) - found
Looking for prototype of std::isnan(0.)
Looking for prototype of std::isnan(0.) - found
Looking for prototype of flock
Looking for prototype of flock - found
Looking for prototype of gethostbyname_r
Looking for prototype of gethostbyname_r - found
Looking for prototype of gethostbyaddr_r
Looking for prototype of gethostbyaddr_r - not found.
Looking for prototype of gethostid
Looking for prototype of gethostid - not found.
Looking for prototype of waitpid
Looking for prototype of waitpid - found
Looking for prototype of usleep
Looking for prototype of usleep - found
Looking for prototype of _vsnprintf_s
Looking for prototype of _vsnprintf_s - not found.
Looking for prototype of vfprintf_s
Looking for prototype of vfprintf_s - not found.
Looking for prototype of vsnprintf
Looking for prototype of vsnprintf - found
Looking for prototype of vsprintf_s
Looking for prototype of vsprintf_s - not found.
Looking for prototype of std::vfprintf
Looking for prototype of std::vfprintf - found
Looking for prototype of std::vsnprintf
Looking for prototype of std::vsnprintf - found
Looking for prototype of _stricmp
Looking for prototype of _stricmp - not found.
Looking for prototype of gettimeofday
Looking for prototype of gettimeofday - found
Looking for prototype of mkstemp
Looking for prototype of mkstemp - found
Looking for prototype of mktemp
Looking for prototype of mktemp - found
Looking for prototype of strcasecmp
Looking for prototype of strcasecmp - found
Looking for prototype of strncasecmp
Looking for prototype of strncasecmp - found
Looking for prototype of strerror_r
Looking for prototype of strerror_r - found
Looking for prototype of SYS_gettid
Looking for prototype of SYS_gettid - found
Looking for prototype of pthread_rwlock_init
Looking for prototype of pthread_rwlock_init - found
Looking for prototype of __sync_add_and_fetch((int*)0,0)
Looking for prototype of __sync_add_and_fetch((int*)0,0) - found
Looking for prototype of __sync_sub_and_fetch((int*)0,0)
Looking for prototype of __sync_sub_and_fetch((int*)0,0) - found
Looking for prototype of InterlockedIncrement((long*)0)
Looking for prototype of InterlockedIncrement((long*)0) - not found.
Looking for prototype of InterlockedDecrement((long*)0)
Looking for prototype of InterlockedDecrement((long*)0) - not found.
Looking for prototype of _fpclassf(0.0f)
Looking for prototype of _fpclassf(0.0f) - not found.
Looking for prototype of getgrnam_r((char*)0,(group*)0,(char*)0,0,(group**)0)
Looking for prototype of getgrnam_r((char*)0,(group*)0,(char*)0,0,(group**)0) - not found.
Looking for prototype of getpwnam_r((char*)0,(passwd*)0,(char*)0,0,(passwd**)0)
Looking for prototype of getpwnam_r((char*)0,(passwd*)0,(char*)0,0,(passwd**)0) - found
Looking for prototype of readdir_r((DIR*)0,(dirent*)0,(dirent**)0)
Looking for prototype of readdir_r((DIR*)0,(dirent*)0,(dirent**)0) - found
Looking for prototype of readdir_r((DIR*)0,(dirent*)0)
Looking for prototype of readdir_r((DIR*)0,(dirent*)0) - not found.
Looking for prototype of nanosleep
Looking for prototype of nanosleep - found
Looking for prototype of &passwd::pw_gecos
Looking for prototype of &passwd::pw_gecos - found
Looking for prototype of TryAcquireSRWLockShared((PSRWLOCK)0)
Looking for prototype of TryAcquireSRWLockShared((PSRWLOCK)0) - not found.
Looking for prototype of fp_except_t definition
Looking for prototype of fp_except_t definition - not found.
Looking for prototype of uchar definition
Looking for prototype of uchar definition - not found.
Looking for prototype of ushort definition
Looking for prototype of ushort definition - not found.
Looking for prototype of uint definition
Looking for prototype of uint definition - found
Looking for prototype of ulong definition
Looking for prototype of ulong definition - not found.
Looking for prototype of long long definition
Looking for prototype of long long definition - found
Looking for prototype of unsigned long long definition
Looking for prototype of unsigned long long definition - found
Looking for prototype of int64_t definition
Looking for prototype of int64_t definition - found
Looking for prototype of uint64_t definition
Looking for prototype of uint64_t definition - found
Looking for prototype of char16_t definition
Looking for prototype of char16_t definition - found
Looking for prototype of fpos64_t definition
Looking for prototype of fpos64_t definition - found
Looking for prototype of off64_t definition
Looking for prototype of off64_t definition - found
Looking for prototype of popen
Looking for prototype of popen - found
Looking for prototype of pclose
Looking for prototype of pclose - found
Looking for prototype of sigjmp_buf definition
Looking for prototype of sigjmp_buf definition - found
Checking signedness of char
Checking whether char is signed
Checking whether char is signed -- no
Checking signedness of char -- unsigned
Checking whether pthread_t is an integer type
Checking whether pthread_t is an integer type -- yes
Checking whether ENAMETOOLONG is defined
Checking whether ENAMETOOLONG is defined -- yes
Checking whether strerror_r returns an int
Checking whether strerror_r returns an int -- yes
Checking whether variable length arrays are supported
Checking whether variable length arrays are supported -- yes
Checking whether explicit large file support (LFS64) is available
Checking whether explicit large file support (LFS64) is available -- no
Checking whether large file support (LFS) is available
Check size of fpos_t
Check size of fpos_t - done
Checking whether large file support (LFS) is available -- no
Info: Building DCMTK without large file support, files >4GB may be inaccessible!
Checking whether socket functions accept an int* argument
Checking whether socket functions accept an int* argument -- yes
Checking whether __alignof__ is supported
Checking whether __alignof__ is supported -- yes
Checking whether __alignof is supported
Checking whether __alignof is supported -- yes
Checking whether __attribute__((aligned)) is supported
Checking whether __attribute__((aligned)) is supported -- yes
Checking whether __attribute__((aligned)) supports templates
Checking whether __attribute__((aligned)) supports templates -- yes
Checking whether __declspec(align) is supported
Checking whether __declspec(align) is supported -- no
Checking whether the compiler supports default constructor detection via SFINAE
Checking whether the compiler supports default constructor detection via SFINAE -- yes
Checking whether ANSI standard C++ includes use std namespace
Checking whether ANSI standard C++ includes use std namespace -- yes
Checking whether the compiler supports std::nothrow
Checking whether the compiler supports std::nothrow -- yes
Checking whether the compiler supports operator delete (std::nothrow)
Checking whether the compiler supports operator delete (std::nothrow) -- yes
Checking whether the compiler supports static_assert
Checking whether the compiler supports static_assert -- yes
Checking whether the compiler supports [[deprecated]]
Checking whether the compiler supports [[deprecated]] -- yes
Checking whether the compiler supports [[deprecated("message")]]
Checking whether the compiler supports [[deprecated("message")]] -- yes
Checking whether the compiler supports __attribute__((deprecated))
Checking whether the compiler supports __attribute__((deprecated)) -- yes
Checking whether the compiler supports __attribute__((deprecated("message")))
Checking whether the compiler supports __attribute__((deprecated("message"))) -- yes
Checking whether the compiler supports __declspec(deprecated)
Checking whether the compiler supports __declspec(deprecated) -- no
Checking whether the compiler supports __declspec(deprecated("message"))
Checking whether the compiler supports __declspec(deprecated("message")) -- no
Checking whether pw_gecos is #defined to pw_passwd
Checking whether pw_gecos is #defined to pw_passwd -- yes
Checking whether the compiler supports C++11
Checking whether the compiler supports C++11 -- yes
Info: C++11 features enabled
Info: C++14 features disabled
Info: C++17 features disabled
Info: C++20 features disabled
Info: STL algorithm support disabled
Info: STL list support disabled
Info: STL map support disabled
Info: STL memory support disabled
Info: STL stack support disabled
Info: STL string support disabled
Info: STL vector support disabled
Info: STL type_traits support disabled
Info: STL tuple support disabled
Info: STL system_error support disabled
Info: STL atomic support disabled
Looking for pthread_key_create in pthread
Looking for pthread_key_create in pthread - not found
Looking for mq_open in rt
Looking for mq_open in rt - not found
Looking for main in nsl
Looking for main in nsl - not found
Looking for gethostbyname in nsl
Looking for gethostbyname in nsl - not found
Looking for main in socket
Looking for main in socket - not found
Looking for socket in socket
Looking for socket in socket - not found
Found BISON: /usr/bin/bison (found version "2.3")
Found FLEX: /usr/bin/flex (found version "2.6.4")
Waiting until the Android device emulator is ready to receive instructions...
Wish you and your team happy holidays.
Thank you.
I did try both options, but the result is the same. Using Cmake GUI stops at the same flow step with a message "Waiting until the Android device emulator is ready to receive instructions..."
At this point(clicking on configure) I do see generated files, 31 of them. Is there any particular file/folder that needs to be generated to execute generation after configuration setup, in order to use in android project?
I am thinking on trying to execute it on win OS and see what happens.
I tried older version of Cmake (3.19.1), running on three different API emulators, different version of NDK.
I removed OUTPUT_QUIET and ERROR_QUIET in execute_process, if it helps here is the output:
ANDROID_PLATFORM not set. Defaulting to minimum supported version
21.
Starting the Android device emulator...
Warning: TIFF support will be disabled because libtiff was not found.
Warning: PNG support will be disabled because libpng was not found.
Warning: OPENSSL support will be disabled because openssl was not found.
Warning: XML support will be disabled because libxml2 was not found.
Info: DCMTK ZLIB support will be enabled
Warning: SNDFILE support will be disabled because libsndfile was not found.
Performing Test Iconv_IS_BUILT_IN
Performing Test Iconv_IS_BUILT_IN - Failed
Warning: ICONV support will be disabled because libiconv was not found. Correct LIBICONV_LIBDIR and LIBICONV_INCLUDE_DIR and re-enable DCMTK_WITH_ICONV.
Warning: WRAP support will be disabled because libwrap was not found.
Warning: OpenJPEG support will be disabled because the OpenJPEG library was not found.
Performing Test WITH_STDLIBC_ICONV
Performing Test WITH_STDLIBC_ICONV - Failed
Warning: DOXYGEN support will be disabled because doxygen was not found.
Info: DCMTK will compile with external default dictionary
Info: DCMTK will load dictionaries defined by DCMDICTPATH environment variable
Info: DCMTK's builtin private dictionary support will be disabled
Info: Thread support will be enabled
Info: Wide char file I/O functions will be disabled
Info: Wide char main function for command line tools will be disabled
Info: Building DCMTK with character set conversion support using built-in oficonv module
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of double
Check size of double - done
Check size of float
Check size of float - done
Check size of int
Check size of int - done
Check size of long
Check size of long - done
Check size of short
Check size of short - done
Check size of void*
Check size of void* - done
Looking for __FUNCTION__
Looking for __FUNCTION__ - found
Looking for __FUNCTION__
Looking for __FUNCTION__ - found
Looking for __PRETTY_FUNCTION__
Looking for __PRETTY_FUNCTION__ - found
Looking for __PRETTY_FUNCTION__
Looking for __PRETTY_FUNCTION__ - found
Looking for __func__
Looking for __func__ - found
Looking for __func__
Looking for __func__ - found
Looking for C++ include alloca.h
Looking for C++ include alloca.h - found
Looking for C++ include arpa/inet.h
Looking for C++ include arpa/inet.h - found
Looking for C++ include cstdint
Looking for C++ include cstdint - found
Looking for C++ include dirent.h
Looking for C++ include dirent.h - found
Looking for C++ include err.h
Looking for C++ include err.h - found
Looking for C++ include fcntl.h
Looking for C++ include fcntl.h - found
Looking for C++ include fnmatch.h
Looking for C++ include fnmatch.h - found
Looking for C++ include grp.h
Looking for C++ include grp.h - found
Looking for C++ include ieeefp.h
Looking for C++ include ieeefp.h - not found
Looking for C++ include io.h
Looking for C++ include io.h - not found
Looking for C++ include langinfo.h
Looking for C++ include langinfo.h - found
Looking for C++ include libc.h
Looking for C++ include libc.h - not found
Looking for C++ include malloc.h
Looking for C++ include malloc.h - found
Looking for C++ include mqueue.h
Looking for C++ include mqueue.h - not found
Looking for C++ include netdb.h
Looking for C++ include netdb.h - found
Looking for C++ include png.h
Looking for C++ include png.h - not found
Looking for C++ include process.h
Looking for C++ include process.h - not found
Looking for C++ include pthread.h
Looking for C++ include pthread.h - found
Looking for C++ include pwd.h
Looking for C++ include pwd.h - found
Looking for C++ include semaphore.h
Looking for C++ include semaphore.h - found
Looking for C++ include strings.h
Looking for C++ include strings.h - found
Looking for C++ include synch.h
Looking for C++ include synch.h - not found
Looking for C++ include sys/dir.h
Looking for C++ include sys/dir.h - not found
Looking for C++ include sys/errno.h
Looking for C++ include sys/errno.h - found
Looking for C++ include sys/file.h
Looking for C++ include sys/file.h - found
Looking for C++ include sys/mman.h
Looking for C++ include sys/mman.h - found
Looking for C++ include sys/msg.h
Looking for C++ include sys/msg.h - found
Looking for C++ include sys/param.h
Looking for C++ include sys/param.h - found
Looking for C++ include sys/queue.h
Looking for C++ include sys/queue.h - found
Looking for C++ include sys/resource.h
Looking for C++ include sys/resource.h - found
Looking for C++ include sys/select.h
Looking for C++ include sys/select.h - found
Looking for C++ include sys/socket.h
Looking for C++ include sys/socket.h - found
Looking for C++ include sys/stat.h
Looking for C++ include sys/stat.h - found
Looking for C++ include sys/syscall.h
Looking for C++ include sys/syscall.h - found
Looking for C++ include sys/systeminfo.h
Looking for C++ include sys/systeminfo.h - not found
Looking for C++ include sys/time.h
Looking for C++ include sys/time.h - found
Looking for C++ include sys/timeb.h
Looking for C++ include sys/timeb.h - not found
Looking for C++ include sys/un.h
Looking for C++ include sys/un.h - found
Looking for C++ include sys/utime.h
Looking for C++ include sys/utime.h - not found
Looking for C++ include sys/utsname.h
Looking for C++ include sys/utsname.h - found
Looking for C++ include sys/wait.h
Looking for C++ include sys/wait.h - found
Looking for C++ include syslog.h
Looking for C++ include syslog.h - found
Looking for C++ include thread.h
Looking for C++ include thread.h - not found
Looking for C++ include unistd.h
Looking for C++ include unistd.h - found
Looking for C++ include unix.h
Looking for C++ include unix.h - not found
Looking for C++ include utime.h
Looking for C++ include utime.h - found
Looking for C++ include system_error
Looking for C++ include system_error - found
Looking for C++ include tuple
Looking for C++ include tuple - found
Looking for C++ include type_traits
Looking for C++ include type_traits - found
Looking for C++ include atomic
Looking for C++ include atomic - found
Looking for C++ include poll.h
Looking for C++ include poll.h - found
Looking for include files sys/types.h, netinet/in_systm.h
Looking for include files sys/types.h, netinet/in_systm.h - found
Looking for 3 include files sys/types.h, ..., netinet/in.h
Looking for 3 include files sys/types.h, ..., netinet/in.h - found
Looking for 4 include files sys/types.h, ..., netinet/tcp.h
Looking for 4 include files sys/types.h, ..., netinet/tcp.h - found
Looking for C++ include libpng/png.h
Looking for C++ include libpng/png.h - not found
Looking for _findfirst
Looking for _findfirst - not found
Looking for _set_output_format
Looking for _set_output_format - not found
Looking for access
Looking for access - found
Looking for atoll
Looking for atoll - found
Looking for bcmp
Looking for bcmp - not found
Looking for cuserid
Looking for cuserid - not found
Looking for fgetln
Looking for fgetln - found
Looking for finite
Looking for finite - found
Looking for flock
Looking for flock - found
Looking for fork
Looking for fork - found
Looking for fseeko
Looking for fseeko - found
Looking for ftime
Looking for ftime - not found
Looking for geteuid
Looking for geteuid - found
Looking for getgrnam
Looking for getgrnam - found
Looking for gethostbyaddr_r
Looking for gethostbyaddr_r - not found
Looking for gethostbyname_r
Looking for gethostbyname_r - found
Looking for gethostid
Looking for gethostid - not found
Looking for getlogin
Looking for getlogin - found
Looking for getlogin_r
Looking for getlogin_r - not found
Looking for getpid
Looking for getpid - found
Looking for getpwnam
Looking for getpwnam - found
Looking for getrusage
Looking for getrusage - found
Looking for gettimeofday
Looking for gettimeofday - found
Looking for getuid
Looking for getuid - found
Looking for gmtime_r
Looking for gmtime_r - found
Looking for index
Looking for index - not found
Looking for itoa
Looking for itoa - not found
Looking for listen
Looking for listen - found
Looking for localtime_r
Looking for localtime_r - found
Looking for lockf
Looking for lockf - not found
Looking for lstat
Looking for lstat - found
Looking for malloc_debug
Looking for malloc_debug - not found
Looking for mkstemp
Looking for mkstemp - found
Looking for mktemp
Looking for mktemp - found
Looking for nanosleep
Looking for nanosleep - found
Looking for rindex
Looking for rindex - not found
Looking for setuid
Looking for setuid - found
Looking for sleep
Looking for sleep - found
Looking for stat
Looking for stat - found
Looking for strdup
Looking for strdup - found
Looking for strlcat
Looking for strlcat - found
Looking for strlcpy
Looking for strlcpy - found
Looking for sysinfo
Looking for sysinfo - found
Looking for uname
Looking for uname - found
Looking for usleep
Looking for usleep - found
Looking for waitpid
Looking for waitpid - found
Looking for strcasestr
Looking for strcasestr - found
Looking for prototype of feenableexcept
Looking for prototype of feenableexcept - not found.
Looking for prototype of finite
Looking for prototype of finite - found
Looking for prototype of std::isinf(0.)
Looking for prototype of std::isinf(0.) - found
Looking for prototype of std::isnan(0.)
Looking for prototype of std::isnan(0.) - found
Looking for prototype of flock
Looking for prototype of flock - found
Looking for prototype of gethostbyname_r
Looking for prototype of gethostbyname_r - found
Looking for prototype of gethostbyaddr_r
Looking for prototype of gethostbyaddr_r - not found.
Looking for prototype of gethostid
Looking for prototype of gethostid - not found.
Looking for prototype of waitpid
Looking for prototype of waitpid - found
Looking for prototype of usleep
Looking for prototype of usleep - found
Looking for prototype of _vsnprintf_s
Looking for prototype of _vsnprintf_s - not found.
Looking for prototype of vfprintf_s
Looking for prototype of vfprintf_s - not found.
Looking for prototype of vsnprintf
Looking for prototype of vsnprintf - found
Looking for prototype of vsprintf_s
Looking for prototype of vsprintf_s - not found.
Looking for prototype of std::vfprintf
Looking for prototype of std::vfprintf - found
Looking for prototype of std::vsnprintf
Looking for prototype of std::vsnprintf - found
Looking for prototype of _stricmp
Looking for prototype of _stricmp - not found.
Looking for prototype of gettimeofday
Looking for prototype of gettimeofday - found
Looking for prototype of mkstemp
Looking for prototype of mkstemp - found
Looking for prototype of mktemp
Looking for prototype of mktemp - found
Looking for prototype of strcasecmp
Looking for prototype of strcasecmp - found
Looking for prototype of strncasecmp
Looking for prototype of strncasecmp - found
Looking for prototype of strerror_r
Looking for prototype of strerror_r - found
Looking for prototype of SYS_gettid
Looking for prototype of SYS_gettid - found
Looking for prototype of pthread_rwlock_init
Looking for prototype of pthread_rwlock_init - found
Looking for prototype of __sync_add_and_fetch((int*)0,0)
Looking for prototype of __sync_add_and_fetch((int*)0,0) - found
Looking for prototype of __sync_sub_and_fetch((int*)0,0)
Looking for prototype of __sync_sub_and_fetch((int*)0,0) - found
Looking for prototype of InterlockedIncrement((long*)0)
Looking for prototype of InterlockedIncrement((long*)0) - not found.
Looking for prototype of InterlockedDecrement((long*)0)
Looking for prototype of InterlockedDecrement((long*)0) - not found.
Looking for prototype of _fpclassf(0.0f)
Looking for prototype of _fpclassf(0.0f) - not found.
Looking for prototype of getgrnam_r((char*)0,(group*)0,(char*)0,0,(group**)0)
Looking for prototype of getgrnam_r((char*)0,(group*)0,(char*)0,0,(group**)0) - not found.
Looking for prototype of getpwnam_r((char*)0,(passwd*)0,(char*)0,0,(passwd**)0)
Looking for prototype of getpwnam_r((char*)0,(passwd*)0,(char*)0,0,(passwd**)0) - found
Looking for prototype of readdir_r((DIR*)0,(dirent*)0,(dirent**)0)
Looking for prototype of readdir_r((DIR*)0,(dirent*)0,(dirent**)0) - found
Looking for prototype of readdir_r((DIR*)0,(dirent*)0)
Looking for prototype of readdir_r((DIR*)0,(dirent*)0) - not found.
Looking for prototype of nanosleep
Looking for prototype of nanosleep - found
Looking for prototype of &passwd::pw_gecos
Looking for prototype of &passwd::pw_gecos - found
Looking for prototype of TryAcquireSRWLockShared((PSRWLOCK)0)
Looking for prototype of TryAcquireSRWLockShared((PSRWLOCK)0) - not found.
Looking for prototype of fp_except_t definition
Looking for prototype of fp_except_t definition - not found.
Looking for prototype of uchar definition
Looking for prototype of uchar definition - not found.
Looking for prototype of ushort definition
Looking for prototype of ushort definition - not found.
Looking for prototype of uint definition
Looking for prototype of uint definition - found
Looking for prototype of ulong definition
Looking for prototype of ulong definition - not found.
Looking for prototype of long long definition
Looking for prototype of long long definition - found
Looking for prototype of unsigned long long definition
Looking for prototype of unsigned long long definition - found
Looking for prototype of int64_t definition
Looking for prototype of int64_t definition - found
Looking for prototype of uint64_t definition
Looking for prototype of uint64_t definition - found
Looking for prototype of char16_t definition
Looking for prototype of char16_t definition - found
Looking for prototype of fpos64_t definition
Looking for prototype of fpos64_t definition - found
Looking for prototype of off64_t definition
Looking for prototype of off64_t definition - found
Looking for prototype of popen
Looking for prototype of popen - found
Looking for prototype of pclose
Looking for prototype of pclose - found
Looking for prototype of sigjmp_buf definition
Looking for prototype of sigjmp_buf definition - found
Checking signedness of char
Checking whether char is signed
Checking whether char is signed -- no
Checking signedness of char -- unsigned
Checking whether pthread_t is an integer type
Checking whether pthread_t is an integer type -- yes
Checking whether ENAMETOOLONG is defined
Checking whether ENAMETOOLONG is defined -- yes
Checking whether strerror_r returns an int
Checking whether strerror_r returns an int -- yes
Checking whether variable length arrays are supported
Checking whether variable length arrays are supported -- yes
Checking whether explicit large file support (LFS64) is available
Checking whether explicit large file support (LFS64) is available -- no
Checking whether large file support (LFS) is available
Check size of fpos_t
Check size of fpos_t - done
Checking whether large file support (LFS) is available -- no
Info: Building DCMTK without large file support, files >4GB may be inaccessible!
Checking whether socket functions accept an int* argument
Checking whether socket functions accept an int* argument -- yes
Checking whether __alignof__ is supported
Checking whether __alignof__ is supported -- yes
Checking whether __alignof is supported
Checking whether __alignof is supported -- yes
Checking whether __attribute__((aligned)) is supported
Checking whether __attribute__((aligned)) is supported -- yes
Checking whether __attribute__((aligned)) supports templates
Checking whether __attribute__((aligned)) supports templates -- yes
Checking whether __declspec(align) is supported
Checking whether __declspec(align) is supported -- no
Checking whether the compiler supports default constructor detection via SFINAE
Checking whether the compiler supports default constructor detection via SFINAE -- yes
Checking whether ANSI standard C++ includes use std namespace
Checking whether ANSI standard C++ includes use std namespace -- yes
Checking whether the compiler supports std::nothrow
Checking whether the compiler supports std::nothrow -- yes
Checking whether the compiler supports operator delete (std::nothrow)
Checking whether the compiler supports operator delete (std::nothrow) -- yes
Checking whether the compiler supports static_assert
Checking whether the compiler supports static_assert -- yes
Checking whether the compiler supports [[deprecated]]
Checking whether the compiler supports [[deprecated]] -- yes
Checking whether the compiler supports [[deprecated("message")]]
Checking whether the compiler supports [[deprecated("message")]] -- yes
Checking whether the compiler supports __attribute__((deprecated))
Checking whether the compiler supports __attribute__((deprecated)) -- yes
Checking whether the compiler supports __attribute__((deprecated("message")))
Checking whether the compiler supports __attribute__((deprecated("message"))) -- yes
Checking whether the compiler supports __declspec(deprecated)
Checking whether the compiler supports __declspec(deprecated) -- no
Checking whether the compiler supports __declspec(deprecated("message"))
Checking whether the compiler supports __declspec(deprecated("message")) -- no
Checking whether pw_gecos is #defined to pw_passwd
Checking whether pw_gecos is #defined to pw_passwd -- yes
Checking whether the compiler supports C++11
Checking whether the compiler supports C++11 -- yes
Info: C++11 features enabled
Info: C++14 features disabled
Info: C++17 features disabled
Info: C++20 features disabled
Info: STL algorithm support disabled
Info: STL list support disabled
Info: STL map support disabled
Info: STL memory support disabled
Info: STL stack support disabled
Info: STL string support disabled
Info: STL vector support disabled
Info: STL type_traits support disabled
Info: STL tuple support disabled
Info: STL system_error support disabled
Info: STL atomic support disabled
Looking for pthread_key_create in pthread
Looking for pthread_key_create in pthread - not found
Looking for mq_open in rt
Looking for mq_open in rt - not found
Looking for main in nsl
Looking for main in nsl - not found
Looking for gethostbyname in nsl
Looking for gethostbyname in nsl - not found
Looking for main in socket
Looking for main in socket - not found
Looking for socket in socket
Looking for socket in socket - not found
Found BISON: /usr/bin/bison (found version "2.3")
Found FLEX: /usr/bin/flex (found version "2.6.4")
Waiting until the Android device emulator is ready to receive instructions...
Wish you and your team happy holidays.
Thank you.
-
- OFFIS DICOM Team
- Posts: 1511
- Joined: Tue, 2004-11-02, 17:22
- Location: Oldenburg, Germany
- Contact:
Re: DCMTK Configuration & Generation on Android
Sorry, at this point I will be unable to help you. The CMake output looks good, and I cannot say why the Android emulator does not become ready. Unfortunately, the developer of the Android port is not active in this project anymore.
Other than this, I can only point you to the following document describing how to cross-compile DCMTK without an emulator: https://support.dcmtk.org/redmine/proje ... _Compiling
Note that this page is a bit outdated. The "arith.h" file mentioned on this page is not required anymore for the current DCMTK 3.6.9. It was needed for older DCMTK versions, though.
Other than this, I can only point you to the following document describing how to cross-compile DCMTK without an emulator: https://support.dcmtk.org/redmine/proje ... _Compiling
Note that this page is a bit outdated. The "arith.h" file mentioned on this page is not required anymore for the current DCMTK 3.6.9. It was needed for older DCMTK versions, though.
Re: DCMTK Configuration & Generation on Android
Thank you for quick reply. Ok, good to know that "arith.h" file is not required anymore for the current DCMTK 3.6.9.
I will try approach to cross-compile DCMTK without an emulator and let you know. Also, will give it a try on win OS. But to understand, do you have any command you can provide, that you are sure it works and is tested on some specific OS?
Best regards.
I will try approach to cross-compile DCMTK without an emulator and let you know. Also, will give it a try on win OS. But to understand, do you have any command you can provide, that you are sure it works and is tested on some specific OS?
Best regards.
Re: DCMTK Configuration & Generation on Android
https://forum.dcmtk.org/viewtopic.php?p=21961#p21961DraganM wrote: ↑Tue, 2024-12-31, 11:31 Thank you for quick reply. Ok, good to know that "arith.h" file is not required anymore for the current DCMTK 3.6.9.
I will try approach to cross-compile DCMTK without an emulator and let you know. Also, will give it a try on win OS. But to understand, do you have any command you can provide, that you are sure it works and is tested on some specific OS?
Best regards.
Who is online
Users browsing this forum: Google [Bot] and 1 guest