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 09 Jul 2013 12:38:27 PM UTC  
 
Category: Configuration and Build SystemSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Build Failure
Status: NoneAssigned to: None
Originator Name: Philip NienhuisOpen/Closed: Open
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)

Wed 10 Jul 2013 07:58:00 PM UTC, 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 10 Jul 2013 07:26:44 PM UTC, 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 10 Jul 2013 12:44:03 AM UTC, comment #8:

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

John Donoghue <lostbard>
Project Member
Tue 09 Jul 2013 09:32:36 PM UTC, 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 09 Jul 2013 08:36:42 PM UTC, 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 09 Jul 2013 08:10:27 PM UTC, 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 09 Jul 2013 07:14:24 PM UTC, 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 09 Jul 2013 01:47:48 PM UTC, 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 09 Jul 2013 12:55:42 PM UTC, 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 09 Jul 2013 12:48:28 PM UTC, 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 09 Jul 2013 12:38:27 PM UTC, 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):
   
   
Comment:
   

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 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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 10 Jul 2013 07:26:44 PM UTCphilipnienhuisCategoryNone=>Configuration and Build System
      SummaryMXE-Octave: Openblas build mixes MinGW and MSVC=>MXE-Octave: LAPACK build mixes MinGW and MSVC
    Tue 09 Jul 2013 12:38:27 PM UTCphilipnienhuisCarbon-Copy-=>Added goffioul

    Back to the top


    Powered by Savane 3.1-cleanup