[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Issues bulding a debian package for dcm4che



Hi Paul,

after parsing your mail carefully and because I did not found any
private content I decided to answer in public to the Debian Med mailing
list.  I'm pretty sure some of oyur questions can be answered better by
some more Java-knowledged people than me.  Please note that I Bcc-ed you
because I don't know whether you are subscribed to the mailing list
(which you definitely should if you are honest about those issues) but I
did not want to uncover your address to spammers in case you are using
different e-mail addresses for mailing list.  Please also follow the
habit to always discuss in public for two reasons:

  - It is not only me who runs Debian Med so you are wasting chances
    for better responses than only mine
  - Other people might have similar questions like you

So far for the introduction.


On Wed, Mar 28, 2012 at 12:37:33PM +0200, Paul Stiedl wrote:
> Dear Andreas
> 
> I am working on a project to build a debian package for dcm4che on
> debian squeeze 6.0.4 system.

Great.  This package is definitely in our focus which you can verify
here on the imaging task page[1] of the Debian Med web sentinel - which
should be always your friend if you are interested in medical software
in Debian.  As you can see there we even started working on this a bit
in SVN[2] (which you have found yourself as you are refering to below).
   
> Sourcecode  is http://sourceforge.net/projects/dcm4che/files/dcm4che2/2.0.26/dcm4che-2.0.26-src.zip/download.
> 
> Building the project with Maven works fine. (mvn clean install)
> 
> [SNIP]
> [INFO] dcm4che-tool-chess3d ..................................
> SUCCESS [2.000s]
> [INFO] dcm4che-tool-fixjpegls ................................
> SUCCESS [2.013s]
> [INFO] ------------------------------------------------------------------------
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2 minutes 58 seconds
> [INFO] Finished at: Tue Mar 27 17:25:01 CEST 2012
> [INFO] Final Memory: 221M/841M
> [INFO] ------------------------------------------------------------------------
> 
> executing command "mvn clean install" a second time don't know why I
> tried this out results in
> 
> 
> [INFO] Unable to find resource 'log4j:log4j:pom:1.2.x' in repository
> central (http://repo1.maven.org/maven2)
> Downloading: http://repo1.maven.org/maven2/junit/junit/3.x/junit-3.x.pom
> [INFO] Unable to find resource 'junit:junit:pom:3.x' in repository
> central (http://repo1.maven.org/maven2)
> Downloading: http://repo1.maven.org/maven2/log4j/log4j/1.2.x/log4j-1.2.x.jar
> [INFO] Unable to find resource 'log4j:log4j:jar:1.2.x' in repository
> central (http://repo1.maven.org/maven2)
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.

Unfortunately I can not answer this bit of Maven magic.  Please consider
myself as somebody who urgently needs to gather some Java knowledge
because it is definitiely needed for several interesting projects and
who tries really hard to understand its different build mechanisms, but
I frequently need to fall back to the help of others here.  Olivier
helped me a lot and if all else fails asking on
debian-jave@lists.debian.org is another chance to ask.
 
> Missing:
> ----------
> 1) log4j:log4j:jar:1.2.x
> 
>   Try downloading the file manually from the project website.
> 
>   Then, install it using the command:
>       mvn install:install-file -DgroupId=log4j -DartifactId=log4j
> -Dversion=1.2.x -Dpackaging=jar -Dfile=/path/to/file
> 
>   Alternatively, if you host your own repository you can deploy the
> file there:
>       mvn deploy:deploy-file -DgroupId=log4j -DartifactId=log4j
> -Dversion=1.2.x -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
> -DrepositoryId=[id]

Hmmm, this is not a good workaround because when building Debian
packages you should be able to do this offline - so manual download is
some no go - and I'm pretty sure there is a workaround because log4j
should really not cause any trouble if the build system is properly set
up.
 
>   Path to dependency:
>         1) dcm4che:dcm4che-audit:jar:2.0.26
>         2) log4j:log4j:jar:1.2.x
> 
> ----------
> 1 required artifact is missing.
> 
> for artifact:
>   dcm4che:dcm4che-audit:jar:2.0.26
> 
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2)
> 
> 
> these libraries are already installed
> 
> ii  libjai-core-java                        1.1.4-2~bpo60+1
> Java Advanced Imaging API reference implementation
> ii  libjai-imageio-core-java                1.2-2~bpo60+1
> Java Advanced Imaging Image I/O Tools API core

Thanks to Mathieu Malaterre we just have these preconditions, yes.
 
> Nevertheless trying to build the package by doing "dpkg-buildpackage
> -b"  in my source directory dcm4che/dcm4che-2.0.26 after copying
> trunk/debian from "svn co
> svn://svn.debian.org/svn/debian-med/trunk/packages/dcm4che/trunk"
> leads to

