Bug#1099970: libformula: please drop usage of deprecated ant.mk CDBS helper
Rene Engelhard
rene at debian.org
Mon Sep 8 21:41:45 BST 2025
tag 1099970 + help
thanks
Hi,
Am 05.09.25 um 12:28 schrieb Alexandre Detiste:
> control: severity -1 serious
>
> Dear Maintainers,
>
> /usr/share/cdbs/1/class/ant.mk removal has now been committed
> on CDBS git repository and will be gone from next upload.
Yeah, do it before stuff using it is fixed. Right order. NOT.
> libformula is one of the 3 remaining users.
>
> I did my best to migrate all packages team maintained
> in "QA Group" and here, but I'm struggling on this one.
I can't get it to build with plain dh_auto_build either because it doesn't find the stuff compile-jj using javacc generates:
With
export CLASSPATH:=/usr/share/java/jcommon.jar:/usr/share/java/libbase.jar:/usr/share/java/commons-logging.jar:/usr/share/java/junit.jar
%:
dh $@ --with javahelper --buildsystem ant
override_dh_auto_build:
dh_auto_build -- compile-jj -Dant.build.javac.target=1.5 -Dant.build.javac.source=1.5
dh_auto_build -- compile -Dant.build.javac.target=7 -Dant.build.javac.source=7
dh_auto_build -- jar -Dant.build.javac.target=1.5 -Dant.build.javac.source=1.5
dh_auto_build -- javadoc compile -Dant.build.javac.target=1.5 -Dant.build.javac.source=1.5
[...]
make[1]: Entering directory '/home/rene/libformula-1.1.7.dfsg'
dh_auto_build -- compile-jj -Dant.build.javac.target=1.5 -Dant.build.javac.source=1.5
dh_auto_build: warning: Compatibility levels before 10 are deprecated (level 9 in use)
ant -propertyfile ./debian/ant.properties -Duser.name debian compile-jj -Dant.build.javac.target=1.5 -Dant.build.javac.source=1.5
Buildfile: /home/rene/libformula-1.1.7.dfsg/build.xml
compile-jj:
[javacc] Java Compiler Compiler Version 7.0.13 (Parser Generator)
[javacc] (type "javacc" with no arguments for help)
[javacc] Reading from file /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/parser/Parser.jj . . .
[javacc] Note: UNICODE_INPUT option is specified. Please make sure you create the parser/lexer using a Reader with the correct character encoding.
[javacc] Parser generated successfully.
BUILD SUCCESSFUL
Total time: 0 seconds
dh_auto_build -- compile -Dant.build.javac.target=7 -Dant.build.javac.source=7
dh_auto_build: warning: Compatibility levels before 10 are deprecated (level 9 in use)
ant -propertyfile ./debian/ant.properties -Duser.name debian compile -Dant.build.javac.target=7 -Dant.build.javac.source=7
Buildfile: /home/rene/libformula-1.1.7.dfsg/build.xml
init:
[mkdir] Created dir: /home/rene/libformula-1.1.7.dfsg/bin/classes
[mkdir] Created dir: /home/rene/libformula-1.1.7.dfsg/dist
compile.pre:
compile.compile:
[javac] /home/rene/libformula-1.1.7.dfsg/common_build.xml:1069: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Using javac -source 1.5 is no longer supported, switching to 8
[javac] Using javac -target 1.5 is no longer supported, switching to 8
[javac] Compiling 287 source files to /home/rene/libformula-1.1.7.dfsg/bin/classes
[javac] warning: [options] bootstrap class path not set in conjunction with -source 8
[javac] warning: [options] source value 8 is obsolete and will be removed in a future release
[javac] warning: [options] target value 8 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/function/DefaultFunctionRegistry.java:123: warning: [deprecation] newInstance() in Class has been deprecated
[javac] return (Function) cachedClass.newInstance();
[javac] ^
[javac] where T is a type-variable:
[javac] T extends Object declared in class Class
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/DefaultLocalizationContext.java:144: warning: [deprecation] Locale(String,String,String) in Locale has been deprecated
[javac] this.locale = new Locale(declaredLocaleParts[0], declaredLocaleParts[1], declaredLocaleParts[2]);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/LibFormulaErrorValue.java:100: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
[javac] return new Messages(locale).formatMessage("ErrorValue.Generic", new Integer(errorCode));
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/function/datetime/MinuteFunction.java:77: warning: [deprecation] ROUND_HALF_UP in BigDecimal has been deprecated
[javac] final BigDecimal minutesAsInt = minutes.setScale(0, BigDecimal.ROUND_HALF_UP);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/function/datetime/MinuteFunction.java:77: warning: [deprecation] setScale(int,int) in BigDecimal has been deprecated
[javac] final BigDecimal minutesAsInt = minutes.setScale(0, BigDecimal.ROUND_HALF_UP);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/function/math/Log10Function.java:65: warning: [deprecation] ROUND_HALF_UP in BigDecimal has been deprecated
[javac] final BigDecimal divide = new BigDecimal(d).divide(LOG10BASE, LibFormulaBoot.GLOBAL_SCALE, BigDecimal.ROUND_HALF_UP);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/function/math/Log10Function.java:65: warning: [deprecation] divide(BigDecimal,int,int) in BigDecimal has been deprecated
[javac] final BigDecimal divide = new BigDecimal(d).divide(LOG10BASE, LibFormulaBoot.GLOBAL_SCALE, BigDecimal.ROUND_HALF_UP);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/function/math/ModFunction.java:78: warning: [deprecation] ROUND_FLOOR in BigDecimal has been deprecated
[javac] final BigDecimal divide = new BigDecimal(divided.divide(divisor, 0, BigDecimal.ROUND_FLOOR).toString());
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/function/math/ModFunction.java:78: warning: [deprecation] divide(BigDecimal,int,int) in BigDecimal has been deprecated
[javac] final BigDecimal divide = new BigDecimal(divided.divide(divisor, 0, BigDecimal.ROUND_FLOOR).toString());
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/function/userdefined/ParseDateFunction.java:112: warning: [deprecation] Locale(String,String,String) in Locale has been deprecated
[javac] return new Locale(language, country, variant);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/operators/PowerOperator.java:40: warning: [removal] Double(double) in Double has been deprecated and marked for removal
[javac] return new Double(result);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/parser/GeneratedFormulaParser.java:465: error: no suitable constructor found for JavaCharStream(InputStream,String,int,int)
[javac] try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
[javac] ^
[javac] constructor JavaCharStream.JavaCharStream(Reader,int,int,int) is not applicable
[javac] (argument mismatch; InputStream cannot be converted to Reader)
[javac] constructor JavaCharStream.JavaCharStream(InputStream,int,int,int) is not applicable
[javac] (argument mismatch; String cannot be converted to int)
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/parser/GeneratedFormulaParser.java:479: error: no suitable method found for ReInit(InputStream,String,int,int)
[javac] try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
[javac] ^
[javac] method JavaCharStream.ReInit(Reader,int,int,int) is not applicable
[javac] (argument mismatch; InputStream cannot be converted to Reader)
[javac] method JavaCharStream.ReInit(InputStream,int,int,int) is not applicable
[javac] (argument mismatch; String cannot be converted to int)
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/parser/GeneratedFormulaParserTokenManager.java:645: error: incompatible types: possible lossy conversion from int to char
[javac] throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/util/DateUtil.java:106: warning: [deprecation] ROUND_UP in BigDecimal has been deprecated
[javac] final BigDecimal o = fromSerialDate.setScale(LibFormulaBoot.GLOBAL_SCALE, BigDecimal.ROUND_UP);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/util/DateUtil.java:106: warning: [deprecation] setScale(int,int) in BigDecimal has been deprecated
[javac] final BigDecimal o = fromSerialDate.setScale(LibFormulaBoot.GLOBAL_SCALE, BigDecimal.ROUND_UP);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/util/HSSFDateUtil.java:98: warning: [deprecation] ROUND_HALF_UP in BigDecimal has been deprecated
[javac] (DAY_MILLISECONDS, LibFormulaBoot.GLOBAL_SCALE, BigDecimal.ROUND_HALF_UP);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/util/HSSFDateUtil.java:97: warning: [deprecation] divide(BigDecimal,int,int) in BigDecimal has been deprecated
[javac] final BigDecimal fraction = new BigDecimal(time).divide
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/util/HSSFDateUtil.java:182: warning: [deprecation] ROUND_HALF_UP in BigDecimal has been deprecated
[javac] calendar.set(Calendar.MILLISECOND, fraction.setScale(0, BigDecimal.ROUND_HALF_UP).intValue());
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/util/HSSFDateUtil.java:182: warning: [deprecation] setScale(int,int) in BigDecimal has been deprecated
[javac] calendar.set(Calendar.MILLISECOND, fraction.setScale(0, BigDecimal.ROUND_HALF_UP).intValue());
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/util/NumberUtil.java:76: warning: [deprecation] ROUND_UP in BigDecimal has been deprecated
[javac] round = n.setScale(0, BigDecimal.ROUND_UP);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/util/NumberUtil.java:76: warning: [deprecation] setScale(int,int) in BigDecimal has been deprecated
[javac] round = n.setScale(0, BigDecimal.ROUND_UP);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/util/NumberUtil.java:81: warning: [deprecation] ROUND_DOWN in BigDecimal has been deprecated
[javac] round = n.setScale(1, BigDecimal.ROUND_DOWN);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/util/NumberUtil.java:81: warning: [deprecation] setScale(int,int) in BigDecimal has been deprecated
[javac] round = n.setScale(1, BigDecimal.ROUND_DOWN);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/util/NumberUtil.java:103: warning: [deprecation] ROUND_UP in BigDecimal has been deprecated
[javac] round = n.setScale(ROUND_SCALE, BigDecimal.ROUND_UP);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/util/NumberUtil.java:103: warning: [deprecation] setScale(int,int) in BigDecimal has been deprecated
[javac] round = n.setScale(ROUND_SCALE, BigDecimal.ROUND_UP);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/util/NumberUtil.java:108: warning: [deprecation] ROUND_DOWN in BigDecimal has been deprecated
[javac] round = n.setScale(ROUND_SCALE, BigDecimal.ROUND_DOWN);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/util/NumberUtil.java:108: warning: [deprecation] setScale(int,int) in BigDecimal has been deprecated
[javac] round = n.setScale(ROUND_SCALE, BigDecimal.ROUND_DOWN);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/util/NumberUtil.java:147: warning: [deprecation] ROUND_HALF_UP in BigDecimal has been deprecated
[javac] final BigDecimal divide = bd1.divide(bd2, LibFormulaBoot.GLOBAL_SCALE, BigDecimal.ROUND_HALF_UP);
[javac] ^
[javac] /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/util/NumberUtil.java:147: warning: [deprecation] divide(BigDecimal,int,int) in BigDecimal has been deprecated
[javac] final BigDecimal divide = bd1.divide(bd2, LibFormulaBoot.GLOBAL_SCALE, BigDecimal.ROUND_HALF_UP);
[javac] ^
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
[javac] 3 errors
[javac] 31 warnings
BUILD FAILED
/home/rene/libformula-1.1.7.dfsg/common_build.xml:1069: Compile failed; see the compiler error output for details.
Total time: 2 seconds
dh_auto_build: error: ant -propertyfile ./debian/ant.properties -Duser.name debian compile -Dant.build.javac.target=7 -Dant.build.javac.source=7 returned exit code 1
make[1]: *** [debian/rules:16: override_dh_auto_build] Error 255
make[1]: Leaving directory '/home/rene/libformula-1.1.7.dfsg'
make: *** [debian/rules:12: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
debuild: fatal error at line 1185:
dpkg-buildpackage -us -uc -ui -b failed
and that JavaCharStream is what javacc generates:
compile-jj:
[javacc] Java Compiler Compiler Version 7.0.13 (Parser Generator)
[javacc] (type "javacc" with no arguments for help)
[javacc] Reading from file /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/parser/Parser.jj . . .
[javacc] Note: UNICODE_INPUT option is specified. Please make sure you create the parser/lexer using a Reader with the correct character encoding.
[javacc] File "TokenMgrError.java" is being rebuilt.
[javacc] File "ParseException.java" is being rebuilt.
[javacc] File "Token.java" is being rebuilt.
[javacc] File "JavaCharStream.java" is being rebuilt.
[javacc] Parser generated successfully.
A manual build even fails earlier:
rene at frodo:~/libformula-1.1.7.dfsg$ dh_auto_build -- compile-jj
dh_auto_build: warning: Compatibility levels before 10 are deprecated (level 9 in use)
ant -propertyfile ./debian/ant.properties -Duser.name debian compile-jj
Buildfile: /home/rene/libformula-1.1.7.dfsg/build.xml
compile-jj:
[javacc] Java Compiler Compiler Version 7.0.13 (Parser Generator)
[javacc] (type "javacc" with no arguments for help)
[javacc] Reading from file /home/rene/libformula-1.1.7.dfsg/source/org/pentaho/reporting/libraries/formula/parser/Parser.jj . . .
[javacc] Note: UNICODE_INPUT option is specified. Please make sure you create the parser/lexer using a Reader with the correct character encoding.
[javacc] Parser generated successfully.
BUILD SUCCESSFUL
Total time: 0 seconds
rene at frodo:~/libformula-1.1.7.dfsg$ dh_auto_build -- compile
dh_auto_build: warning: Compatibility levels before 10 are deprecated (level 9 in use)
ant -propertyfile ./debian/ant.properties -Duser.name debian compile
Buildfile: /home/rene/libformula-1.1.7.dfsg/build.xml
init:
compile.pre:
compile.compile:
[javac] /home/rene/libformula-1.1.7.dfsg/common_build.xml:1069: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 24 source files to /home/rene/libformula-1.1.7.dfsg/bin/classes
[javac] warning: [options] bootstrap class path not set in conjunction with -source 5
[javac] error: Source option 5 is no longer supported. Use 8 or later.
[javac] error: Target option 5 is no longer supported. Use 8 or later.
BUILD FAILED
/home/rene/libformula-1.1.7.dfsg/common_build.xml:1069: Compile failed; see the compiler error output for details.
Total time: 0 seconds
dh_auto_build: error: ant -propertyfile ./debian/ant.properties -Duser.name debian compile returned exit code 1
(And yes, I removed it from ant.properties)
Won't waste more time on this (at least today), hopefully next year in February LibreOffice will ditch the usage of this library, cf. https://summerofcode.withgoogle.com/programs/2025/projects/VoGM95aI
Regards,
Rene
More information about the pkg-java-maintainers
mailing list