[Scons-users] Bug: Java Builder depends on Jar Builder causes SCons to Dead-Loop

Roland Pluess roland at rptd.ch
Wed Aug 22 06:12:25 EDT 2018


Hi,

We've got a multi-project SCons script which builds multiple jar targets depending on each other. This all works well on 2.5.1 . If upgrading to 3.0.1 though the SCons script dead-loops rendering building impossible (even a scons -h dead-loop). The following situation causes the problem

java1 = envTarget1.Java('binding/jar', 'binding/src')
jar1 = envTarget1.Jar(target='binding.jar', source=['binding/jar'], JARCHDIR='$SOURCE')

envTarget2.Append(JAVACLASSPATH = jar1)
copyJar1 = envTarget2.Command('jar/libs/{}'.format(jar1.name), jar1, Copy('$TARGET', '$SOURCE'))
java2 = envTarget2.java('client/jar', 'client/src')
envTarget2.Depends(java1, [jar1])   # <= if this line is commented out the dead-loop in scons stops but builds also fail due to missing dependency
jar2 = envTarget2.Jar(target='client.jar', source=['client/jar'], JARCHDIR='$SOURCE')
envTarget2.Depends(jar2, [copyJar2])

The use-case for this is the following: The client.jar depends/uses the binding.jar . This required this build flow:
- binding sources are compiled
- binding.jar is build from sources
- client sources are compiled using jar1 in JAVACLASSPATH
- binding.jar is copied to client sources jar directory
- client.jar is build from sources including binding.jar

As mentioned this scenario works in 2.5.1 but dead-loops in 3.0.1 . This bug is a BLOCKER because you can not work around it. You can not even build first the binding.jar then call scons again to build the client.jar since it dead-loops already on dependency build time.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180822/0f907c32/attachment.html>


More information about the Scons-users mailing list