bugGNU Octave - Bugs: bug #39454, Fix building core Java support...

 
 

bug #39454: Fix building core Java support for MinGW builds

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Tue 09 Jul 2013 10:09:04 PM UTC  
 
Category:  Configuration and Build System Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  Philip Nienhuis <philipnienhuis>
Originator Name:  Philip Nienhuis Open/Closed:  Closed
Release:  dev Operating System:  Microsoft Windows

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Tue 16 Jul 2013 06:11:17 PM UTC, comment #10: 

Lowered priority as there's a fix (admittedly for a limited scope)

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Thu 11 Jul 2013 08:51:35 PM UTC, comment #9: 

Done.

http://hg.savannah.gnu.org/hgweb/octave/rev/db4453f40550

I'll leave it open for a while for in case Anirudha comes up with a better fix.

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Thu 11 Jul 2013 04:26:55 PM UTC, comment #8: 

Yes, I think it's better than nothing.

Michael Goffioul <goffioul>
Thu 11 Jul 2013 04:21:22 PM UTC, comment #7: 

Can the changeset be pushed as a temporary fix?
Until we find / need a better solution?

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Wed 10 Jul 2013 09:59:08 PM UTC, comment #6: 

The .def files are useful for compilers that do not provide the export-all-symbols functionality.

Michael Goffioul <goffioul>
Wed 10 Jul 2013 09:56:18 PM UTC, comment #5: 

I haven't been following this issue closely since I only build on a Linux platform.  My suggestion that the attached changeset seemed reasonable was based on the fact that

1) It is narrowly scoped.  The clause is protected by a case statement so only affected users on MinGW and Cygwin would see a change.  Everyone else should be undisturbed by it.

2) It is narrowly targeted.  It only attempts to fix compiling Octave on MingW WHEN ALSO compiling Java.

There is no real reason to suppose linearity, but I prefer the small change in the hopes that if something goes wrong it also goes wrong in a small way.  Since I won't feel the pain, I'm willing to leave it up to you two to decide whether you want to switch all of MinGW compiling to use --export-all-symbols.  If we do do that, is there any reason to still create .def files such as ranlib.def and cruft.def?  Or could we remove those from the build system?

Rik <rik5>
Project Administrator
Wed 10 Jul 2013 09:21:12 PM UTC, comment #4: 

Well, the suggestion of comment #3 doesn't work (just tried, I get the same

X:\MinGW\..../ov-base.h:211: undefined reference to `vtable for octave_base_value'

errors as before.

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Wed 10 Jul 2013 08:17:12 PM UTC, comment #3: 

It could also be added at L. 374 in configure.ac (although I'm not sure it's the right place - the configure.ac section is titled:

### Determine the compiler flag necessary to create dependencies
)

so that the clause reads:

    --mingw*)
      if test $have_msvc = no; then
        INCLUDE_DEPS=no
      fi
      LDFLAGS="$LDFLAGS -Wl,--export-all-symbols"
    ;;

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Wed 10 Jul 2013 08:02:10 PM UTC, comment #2: 

Personally, I find the solution a bit fragile. Shouldn't the flag be added unconditionally to LDFLAGS when using MinGW? At least you wouldn't rely on the default behavior of the linker, and you would also be robust against the problem in case any other dllexport declaration happens to appear in the future.

Michael Goffioul <goffioul>
Wed 10 Jul 2013 07:44:47 PM UTC, comment #1: 

This looks fine to me.  It is appropriately initiated only when Java is being compiled in and only when the MinGW or Cygwin are used.

Rik <rik5>
Project Administrator
Tue 09 Jul 2013 10:09:04 PM UTC, original submission:  

Thanks to Michael Goffioul's hints [1], I could finally fix this issue.That is, it works for me.

Patch attached - before I push I would like to know if this is a proper solution in the eyes of the autotools gurus as well.

To build core Java support with MXE (just succeeded with that) additinal tricks are needed. I'll report about that on the maintainers list tomorrow.

[1] https://mailman.cae.wisc.edu/pipermail/octave-maintainers/2013-July/034910.html

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #28525:  mingw_java.cs added by philipnienhuis (642B - text/x-csharp)

 

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 philipnienhuis (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-10-26 rik5 Open/ClosedOpen => Closed
    2013-07-16 philipnienhuis Severity3 - Normal => 2 - Minor
    2013-07-11 philipnienhuis StatusReady For Test => Fixed
    2013-07-09 philipnienhuis Attached File- => Added mingw_java.cs, #28525

    Back to the top


    Powered by Savane 3.5