Well, this work is in some kind of undefined state.  It never completely
builded.  As you can see it was even targeting at a previous version and
work on this was (unfortunately!!) stalled.
 
> [INFO] Compiling 10 source files to /home/services/pkgbuilder/java/dcm4che/dcm4che-2.0.26/dcm4che-imageio/target/classes
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Compilation failure
> 
> /home/services/pkgbuilder/java/dcm4che/dcm4che-2.0.26/dcm4che-imageio/src/main/java/org/dcm4che2/imageio/ItemParser.java:[56,35]
> package com.sun.media.imageio.stream does not exist
> 
> /home/services/pkgbuilder/java/dcm4che/dcm4che-2.0.26/dcm4che-imageio/src/main/java/org/dcm4che2/imageio/ItemParser.java:[57,35]
> package com.sun.media.imageio.stream does not exist
> 
> /home/services/pkgbuilder/java/dcm4che/dcm4che-2.0.26/dcm4che-imageio/src/main/java/org/dcm4che2/imageio/ItemParser.java:[58,35]
> package com.sun.media.imageio.stream does not exist
> 
> /home/services/pkgbuilder/java/dcm4che/dcm4che-2.0.26/dcm4che-imageio/src/main/java/org/dcm4che2/imageio/ItemParser.java:[65,35]
> cannot find symbol
> symbol: class StreamSegmentMapper
> public class ItemParser implements StreamSegmentMapper {
> 
> /home/services/pkgbuilder/java/dcm4che/dcm4che-2.0.26/dcm4che-imageio/src/main/java/org/dcm4che2/imageio/ItemParser.java:[256,11]
> cannot find symbol
> symbol  : class StreamSegment
> location: class org.dcm4che2.imageio.ItemParser
> 
> [SNIP]
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 35 seconds
> [INFO] Finished at: Wed Mar 28 12:04:35 CEST 2012
> [INFO] Final Memory: 64M/153M
> [INFO] ------------------------------------------------------------------------
> make: *** [mvn-build] Error 1
> dpkg-buildpackage: error: debian/rules build gave error exit status 2
> 
> I believe its an issue concerning path although we supplied
> CLASSPATH in debian/rules
> 
> 
> #!/usr/bin/make -f
> 
> export CLASSPATH=/usr/share/java/jai_imageio.jar
> 
> include /usr/share/cdbs/1/rules/debhelper.mk
> include /usr/share/cdbs/1/class/maven.mk
> 
> JAVA_HOME := /usr/lib/jvm/default-java
> DEB_MAVEN_DOC_TARGET := javadoc:jar javadoc:aggregate
> 
> get-orig-source:
>         # uscan --download-version $(DEB_UPSTREAM_VERSION)
> --force-download --rename
>         uscan --verbose --force-download --rename --repack

I admit I had varying success when explicitely specifying CLASSPATH
inside debian/rules - in most cases it did not worked (matches your
observation) and I terribly failed to find any reason for this.
 
> I read the
> 
> "Revision *8402* <http://anonscm.debian.org/viewvc/debian-med?view=revision&revision=8402>
> - Directory Listing <http://anonscm.debian.org/viewvc/debian-med/trunk/packages/dcm4che/trunk/?pathrev=8402>
> 
> Modified /Thu Nov 3 13:48:47 2011 UTC/ (4 months, 3 weeks ago) by /tille/
> 
> Project medical was renamed to GNU Health.  Just rename the directory to make sure the project is addressed properly.  The packaging itself is not finished yet anyway;
> (some more changes which are obviosely hanging around uncommited in my repository)"

Well, the log entry is not really about dcm4che ... :-)
 
> as well and liked to ask you if you can assist me in building the
> debian package

As I said we really would like to get the package into official Debian
(not only for your debian squeeze 6.0.4 system as you mentioned above).
You question is a good sign that there is obviosely somebody interested
enough to work on this.  I would suggest you try to follow the advises
given in the Debian Med policy document[3] to join the group on Alioth
which will give you commit permissions to SVN.  There you can commit
your changes which makes cooperation way more easy than pasting code
into mails.

You might also like to consider adding your name and package dcm4che to
the Mentoring of Month (MoM) page[4].  The slot for April is just given
to H. Soon Gweon, but this is no reason to not ask here on the list and
just work on this issue.

Thanks for your interest in Debian Med and hope this helps so far

      Andreas.

[1] http://debian-med.alioth.debian.org/tasks/imaging#dcm4che
[2] svn+ssh://svn.debian.org/svn/debian-med/trunk/packages/dcm4che
[3] http://debian-med.alioth.debian.org/docs/policy.html
[4] http://wiki.debian.org/DebianMed/MoM

-- 
http://fam-tille.de


Reply to: