bugGNU Octave - Bugs: bug #39446, MXE-Octave: LAPACK build mixes...


bug #39446: MXE-Octave: LAPACK build mixes MinGW and MSVC

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Tue Jul 9 12:38:27 2013  
Category: Configuration and Build SystemSeverity: 1 - Wish
Priority: 3 - LowItem Group: Build Failure
Status: Wont FixAssigned to: None
Originator Name: Philip NienhuisOpen/Closed: Closed
Release: devOperating System: Microsoft Windows

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


(Jump to the original submission Jump to the original submission)

Sun Jul 3 07:43:59 2016, comment #23:

OK, I'll close it.
If anyone wants to try again with MSVC this bug report can be reopened.

Philip Nienhuis <philipnienhuis>
Project Member
Sat Jul 2 21:11:50 2016, comment #22:

Sounds like it can be closed, but I'll let Philip do it.

Rik <rik5>
Project Administrator
Sat Jul 2 20:54:17 2016, comment #21:

I don't know, you reported this bug :)

My understanding was this bug was about attempting to build with mxe-octave natively on Windows, but some of the build makefiles were accidentally picking up MSVC files that happened to be installed on your system.

Mike Miller <mtmiller>
Project Administrator
Sat Jul 2 20:24:57 2016, comment #20:

... with "won't fix" ?

Philip Nienhuis <philipnienhuis>
Project Member
Sat Jul 2 20:24:38 2016, comment #19:

AFAIK MSVC doesn't work anymore to build mxe-octave natively on Windows.
Shall we just close this report?

Philip Nienhuis <philipnienhuis>
Project Member
Thu Feb 5 02:43:54 2015, comment #18:

@Philip: The mailing lists are extremely flaky right now. Try using -unavailable- rather than @octave.org. It seemed to help for me.

Rik <rik5>
Project Administrator
Wed Feb 4 22:06:04 2015, comment #17:

Sure there are probably loads of hard to reconcile build environments installed side-by-side on many dev systems.

As Michael G pointed out, MSVC is especially creepy as it is detected through the Windows registry rather than being in the PATH or so. Yet I wouldn't be surprised if there are configure checks that can access the Windows registry as well.

What's wrong with the mailing lists? I can't post anymore since a few days; using Nabble I can see my own posts and many many other posts with the banner "Not accepted by the mailing list yet"; and I get replies about:

Apologies for this, I just ask here as I can't seem to get anything posted now. Nothing gets through.

Philip Nienhuis <philipnienhuis>
Project Member
Wed Feb 4 20:35:00 2015, comment #16:

I'm cross compiling usually on Linux. Native Windows was just an exercise on can it be done :)

John Donoghue <lostbard>
Project Member
Wed Feb 4 19:10:57 2015, comment #15:

Only fractionally serious :) And thanks for implicitly confirming my summary that this is about building natively on Windows.

And I don't mean building on Windows at all, I meant the combination of trying to build with MXE / MinGW while having MSVC installed and detected by parts of the build...

I would say someone's Linux environment that has gcc and Intel icc and CUDA and ATLAS and clang all configured and mixed in together is also invalid.

I'm sure if someone is so motivated, they can figure out what parts of the environment are being detected and picked up by LAPACK and whatever other libraries this might affect. And it may end up just being a note like "here's what to take out of your PATH or environment to make this work".

Mike Miller <mtmiller>
Project Administrator
Wed Feb 4 19:01:05 2015, comment #14:

"invalid build environment" - don't say that too loud.

Some devs are still building natively on Windows, at least until recently (John D). I see no reason why that shouldn't be supported.
Perhaps the classdev developer (Michael G) is still building with MSVC... (the whole MSVC setup in MXE was his anyway)

Philip Nienhuis <philipnienhuis>
Project Member
Wed Feb 4 18:51:56 2015, comment #13:

This bug is about building Octave using the MXE build system on a Windows system that just happens to have MSVC installed, right?

We could easily just consider this an invalid build environment ;)

Lowering priority and setting to postponed since we have no way to test or do anything about this at the moment. Also any official Octave binaries will almost certainly be cross-compiled for Windows on a Linux build host.

Mike Miller <mtmiller>
Project Administrator
Wed Feb 4 18:11:12 2015, comment #12:

On my build boxes I have no MSVC installed; at work (where I do have MSVC) I usually have no time for Octave development.
So all in all I can't test right now.

Anyway I think this bug report is about the MXE build system rather than Octave itself.

Philip Nienhuis <philipnienhuis>
Project Member
Wed Feb 4 04:23:38 2015, comment #11:

The last commentary on this bug was in July, 2013. Is this bug still relevant? I'm trying to find out which bugs may need to be fixed before the 4.0 release.

Rik <rik5>
Project Administrator
Wed Jul 10 19:58:00 2013, comment #10:

Oh, come on Philip, look further... ;)

It starts at line 50 in GNUtoMS.cmake (as of lapack-3.4.2): it looks for vcvars32.bat in PATH, then it looks into the registry. And that's your problem: even if VS tools are not in your PATH, this cmake script will still manage to detect your VS installation.

But apparently it doesn't work as expected. The cmake script should create a lib.bat wrapper (look into GNUtoMS subdir) that is supposed to setup VS tools, then call lib.exe. But it didn't work for you.

