DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Fri, 2018-08-17, 20:15

All times are UTC + 1 hour




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Sun, 2015-04-19, 04:11 
Offline

Joined: Tue, 2011-03-22, 10:00
Posts: 6
Hi,

I'm trying to build dcmtk on Android but i'm stuck. I downloaded dcmtk-3.6.1_20150217.tar.gz from snapshots and follow instructions from wiki. I tried on both Windows 8.1 and Ubuntu 14.10 with SDK 19, NDK r10d, Cmake 3.2.2.

First error was "string sub-command REGEX, mode MATCHALL needs at least 5 arguments total to" on android.toolchain.cmake:148, i tried changing this section with;
Code:
        #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(ANDROID_EMULATOR_AVD "DCMTK" CACHE STRING "Android emulator Android Virtual Device (AVD) configuration" FORCE)
        #SET_PROPERTY(CACHE ANDROID_EMULATOR_AVD PROPERTY STRINGS ${ANDROID_AVAILABLE_AVDS})
   SET_PROPERTY(CACHE ANDROID_EMULATOR_AVD PROPERTY STRINGS "DCMTK")


(i'm not familiar with cmake, i thought "ok, my avd name is DCMTK, maybe this is trying to set my avd name", probably stupid change)

After this change, when i click configure and cmake freezed. After couple of changes(to be honest, i don't even remember, i'm trying to build dcmtk almost 2 days) cmake stuck at "Waiting until the Android device emulator is ready to receive instructions" message.

I have builded dcmtk on Windows and Linux withouth any problem but i cannot build it for android. What i'm doing wrong? Is my setup wrong, are dcmtk, sdk, ndk, cmake versions wrong? Is there any prebuilt dcmtk for Android?(I just need binaries like echoscu)

Please advice.

edit: Ok, i find out what the problem was. Wiki says "location of the adb program within your SDK. Called adb.exe under Windows." so i misunderstood that "location" as path but it is executable name with path. After this, cmake generated makefile but i got completion error :( . I guess it's because of ndk versions, i will download and try again with r9d.

edit2: After i installed ndk r9d, it compiled successfully.


Top
 Profile  
 
PostPosted: Mon, 2015-04-20, 10:34 
Offline
OFFIS DICOM Team
OFFIS DICOM Team

Joined: Mon, 2014-03-03, 09:51
Posts: 254
Location: Oldenburg, Germany
bmeric wrote:
edit: Ok, i find out what the problem was. Wiki says "location of the adb program within your SDK. Called adb.exe under Windows." so i misunderstood that "location" as path but it is executable name with path. After this, cmake generated makefile but i got completion error :( . I guess it's because of ndk versions, i will download and try again with r9d.

The CMake scripts were created for NDK r10d, so that seems strage. Did you reset the CMake scripts you modified to the original version? Since I guess the errors were follow ups after adb.exe was not found. Btw. I would recommend setting ANDROID_SDK_ROOT instead of setting the executables manually.


Top
 Profile  
 
PostPosted: Mon, 2015-04-20, 11:52 
Offline

Joined: Tue, 2011-03-22, 10:00
Posts: 6
Jan Schlamelcher wrote:
bmeric wrote:
edit: Ok, i find out what the problem was. Wiki says "location of the adb program within your SDK. Called adb.exe under Windows." so i misunderstood that "location" as path but it is executable name with path. After this, cmake generated makefile but i got completion error :( . I guess it's because of ndk versions, i will download and try again with r9d.

The CMake scripts were created for NDK r10d, so that seems strage. Did you reset the CMake scripts you modified to the original version? Since I guess the errors were follow ups after adb.exe was not found. Btw. I would recommend setting ANDROID_SDK_ROOT instead of setting the executables manually.


After i find out about path/filepath mistake, i removed everything about dcmtk and copy from dcmtk-3.6.1_20150217, but it failed again.

Probably i had the older version of android.toolchain.cmake, latest changelog in that file is;
Code:
#   - December 2013
#     [+] updated for NDK r9c
#   - January 2014
#     [~] fix copying of shared STL
#   - April 2014
#     [+] updated for NDK r9d
# ------------------------------------------------------------------------------


Top
 Profile  
 
PostPosted: Mon, 2015-04-20, 14:04 
Offline
OFFIS DICOM Team
OFFIS DICOM Team

Joined: Mon, 2014-03-03, 09:51
Posts: 254
Location: Oldenburg, Germany
What is the actual error? The changelog in the android.toolchain.cmake is from the original authors. We modified it afterwards, but did not update the changelog, because we use git commit messages instead.


Top
 Profile  
 
PostPosted: Mon, 2015-04-20, 18:39 
Offline

Joined: Tue, 2011-03-22, 10:00
Posts: 6
I don't remember but i can install r10d and test it again. If i recall correctly, it was pointer class in oflog.


Top
 Profile  
 
PostPosted: Mon, 2015-04-20, 19:29 
Offline

Joined: Tue, 2011-03-22, 10:00
Posts: 6
Well, this is strange. I removed n9d, install r10d/set paths and reinstall dcmtk snapshot and everything works as expected :/ I have no idea what went wrong last time.


Top
 Profile  
 
PostPosted: Mon, 2017-08-21, 10:22 
Offline

Joined: Mon, 2017-08-21, 08:24
Posts: 3
I want to ask, compile DCMTK in the ubuntu or window ?


Top
 Profile  
 
PostPosted: Mon, 2017-09-04, 16:33 
Offline
OFFIS DICOM Team
OFFIS DICOM Team

Joined: Mon, 2014-03-03, 09:51
Posts: 254
Location: Oldenburg, Germany
I plan on writing a tutorial for that, but I have currently no idea when I'll find the time for it. The existing tutorial in our wiki is now completely outdated since we modified the way DCMTK is build for Android in DCMTK 3.6.2. I'll point you to this for starters: https://cmake.org/cmake/help/v3.7/manua ... or-android . Maybe you can figure the rest out yourself before I finish the tutorial, otherwise please be patient.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group