• build package with source and target = java15

    From Cyril Richard@21:1/5 to All on Wed May 19 11:40:01 2021
    Hello.

    I'm trying to update my java package with pbuilder before updating it on debian. This one now uses java15.
    Then, the control files:

    Build-Depends: debhelper-compat (= 13),
    default-jdk,
    javahelper

    does not work anymore because default-jdk stands for java11 in the SID build environment.

    I tried to replace default-jdk by openjdk-11-jdk, but I have the following error:

    make[1]: Entering directory '/build/spview-2.0.0~rc1'
    jh_build --javacopts="-source 15 -target 15" --no-javadoc spview.jar sources jh_build: error: Cannot find any JAVA_HOME: aborting
    make[1]: *** [debian/rules:8: override_jh_build] Error 25
    make[1]: Leaving directory '/build/spview-2.0.0~rc1'
    make: *** [debian/rules:5: binary] Error 2
    dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
    I: copying local configuration
    E: Failed autobuilding of package


    Could someone help me to fix the issue?


    My rules file:

    #!/usr/bin/make -f
    # debian/rules for spview

    %:
    dh $@ --with javahelper

    override_jh_build:
    jh_build --javacopts="-source 15 -target 15" --no-javadoc spview.jar sources

    override_dh_install:
    # hack to get all files into the jar (jh_build can only include *.class)
    (cd resources && jar uf ../spview.jar *)
    dh_install

    override_dh_auto_clean:
    dh_auto_clean
    rm -f *.jar

    Cheers,

    Cyril RICHARD - Ingénieur de Recherche CNRS

    Equipe Spectroscopie Moléculaire, Processus Collisionnels et Applications Département Interactions et Contrôle quantiques (ICQ)

    Laboratoire Interdisciplinaire Carnot de Bourgogne, UMR 6303 CNRS-Univ. Bourgogne Franche-Comté
    9 Avenue Alain Savary, BP 47 870, F-21078 DIJON Cedex FRANCE

    Tel. : +33 (0)3 80 39 59 96 / Fax : +33 (0)3 80 39 59 71
    E-mail : Cyril.Richard@u-bourgogne.fr
    Web : http://icb.u-bourgogne.fr

    <html><body><div id="zimbraEditorContainer" style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000" class="6"><div>Hello.</div><div><br data-mce-bogus="1"></div><div>I'm trying to update my java package with pbuilder before
    updating it on debian. This one now uses java15.</div><div>Then, the control files:</div><div><br data-mce-bogus="1"></div><div><div>Build-Depends: debhelper-compat (= 13),</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default-jdk,</
    <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;javahelper</div><div><br data-mce-bogus="1"></div><div>does not work anymore because default-jdk stands for java11 in the SID build environment.</div><div><br data-mce-bogus="1"></div><div>I
    tried to replace default-jdk by&nbsp;openjdk-11-jdk, but I have the following error:</div><div><br data-mce-bogus="1"></div><div><div>make[1]: Entering directory '/build/spview-2.0.0~rc1'</div><div>jh_build --javacopts="-source 15 -target 15" --no-
    javadoc spview.jar sources</div><div>jh_build: error: Cannot find any JAVA_HOME: aborting</div><div>make[1]: *** [debian/rules:8: override_jh_build] Error 25</div><div>make[1]: Leaving directory '/build/spview-2.0.0~rc1'</div><div>make: *** [debian/rules:
    5: binary] Error 2</div><div>dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2</div><div>I: copying local configuration</div><div>E: Failed autobuilding of package</div></div><div><br data-mce-bogus="1"></div><div><br data-
    mce-bogus="1"></div><div>Could someone help me to fix the issue?</div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>My rules file:</div><div><br data-mce-bogus="1"></div><div><div>#!/usr/bin/make -f</div><div># debian/rules for
    spview</div><div><br></div><div>%:</div><div><span style="white-space:pre"> </span>dh $@ --with javahelper</div><div><br></div><div>override_jh_build:</div><div><span style="white-space:pre"> </span>jh_build --javacopts="-source 15 -target 15" --no-
    javadoc spview.jar sources</div><div><br></div><div>override_dh_install:</div><div><span style="white-space:pre"> </span># hack to get all files into the jar (jh_build can only include *.class)</div><div><span style="white-space:pre"> </span>(cd
    resources &amp;&amp; jar uf ../spview.jar *)</div><div><span style="white-space:pre"> </span>dh_install</div><div><br></div><div>override_dh_auto_clean:</div><div><span style="white-space:pre"> </span>dh_auto_clean</div><div><span style="white-space:pre">
    </span>rm -f *.jar</div><div><br data-mce-bogus="1"></div><div>Cheers,</div></div></div><div><br></div><div data-marker="__SIG_PRE__">Cyril RICHARD - Ingénieur de Recherche CNRS<br><br>Equipe Spectroscopie Moléculaire, Processus Collisionnels et
    Applications<br>Département Interactions et Contrôle quantiques (ICQ)<br><br>Laboratoire Interdisciplinaire Carnot de Bourgogne, UMR 6303 CNRS-Univ. Bourgogne Franche-Comté<br>9 Avenue Alain Savary, BP 47 870, F-21078 DIJON Cedex FRANCE<br><br>Tel. &
    nbsp; : +33 (0)3 80 39 59 96 &nbsp;/ &nbsp;Fax &nbsp; &nbsp;: +33 (0)3 80 39 59 71<br>E-mail : Cyril.Richard@u-bourgogne.fr<br>Web &nbsp; &nbsp;: http://icb.u-bourgogne.fr<br></div></div></body></html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matthias Klose@21:1/5 to Cyril Richard on Thu May 27 11:20:02 2021
    On 5/19/21 11:06 AM, Cyril Richard wrote:
    Hello.

    I'm trying to update my java package with pbuilder before updating it on debian. This one now uses java15.
    Then, the control files:

    Build-Depends: debhelper-compat (= 13),
    default-jdk,
    javahelper

    does not work anymore because default-jdk stands for java11 in the SID build environment.

    I tried to replace default-jdk by openjdk-11-jdk, but I have the following error:

    make[1]: Entering directory '/build/spview-2.0.0~rc1'
    jh_build --javacopts="-source 15 -target 15" --no-javadoc spview.jar sources jh_build: error: Cannot find any JAVA_HOME: aborting
    make[1]: *** [debian/rules:8: override_jh_build] Error 25
    make[1]: Leaving directory '/build/spview-2.0.0~rc1'
    make: *** [debian/rules:5: binary] Error 2
    dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
    I: copying local configuration
    E: Failed autobuilding of package


    Could someone help me to fix the issue?

    openjdk-15 has been removed from testing, and probably will be removed from unstable soonish. Maybe use openjdk-16, or even -17 which is likely to become the next OpenJDK LTS release. Also Emmanuel is already doing test rebuilds against 17. I don't see any setting (and exporting) of JAVA_HOME in your rules file.

    Matthias

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Cyril Richard@21:1/5 to All on Thu May 27 13:50:01 2021
    openjdk-15 has been removed from testing, and probably will be removed from unstable soonish. Maybe use openjdk-16, or even -17 which is likely to become
    the next OpenJDK LTS release. Also Emmanuel is already doing test rebuilds against 17.

    Thank you so much for the tip.

    I don't see any setting (and exporting) of JAVA_HOME in your rules file

    You're right but it was working like that previously: [ https://salsa.debian.org/science-team/spview/-/blob/master/debian/rules | https://salsa.debian.org/science-team/spview/-/blob/master/debian/rules ]

    So what I should add in the rules file, with which syntax?

    Cheers

    Cyril RICHARD - Ingénieur de Recherche CNRS

    Equipe Spectroscopie Moléculaire, Processus Collisionnels et Applications Département Interactions et Contrôle quantiques (ICQ)

    Laboratoire Interdisciplinaire Carnot de Bourgogne, UMR 6303 CNRS-Univ. Bourgogne Franche-Comté
    9 Avenue Alain Savary, BP 47 870, F-21078 DIJON Cedex FRANCE

    Tel. : +33 (0)3 80 39 59 96 / Fax : +33 (0)3 80 39 59 71
    E-mail : Cyril.Richard@u-bourgogne.fr
    Web : http://icb.u-bourgogne.fr


    <html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><span style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-
    variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-
    decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-
    variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
    background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">&gt; openjdk-15 has been removed from testing, and probably will be removed from</
    span><br style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-
    indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-mce-
    style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px;
    text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><span style="color: #
    000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform:
    none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float:
    none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;
    display: inline !important; float: none;">&gt; unstable soonish. &nbsp;Maybe use openjdk-16, or even -17 which is likely to become</span><br style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-
    variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
    background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-
    ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-
    color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><span style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures:
    normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #
    ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style:
    normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-
    width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">&gt; the next OpenJDK LTS release. &nbsp;Also Emmanuel is already doing
    test rebuilds</span><br style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align:
    start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><
    span style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent:
    0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !
    important; float: none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-
    align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial; display: inline !important; float: none;">&gt; against 17.</span><div style="clear: both;" data-mce-style="clear: both;"><br></div></div><div>Thank you so much for the tip.</div><div><br data-mce-bogus="1"></div><div>&gt;&nbsp;<span style="color:
    #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform:
    none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float:
    none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;
    display: inline !important; float: none;">I don't see any setting (and exporting) of JAVA_HOME in your rules file</span><div style="clear: both;" data-mce-style="clear: both;"><br></div></div><div><span style="color: #000000; font-family: arial,
    helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal;
    widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" data-mce-style="color: #
    000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform:
    none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float:
    none;">You're right but it was working like that previously:&nbsp;<a href="https://salsa.debian.org/science-team/spview/-/blob/master/debian/rules">https://salsa.debian.org/science-team/spview/-/blob/master/debian/rules</a></span></div><div><span style="
    color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-
    transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important;
    float: none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align:
    start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial; display: inline !important; float: none;"><br data-mce-bogus="1"></span></div><div><span style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps:
    normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-
    thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-
    ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-
    color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">So what I should add in the rules file, with which syntax?</span></div><div><span style="color: #
    000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform:
    none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float:
    none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;
    display: inline !important; float: none;"><br data-mce-bogus="1"></span></div><div><span style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal;
    font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness:
    initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures:
    normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #
    ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Cheers</span></div><div><br></div><div data-marker="__SIG_PRE__">Cyril RICHARD - Ingénieur de Recherche
    CNRS<br><br>Equipe Spectroscopie Moléculaire, Processus Collisionnels et Applications<br>Département Interactions et Contrôle quantiques (ICQ)<br><br>Laboratoire Interdisciplinaire Carnot de Bourgogne, UMR 6303 CNRS-Univ. Bourgogne Franche-Comté<br>9
    Avenue Alain Savary, BP 47 870, F-21078 DIJON Cedex FRANCE<br><br>Tel. &nbsp; : +33 (0)3 80 39 59 96 &nbsp;/ &nbsp;Fax &nbsp; &nbsp;: +33 (0)3 80 39 59 71<br>E-mail : Cyril.Richard@u-bourgogne.fr<br>Web &nbsp; &nbsp;: http://icb.u-bourgogne.fr<br></div><
    div data-marker="__QUOTED_TEXT__"><br data-mce-bogus="1"></div></div></body></html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)