Michael Goffioul <goffioul>
Project Member
Wed Jul 10 19:26:44 2013, comment #9:

@John D: MSVC is installed on that particular Win 7 box.

Today I had a few minutes to peek there at GNUtoMS.cmake (& other files in that subdir) but it gave me no clue how it pulls in MSVC (but that's obviously my ignorance), nor how to avoid it.

In a private conversation with Michael G. I mentioned that the LAPACK README indicates that: "LAPACK can be installed with make. Configuration haev to be set in make.inc file. ..." (rest of spelling errors ignored)
...so maybe it's a better option to build LAPACK w/o invoking cmake.

FWIW, I remember that not so long ago a number of Linux distros had miscompiled LAPACK libs, and IIRC LAPACK could easily be rebuilt using plain configure-make-make install sequences.
(in that particular case it was just 3 or 4 modules that had to be rebuilt w/o optimization)

(re-titled OpenBLAS => LAPACK)

Philip Nienhuis <philipnienhuis>
Project Member
Wed Jul 10 00:44:03 2013, comment #8:

Is MSVC or anything outides of the mingw paths in your path variable?

John Donoghue <lostbard>
Project Member
Tue Jul 9 21:32:36 2013, comment #7:

Well, the cmake file I mentioned is part of LAPACK sources. OpenBLAS does not use cmake, BUT as part of the compilation process, it can generate an optimized LAPACK library. It does that by downloading regular LAPACK sources, patching them and compiling the library. If it uses cmake to compile LAPACK, then the problem will also occur. But nevertheless, the problem is still in LAPACK.

Michael Goffioul <goffioul>
Project Member
Tue Jul 9 20:36:42 2013, comment #6:

It's definitely not only LAPACK - the whole bug report was initiated because it started with identical issues with OpenBLAS.

But I'd agree it look like a cmake problem. Apparently cmake likes MSVC better than MinGW.
I'd suppose cmake can be instructed to choose alternative build tools.

I'm busy with other stuff now, maybe later on I can have a closer look at it.

Philip Nienhuis <philipnienhuis>
Project Member
Tue Jul 9 20:10:27 2013, comment #5:

Technically, those import libs are not needed by MinGW. I think it's a CMAKE problem only, and probably a LAPACK problem only.

Michael Goffioul <goffioul>
Project Member
Tue Jul 9 19:14:24 2013, comment #4:

That's what I suspected.

Is there a way to point to the MinGW build tools rather than VS?

Perhaps CMAKE/GNUtoMS.cmake needs to be patched depending on desired build tools?
(can't look now, it was on my machine at work - hopefully I have some time for it tomorrow).

Same for OpenBLAS, of course. And any other SW dependency package needed for the MXE builds that behaves the same ... (Qt?)

Philip Nienhuis <philipnienhuis>
Project Member
Tue Jul 9 13:47:48 2013, comment #3:

I think it's trying to use VS tools to generate the MSVC-compatible import library file (.lib). And it tries to do it, because it detected that VS was installed. If you look into CMAKE/GNUtoMS.cmake (inside lapack source tree), you should see what I mean.

Michael Goffioul <goffioul>
Project Member
Tue Jul 9 12:55:42 2013, comment #2:

Same happens for LAPACK (now with (plain) BLAS selected).

FYI, on this PC MSVC 2010 express is installed. Would configure pick that up automatically, rather than MinGW? If so, is there a configure setting to enable MSVC or MinGW selection?

Philip Nienhuis <philipnienhuis>
Project Member
Tue Jul 9 12:48:28 2013, comment #1:

FYI, what I ahve is:

$ hg summary
parent: 3125:0457ec42059e tip
dist-files.mk: add new patches for pstoedit

Philip Nienhuis <philipnienhuis>
Project Member
Tue Jul 9 12:38:27 2013, original submission:

Native build of MXE-Octve w --enable-openblas give this in the LAPACK build log:

Philip Nienhuis <philipnienhuis>
Project Member


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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by lostbard (Posted a comment)
  • -unavailable- added by goffioul (Posted a comment)
  • -unavailable- added by philipnienhuis (Submitted the item)
  • -unavailable- added by philipnienhuis

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

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Jul 3 07:43:59 2016philipnienhuisStatusPostponed=>Wont Fix
    Sat Jul 2 21:11:50 2016rik5Severity4 - Important=>1 - Wish
    Fri Jul 1 17:23:02 2016rik5Severity2 - Minor=>4 - Important
    Wed Feb 4 18:51:56 2015mtmillerSeverity3 - Normal=>2 - Minor
      Priority5 - Normal=>3 - Low
      StatusNeed Info=>Postponed
    Wed Feb 4 04:23:38 2015rik5StatusNone=>Need Info
    Wed Jul 10 19:26:44 2013philipnienhuisCategoryNone=>Configuration and Build System
      SummaryMXE-Octave: Openblas build mixes MinGW and MSVC=>MXE-Octave: LAPACK build mixes MinGW and MSVC
    Tue Jul 9 12:38:27 2013philipnienhuisCarbon-Copy-=>Added goffioul

    Back to the top

    Powered by Savane 3.1-cleanup