Error while building DCMTK lib for ANDROID
Moderator: Moderator Team
Error while building DCMTK lib for ANDROID
Hi guys
I am trying to generate DCMTK lib for ANDROID platform.
I used CMAKE 3.12.1 to configure DCMTK but getting some issue
ERROR MESSAGE:
CMake Error at CMake/dcmtkUseAndroidSDK.cmake:301 (MESSAGE):
Please select which Android emulator Android Virtual Device (AVD) configuration to use!
Call Stack (most recent call first): CMake/dcmtkPrepare.cmake:179 (DCMTK_ANDROID_START_EMULATOR)
CMakeLists.txt:17 (INCLUDE)
I am not able to see any Android emulator AVD in drop down list.
Please help!
I am trying to generate DCMTK lib for ANDROID platform.
I used CMAKE 3.12.1 to configure DCMTK but getting some issue
ERROR MESSAGE:
CMake Error at CMake/dcmtkUseAndroidSDK.cmake:301 (MESSAGE):
Please select which Android emulator Android Virtual Device (AVD) configuration to use!
Call Stack (most recent call first): CMake/dcmtkPrepare.cmake:179 (DCMTK_ANDROID_START_EMULATOR)
CMakeLists.txt:17 (INCLUDE)
I am not able to see any Android emulator AVD in drop down list.
Please help!
-
- OFFIS DICOM Team
- Posts: 318
- Joined: Mon, 2014-03-03, 09:51
- Location: Oldenburg, Germany
Re: Error while building DCMTK lib for ANDROID
What version of DCMTK are you using?
Did you create an AVD and it is not listed, or did you simply not create one?
Did you create an AVD and it is not listed, or did you simply not create one?
Re: Error while building DCMTK lib for ANDROID
Hi sir
I am using DCMTK 3.6.3 and created AVD in android studio but it is not listed in CMAKE GUI.
I am using DCMTK 3.6.3 and created AVD in android studio but it is not listed in CMAKE GUI.
-
- OFFIS DICOM Team
- Posts: 318
- Joined: Mon, 2014-03-03, 09:51
- Location: Oldenburg, Germany
Re: Error while building DCMTK lib for ANDROID
I see, well, DCMTK uses the following code to create the list for that combobox:
Can you try running
Code: Select all
execute_process(COMMAND "${ANDROID_ANDROID_PROGRAM}" list avd RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_QUIET)
string(REGEX MATCHALL "Name:[ \t]*[^\r\n]*" ANDROID_AVAILABLE_AVDS ${OUTPUT})
string(REGEX REPLACE "Name:[ \t]*([^\r\n;]*)" "\\1" ANDROID_AVAILABLE_AVDS "${ANDROID_AVAILABLE_AVDS}")
set(ANDROID_EMULATOR_AVD "${ANDROID_EMULATOR_AVD}" CACHE STRING "Android emulator Android Virtual Device (AVD) configuration" FORCE)
set_property(CACHE ANDROID_EMULATOR_AVD PROPERTY STRINGS ${ANDROID_AVAILABLE_AVDS})
android list avd
in a terminal to see what happens?Re: Error while building DCMTK lib for ANDROID
Hi sir
I am getting list of AVDs by passing command.
I tried same process on another PC and problem was solved.
Don't know why it is throwing error on my PC only.
I am getting list of AVDs by passing command.
I tried same process on another PC and problem was solved.
Don't know why it is throwing error on my PC only.
-
- OFFIS DICOM Team
- Posts: 318
- Joined: Mon, 2014-03-03, 09:51
- Location: Oldenburg, Germany
Re: Error while building DCMTK lib for ANDROID
Strange, great you found a solution though. My only further Idea would be to look into CMakeError.log in the build directory if you want to try and find out why it fails on your PC.
Re: Error while building DCMTK lib for ANDROID
Hi sir
Some days back I discussed this issue(cannot find avd in dropdown of cmake gui) and while executing same steps on another system it got solved.
I just want to ask if we can solve this problem by setting environment variables??
Thanks and Regards
Ashish
Some days back I discussed this issue(cannot find avd in dropdown of cmake gui) and while executing same steps on another system it got solved.
I just want to ask if we can solve this problem by setting environment variables??
Thanks and Regards
Ashish
-
- OFFIS DICOM Team
- Posts: 318
- Joined: Mon, 2014-03-03, 09:51
- Location: Oldenburg, Germany
Re: Error while building DCMTK lib for ANDROID
That might have an effect, but this would be about the Android toolchain and not DCMTK itself. Google keeps changing how that works from version to version, it's a bit hard to stay up to date.
Re: Error while building DCMTK lib for ANDROID
Ok...
Can you suggest me some way I may try..
Can you suggest me some way I may try..
-
- OFFIS DICOM Team
- Posts: 318
- Joined: Mon, 2014-03-03, 09:51
- Location: Oldenburg, Germany
Re: Error while building DCMTK lib for ANDROID
Another idea: you could post your output of
android list avd
so that I can check whether they changed that enough for our parser to no longer understand it.Re: Error while building DCMTK lib for ANDROID
Hi sir
Sorry for my late response.
After putting android list avd in command prompt i am getting following result:
C:\Users\user>android list avd
**************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools\bin\sdkmanager.bat
and tools\bin\avdmanager.bat
**************************************************************************
Invoking "C:\Users\user\AppData\Local\Android\Sdk\tools\bin\avdmanager" list avd
ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
Thanks and Regards
Ashish
Sorry for my late response.
After putting android list avd in command prompt i am getting following result:
C:\Users\user>android list avd
**************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools\bin\sdkmanager.bat
and tools\bin\avdmanager.bat
**************************************************************************
Invoking "C:\Users\user\AppData\Local\Android\Sdk\tools\bin\avdmanager" list avd
ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
Thanks and Regards
Ashish
Re: Error while building DCMTK lib for ANDROID
after setting JAVA_HOME I got following result:
C:\Users\user>android list avd
**************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools\bin\sdkmanager.bat
and tools\bin\avdmanager.bat
**************************************************************************
Invoking "C:\Users\user\AppData\Local\Android\Sdk\tools\bin\avdmanager" list avd
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annota
tion/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(Sc
hemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHa
ndler.java:81)
at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:213)
at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinCla
ssLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(C
lassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 5 more
C:\Users\user>android list avd
**************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools\bin\sdkmanager.bat
and tools\bin\avdmanager.bat
**************************************************************************
Invoking "C:\Users\user\AppData\Local\Android\Sdk\tools\bin\avdmanager" list avd
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annota
tion/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(Sc
hemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHa
ndler.java:81)
at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:213)
at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinCla
ssLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(C
lassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 5 more
Re: Error while building DCMTK lib for ANDROID
Hi sir
Solved that problem
Just used java 8 and now i am getting avds.
Thank you for the hint.
just want to know
After pressing configure button i got this
Looking for main in socket - not found
Looking for socket in socket
Looking for socket in socket - not found
Info: STL vector support disabled
Info: STL algorithm support disabled
Info: STL limits 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 type_traits support disabled
Info: STL tuple support disabled
Info: STL system_error support disabled
CMake Error at CMake/GenerateDCMTKConfigure.cmake:1269 (message):
/system/bin/sh: /cache/arith.cc: not executable: 32-bit ELF file
Call Stack (most recent call first):
CMakeLists.txt:53 (INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES)
please give me hint how i can proceed further..
Thanks and Regards
Ashish
Solved that problem
Just used java 8 and now i am getting avds.
Thank you for the hint.
just want to know
After pressing configure button i got this
Looking for main in socket - not found
Looking for socket in socket
Looking for socket in socket - not found
Info: STL vector support disabled
Info: STL algorithm support disabled
Info: STL limits 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 type_traits support disabled
Info: STL tuple support disabled
Info: STL system_error support disabled
CMake Error at CMake/GenerateDCMTKConfigure.cmake:1269 (message):
/system/bin/sh: /cache/arith.cc: not executable: 32-bit ELF file
Call Stack (most recent call first):
CMakeLists.txt:53 (INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES)
please give me hint how i can proceed further..
Thanks and Regards
Ashish
-
- OFFIS DICOM Team
- Posts: 318
- Joined: Mon, 2014-03-03, 09:51
- Location: Oldenburg, Germany
Re: Error while building DCMTK lib for ANDROID
Well, it seems to me that CMake tries to execute the code locally whereas it should execute in on the emulator.
EDIT: I also added this to our bugtracker regarding the deprecation warning: https://support.dcmtk.org/redmine/issues/851
EDIT: I also added this to our bugtracker regarding the deprecation warning: https://support.dcmtk.org/redmine/issues/851
Re: Error while building DCMTK lib for ANDROID
Ok.
So for this issue what i can try?
CMake Error at CMake/GenerateDCMTKConfigure.cmake:1269 (message):
/system/bin/sh: /cache/arith.cc: not executable: 32-bit ELF file
Call Stack (most recent call first):
CMakeLists.txt:53 (INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES)
CMAKE is showing that ANDROID_STL_SHARED_OBJECT-NOT FOUND
secondly problem with 32-bit ELF file
So for this issue what i can try?
CMake Error at CMake/GenerateDCMTKConfigure.cmake:1269 (message):
/system/bin/sh: /cache/arith.cc: not executable: 32-bit ELF file
Call Stack (most recent call first):
CMakeLists.txt:53 (INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES)
CMAKE is showing that ANDROID_STL_SHARED_OBJECT-NOT FOUND
secondly problem with 32-bit ELF file
Who is online
Users browsing this forum: No registered users and 1 guest