Opened 17 years ago

Closed 16 years ago

#2208 closed defect (fixed)

mapscript java makefile dependency problem

Reported by: arkadi Owned by: unicoletti
Priority: normal Milestone:
Component: MapScript-Java Version: unspecified
Severity: normal Keywords:
Cc:

Description

In mapserver/mapscript/java/Makefile.in:

all: interface mapscript_so mapscript_java mapscript_jar
mapscript_java::
        $(JAVAC) edu/umn/gis/mapscript/*.java
mapscript_jar::
        $(JAR) cf mapscript.jar edu

In case parallel build is performed or make is evaluating targets in unspecified order the JAR file might be created without all necessary .class files. Consider this simple proof:

lithium(/7)arkadi:~/tmp/m> cat Makefile
all: a b
a::
        @sleep 2
        @echo a
b::
        @echo b
lithium(/7)arkadi:~/tmp/m> make -j2
b
a
lithium(/7)arkadi:~/tmp/m> make
a
b
lithium(/7)arkadi:~/tmp/m>

Attachments (1)

2208.patch (634 bytes ) - added by unicoletti 16 years ago.
This patch allows paralle compilation and in fact speeds things up a little

Download all attachments as: .zip

Change History (8)

comment:1 by arkadi, 17 years ago

The issue is present in Mapserver 5.0 too.

comment:2 by unicoletti, 16 years ago

Resolution: wontfix
Status: newclosed

Parallel build is in fact discouraged. Closing.

comment:3 by arkadi, 16 years ago

Resolution: wontfix
Status: closedreopened

Quite an interesting approach in the era of multi-core CPU. The typical 1U server has 4 or 8 CPU-s these days, I believe.

The real problem is: the build silently produce incorrect result. I assume the sane way of "discouraging" parallel compile would be enforcing -j1 for whatever reason you need the build serialized. Else it is troublesome to explain to the customers the Mapserver is commercial grade software in the light in can't be even properly compiled.

Maybe it is my fault, but I can't find anything in the documentation about "Parallel build is discouraged".

Yet it could be fixed with one-line patch.

Reopening the ticket. Please consider fixing or documenting this issue properly.

comment:4 by unicoletti, 16 years ago

Patch are always *very* much welcome ;-)

by unicoletti, 16 years ago

Attachment: 2208.patch added

This patch allows paralle compilation and in fact speeds things up a little

comment:5 by unicoletti, 16 years ago

Arkadi, please try the patch and report your findings here so that I can commit to svn and close this ticket.

comment:6 by arkadi, 16 years ago

Works for me.

Thank you.

comment:7 by unicoletti, 16 years ago

Resolution: fixed
Status: reopenedclosed

Closing

Note: See TracTickets for help on using tickets.