make check fails in [build JCS]

Stephan Bergmann sbergman at redhat.com
Thu Oct 22 06:19:27 UTC 2020


On 29/08/2018 11:06, Stephan Bergmann wrote:
> On 29/08/18 10:04, Regina Henschel wrote:
>> [build JCS] JunitTest/comphelper_complex
>> [build JCS] JunitTest/forms_unoapi_3
>> [build JCS] JunitTest/forms_unoapi_4
>> [build JCS] JunitTest/forms_complex
>> [build JCS] JunitTest/framework_complex
>> error: illegal argument for --class-path: Illegal char <:> at index 4: 
>> file:///D:/Build_sep18/core/instdir/program/classes/juh.jar
>> make[1]: *** [D:/Build_Sep18/core/solenv/gbuild/JavaClassSet.mk:53: 
>> D:/Build_sep18/core/workdir/JavaClassSet/JunitTest/comphelper_complex/done] 
>> Error 2
>> make[1]: *** Waiting for unfinished jobs....
>> error: illegal argument for --class-path: Illegal char <:> at index 4: 
>> file:///D:/Build_sep18/core/instdir/program/classes/juh.jar
>> make[1]: *** [D:/Build_Sep18/core/solenv/gbuild/JavaClassSet.mk:53: 
>> D:/Build_sep18/core/workdir/JavaClassSet/JunitTest/forms_complex/done] 
>> Error 2
>> make: *** [Makefile:286: build] Error 2
> I run into such errors on Windows with recent JDK (9/10; I /think/ it 
> started with 9) for quite a while now, wondered why apparently nobody 
> else did, locally applied below hack for now, and moved on for the time 
> being without investigating deeper into the issue.  (Apparently, Java no 
> longer accepts file:... URLs there, at least on Windows, and won't 
> accept full pathnames starting with a drive letter like C:/..., but does 
> accept ("drive-absolute") pathnames like /...; so my hack should work as 
> long as your files are on drive C.)
> 
> Apparently, needs more investigation and a proper fix, eventually.

So just for the record:  With more recent JDK, like Java 15 from 
AdoptOpenJDK, I no longer run into the above issue during build, and no 
longer need the below hack applied locally.

>> diff --git a/solenv/gbuild/Jar.mk b/solenv/gbuild/Jar.mk
>> index 151fb990a0a6..87f76d8a75a4 100644
>> --- a/solenv/gbuild/Jar.mk
>> +++ b/solenv/gbuild/Jar.mk
>> @@ -196,7 +196,7 @@ endef
>>
>>  define gb_Jar_use_system_jar
>>  $(call gb_JavaClassSet_use_system_jar,$(call 
>> gb_Jar_get_classsetname,$(1)),$(2))
>> -$(call gb_Jar_add_manifest_classpath,$(1),$(call 
>> gb_Helper_make_url,$(2)))
>> +$(call gb_Jar_add_manifest_classpath,$(1),$(subst C:,,$(2)))
>>
>>  endef
>>
>> diff --git a/unotest/Jar_test.mk b/unotest/Jar_test.mk
>> index cc5fde435c7b..dd0420382e28 100644
>> --- a/unotest/Jar_test.mk
>> +++ b/unotest/Jar_test.mk
>> @@ -11,9 +11,9 @@
>>  $(eval $(call gb_Jar_Jar,test))
>>
>>  $(eval $(call gb_Jar_add_manifest_classpath,test,\
>> -    $(call gb_Helper_make_url,$(call gb_Jar_get_target,juh)) \
>> -    $(call gb_Helper_make_url,$(call gb_Jar_get_target,ridl)) \
>> -    $(call gb_Helper_make_url,$(call gb_Jar_get_target,unoil)) \
>> +    $(subst C:,,$(call gb_Jar_get_target,juh)) \
>> +    $(subst C:,,$(call gb_Jar_get_target,ridl)) \
>> +    $(subst C:,,$(call gb_Jar_get_target,unoil)) \
>>  ))
>>
>>  $(eval $(call gb_Jar_use_jars,test,\



More information about the LibreOffice mailing list