bugGNU Octave - Bugs: bug #38532, make dist without java produces...

 
 

bug #38532: make dist without java produces incomplete source distribution

Submitter:  Mike Miller <mtmiller>
Submitted:  Sat 16 Mar 2013 09:48:46 PM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 22 Mar 2013 03:26:09 PM UTC, comment #4: 

Here are two Stack Overflow posts which indicate that byte code differences do exist:

http://stackoverflow.com/questions/9207288/differences-in-java-bytecode-produced-by-oracles-and-eclipses-compilers

http://stackoverflow.com/questions/3012978/do-different-jdk-updates-produce-different-java-byte-code

As for whether there are good and bad compilers, I'm not sure.  Even though there are bytecode differences it is supposed to be the case that the observed behavior will be the same when run under a JVM.

I think you're right that we need to take a look at the Java files more closely.  We are distributing the compiled version in octave.jar so a user shouldn't need any Java compilation tools to configure and build Octave from a tarball.  They should only need a JVM for the actual running of java commands.

Rik <rik5>
Group administrator
Fri 22 Mar 2013 11:46:11 AM UTC, comment #3: 

I'm pretty sure that the different compilers produce different bytecode when fed a longish source code file.




I didn't know that. Do you know that there are "bad" Java compilers that we can't rely on to compile the Octave classes correctly? Are those being checked for in configure as well or should they be?

Also this implies that we should treat javac like bison, if it's not present it will trigger a warning that certain files may not be built but an end-user should still be able to compile from the distributed tarball, right?

Mike Miller <mtmiller>
Group Member
Fri 22 Mar 2013 04:27:10 AM UTC, comment #2: 

I made a changeset which prints out a message and stops the 'make dist' process when Java is not present (http://hg.savannah.gnu.org/hgweb/octave/rev/022898b4323b)

Rik <rik5>
Group administrator
Tue 19 Mar 2013 09:36:23 PM UTC, comment #1: 

It seems like one potential benefit to including octave.jar in the distribution is that we guarantee the byte code that user's get.  If we just distribute Java source then whatever Java compiler happens to be lying around will be used.  And I'm pretty sure that the different compilers produce different bytecode when fed a longish source code file.

Rik <rik5>
Group administrator
Sat 16 Mar 2013 09:48:46 PM UTC, original submission:  

The source distribution includes the java source files under scripts/java/org/octave as well as octave.jar containing the compiled java .class files.

If Octave is configured without java, those files are not included in the distribution tarball.

1) Should octave.jar be included in EXTRA_DIST? It's built on "make" and removed on "make clean", is there any benefit to including it in the source distribution?

If yes, then we should error if "make dist" is run when java is disabled.

If no, then we should delete it from EXTRA_DIST and add the .java source files to the distribution so we get the same source tarball with or without java.

Mike Miller <mtmiller>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mtmiller (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-03-22 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code