patchGNU Octave - Patches: patch #9806, Build failures on macOS via...

 
 

patch #9806: Build failures on macOS via Homebrew due to 1.6 argument to -source and -target

Submitter:  None
Submitted:  Tue 14 May 2019 04:24:21 PM UTC
   
 
Category:  Core : other Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Originator Email:  -email is unavailable-
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 02 Jan 2020 06:25:20 PM UTC, comment #10: 

@Mike: Sorry to have dropped the ball on this, I've been spread pretty thin recently. I'm glad the patch made it in!

Izaak "Zaak" Beekman <zbeekman>
Thu 02 Jan 2020 06:15:45 PM UTC, comment #9: 

Thanks for the reminder. I was also apparently waiting for an updated patch from the submitter, but it never came, so I rewrote the patch entirely and pushed on the default branch

https://hg.savannah.gnu.org/hgweb/octave/rev/5701a3716577

Mike Miller <mtmiller>
Group Member
Thu 02 Jan 2020 05:14:08 PM UTC, comment #8: 

@Mike: Last comment on this patch report was from May 2019.  Gearing up for the Octave 6.1 release in a few weeks, can we apply this patch?  The objections seemed to be about applying it to stable, which I understand, but for a brand new release of Octave we can be bolder with the changes we make.

Rik <rik5>
Group administrator
Fri 31 May 2019 07:33:17 PM UTC, comment #7: 

@apjanke I agree with your assessment on the non-free operating systems.

I have posed a question on the maintainers list for any other objections or problems people might know about: https://lists.gnu.org/archive/html/octave-maintainers/2019-05/msg00123.html

@zbeekman Would still be happy to see an updated patch from you with changes mentioned in comment #5. It will definitely be applied, either on stable or development branches.

Mike Miller <mtmiller>
Group Member
Wed 15 May 2019 03:33:50 AM UTC, comment #6: 


> We should make sure dropping Java 6 and 7 won't break any supported systems if we're going to make this change on the stable branch.


I think that Mac users would be all right with this change, too. Recent versions of macOS do not come with any Java by default, but JDKs 8 through 12 are readily available for download, and the OpenJDKs are easily installable through Homebrew.

Both Oracle JDK and OpenJDK 8 and later require OS X 10.9 or later. What macOS versions are supported by Octave 5.x?

From what I can tell on Wikipedia, all Macs released in 2009 or later can run at least OS X 10.11; the Late 2006 MacBook Pro and Late 2008 MacBook (non-Pro) are the latest models I could find that are unable to run OS X 10.9, and are stuck on OS X 10.7. Those are pretty old machines by Mac standards, so I don't know if they qualify as "supported systems" here.

I'm not even sure how you'd get Octave and its dependencies installed on an OS X 10.9 system. Neither Homebrew nor MacPorts support OS Xs that old, and Tigerbrew only supports Tiger and Leopard.

Windows users should be fine with it too: JDK 8 supports Windows as old as Windows Vista, per https://www.oracle.com/technetwork/java/javase/certconfig-2095354.html.

Andrew Janke <apjanke>
Tue 14 May 2019 08:30:56 PM UTC, comment #5: 

Sure, a new patch would be nice. And please use "-source 8 -target 8" instead of "-source 1.8 -target 1.8", since I think it's more standard to refer to Java 8 instead of Java 1.8 now.

Even better would be a patch that includes a Git or Hg header with an author, date, and commit message.

Then as far as pushing this on Octave's stable branch, you (or someone) might ask on the maintainers mailing list if there are any objections to bumping the minimum to Java 8 for the next stable update.

I can already assert that Debian and Ubuntu distributions should have no problem with this change, all supported versions (Debian 9 and later, Ubuntu 16.04 and later) include Java 8 by default or better.

Mike Miller <mtmiller>
Group Member
Tue 14 May 2019 08:07:16 PM UTC, comment #4: 


> But I would rather bump the version to 8 instead of 7, since Java 8 is an LTS release supported until 2025.


Do you want a new patch? Should I bump our patching in Homebrew to Java 8?

Izaak "Zaak" Beekman <zbeekman>
Tue 14 May 2019 06:17:48 PM UTC, comment #3: 

I think this might be a reasonable fix for the stable branch, to make it part of the 5.2.0 release. Java 6 just died in December 2018, we probably should have caught this before pushing 5.1. But I would rather bump the version to 8 instead of 7, since Java 8 is an LTS release supported until 2025. We should make sure dropping Java 6 and 7 won't break any supported systems if we're going to make this change on the stable branch.

Mike Miller <mtmiller>
Group Member
Tue 14 May 2019 06:03:32 PM UTC, comment #2: 

This is probably dependent on which version of the JDK you are building against, and not which macOS version or OpenJDK vs Oracle JDK. Every so often, newer versions of the JDK drop support for older Java source and bytecode formats. Looks like JDK 12 has dropped support for the Java 1.6 format.

Java 1.6 is pretty ancient at this point. Given that Octave requires somewhat-new versions of other libraries, it seems to me like it would be reasonable to just bump the Java compilation level to 1.7.

Andrew Janke <apjanke>
Tue 14 May 2019 04:32:54 PM UTC, comment #1: 

FYI, I submitted this and just made an account.

Izaak "Zaak" Beekman <zbeekman>
Tue 14 May 2019 04:24:21 PM UTC, original submission:  

Building 5.1.0 from source on macOS under 1.14.4 (Mojave) via mac Homebrew (<https://brew.sh>) results in the following build failure:

Build command:

brew install --build-from-source --verbose octave



build-aux/install-sh -c -d scripts/java/org/octave && \
        ( cd ./scripts/java; \
          "/Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk/Contents/Home/bin/javac" -source 1.6 -target 1.6 -Xlint:-options \
                     -d /private/tmp/octave-20190514-42663-hrgy0r/octave-5.1.0/scripts/java \
                     org/octave/ClassHelper.java )
Updating 'libgui/languages/uk_UA.qm'...
    Generated 48 translation(s) (0 finished and 48 unfinished)
    Ignored 863 untranslated source text(s)
build-aux/install-sh -c -d scripts/java/org/octave && \
        ( cd ./scripts/java; \
          "/Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk/Contents/Home/bin/javac" -source 1.6 -target 1.6 -Xlint:-options \
                     -d /private/tmp/octave-20190514-42663-hrgy0r/octave-5.1.0/scripts/java \
                     org/octave/Matrix.java )
Updating 'libgui/languages/zh_CN.qm'...
    Generated 856 translation(s) (842 finished and 14 unfinished)
    Ignored 55 untranslated source text(s)
build-aux/install-sh -c -d scripts/java/org/octave && \
        ( cd ./scripts/java; \
          "/Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk/Contents/Home/bin/javac" -source 1.6 -target 1.6 -Xlint:-options \
                     -d /private/tmp/octave-20190514-42663-hrgy0r/octave-5.1.0/scripts/java \
                     org/octave/OctClassLoader.java )
Picked up _JAVA_OPTIONS:  -Duser.home=/Users/ibeekman/Library/Caches/Homebrew/java_cache
Picked up _JAVA_OPTIONS:  -Duser.home=/Users/ibeekman/Library/Caches/Homebrew/java_cache
Picked up _JAVA_OPTIONS:  -Duser.home=/Users/ibeekman/Library/Caches/Homebrew/java_cache
error: Source option 6 is no longer supported. Use 7 or later.
error: Target option 6 is no longer supported. Use 7 or later.
error: Source option 6 is no longer supported. Use 7 or later.
error: Target option 6 is no longer supported. Use 7 or later.
error: Source option 6 is no longer supported. Use 7 or later.
error: Target option 6 is no longer supported. Use 7 or later.


More details are available at https://github.com/Homebrew/homebrew-core/issues/39848

I'm not sure whether or not you want or need to add some system introspection for java to determine how to set the -source and -target flags, but the patch, attached here and also at https://github.com/Homebrew/formula-patches/commit/a8124b73c5216cc81d63627a4b41203ab1d91a4d fixes the issue for me.

Please let me know if you require any additional information.

Thanks!

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #46907:  5.1.0-java-version.patch added by None (1KiB - application/octet-stream - patch for octave java build problem on macOS 10.14.4)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by apjanke (Posted a comment)
  • -email is unavailable- added by zbeekman (Posted a comment)
  • -email is unavailable- added by None (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 logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-01-02 mtmiller StatusNone Done
        Open/ClosedOpen Closed
    2019-06-25 mtmiller Dependencies- bugs #56549 is dependent
    2019-05-14 None Attached File- Added 5.1.0-java-version.patch, #46907

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code