bugGNU Octave - Bugs: bug #40321, MXE / MinGW - mkoctfile fails...

 
 

bug #40321: MXE / MinGW - mkoctfile fails (& doesn't pick up compile flags)

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Sun 20 Oct 2013 11:00:14 PM UTC  
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  John Donoghue <lostbard>
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)

Sun 27 Oct 2013 08:52:31 PM UTC, comment #7: 

Works OK now. All OF packages I have in my (mxe) src/build_packages.m script install fine. I consider this bug fixed.

BTW I wouldn't have expected the fix to be in configure; last week when I had time I was trying to follow what happened in the src/mkoctfile* stuff.

Many thanks for fixing!

As to the PATH / batch file issue, see my comments on bug #40381. I think that is a more appropriate "bug" for it.

(Closing this bug report)

Philip Nienhuis <philipnienhuis>
Project Member
Sun 27 Oct 2013 12:58:58 PM UTC, comment #6: 

WIth a .bat file that spawns octave (setting path to include /bin just before hand), mkoctfile works.

I pushed the changeset: http://hg.savannah.gnu.org/hgweb/octave/rev/4dcbbfaa4e22

John Donoghue <lostbard>
Project MemberIn charge of this item.
Sun 27 Oct 2013 12:11:31 PM UTC, comment #5: 

With patch, trying to run:

>> mkoctfile -d helloworld.cc
'g++' is not recognized as an internal or external command,
operable program or batch file.
'g++' is not recognized as an internal or external command,
operable program or batch file.
g++ -c -I/home/jade/mxe-octave/usr/i686-pc-mingw32/include  -IC:\octave-2013-10-26-21-36\include\octave-3.
7.7+\octave\.. -IC:\octave-2013-10-26-21-36\include\octave-3.7.7+\octave -IC:\octave-2013-10-26-21-36\incl
ude -mieee-fp -I/home/jade/mxe-octave/usr/i686-pc-mingw32/include -I/home/jade/mxe-octave/usr/i686-pc-ming
w32/include/freetype2 -I/home/jade/mxe-octave/usr/i686-pc-mingw32/include  -I/home/jade/mxe-octave/usr/i68
6-pc-mingw32/include  -g -O2 -pthread    helloworld.cc -o helloworld.o
g++ -shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc  -o hellow
orld.oct  helloworld.o   -LC:\octave-2013-10-26-21-36\lib\octave\3.7.7+ -LC:\octave-2013-10-26-21-36\lib -
loctinterp -loctave
warning: mkoctfile exited with failure status
>>

And in the bin folder:

>> pwd
ans = C:\octave-2013-10-26-21-36\bin
>> mkoctfile -d C:\Users\jdonoghue\helloworld.cc
g++: error: CreateProcess: No such file or directory
g++: error: helloworld.o: No such file or directory
g++ -c -I/home/jade/mxe-octave/usr/i686-pc-mingw32/include  -IC:\octave-2013-10-26-21-36\include\octave-3.
7.7+\octave\.. -IC:\octave-2013-10-26-21-36\include\octave-3.7.7+\octave -IC:\octave-2013-10-26-21-36\incl
ude -mieee-fp -I/home/jade/mxe-octave/usr/i686-pc-mingw32/include -I/home/jade/mxe-octave/usr/i686-pc-ming
w32/include/freetype2 -I/home/jade/mxe-octave/usr/i686-pc-mingw32/include  -I/home/jade/mxe-octave/usr/i68
6-pc-mingw32/include  -g -O2 -pthread    C:\Users\jdonoghue\helloworld.cc -o helloworld.o
g++ -shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc  -o hellow
orld.oct  helloworld.o   -LC:\octave-2013-10-26-21-36\lib\octave\3.7.7+ -LC:\octave-2013-10-26-21-36\lib -
loctinterp -loctave
warning: mkoctfile exited with failure status
>>

My path:

>> getenv('PATH')
ans = C:\Program Files\TortoiseHg\;C:\mingw\MiKTeX 2.9\miktex\bin\x64\
>>

I am running octave directly from the octave.exe - it needs to run via script that sets the path instead?

John Donoghue <lostbard>
Project MemberIn charge of this item.
Sun 27 Oct 2013 02:18:01 AM UTC, comment #4: 

That patch fixes it in terms of CXX etc being defined - patch reattached with patch comments etc.

The next issue I have on my system is that when running octave in ming GUI, it doesnt seem to have any paths except the current path.

For example mkoctfile testfile.cc in the installed octave directort/bin runs g++ ok.
If not in the bin directory, it cant find the  g++ executable.

(file #29483)

John Donoghue <lostbard>
Project MemberIn charge of this item.
Sat 26 Oct 2013 11:39:44 PM UTC, comment #3: 

I think I have  found the issue - compiling now to verify.
Uncommented patch attached.

(file #29482)

John Donoghue <lostbard>
Project MemberIn charge of this item.
Sat 26 Oct 2013 03:51:09 PM UTC, comment #2: 

I just did a clean build of mxe, with octave 3.7.7+ (as of last night) and see the same issue with mkoctfile.

John Donoghue <lostbard>
Project MemberIn charge of this item.
Thu 24 Oct 2013 09:03:19 PM UTC, comment #1: 

Swapping mkoctile.exe & mkoctfile-3.7.7+.exe (on Windows essentially the same files) from an older 3.7.7+ Octave makes it work again.
In the mercurial file log for mkoctfile.in.* I see nothing that may have caused this issue.

Philip Nienhuis <philipnienhuis>
Project Member
Sun 20 Oct 2013 11:00:14 PM UTC, original submission:  

Since a few days mkoctfile doesn't work anymore in my MXE/MinGW builds cross-compiled from Linux.
I confirmed this with an MXE tip & Octave tip both cloned this morning (Oct 20), to eliminate interference of stale build parts lying around (as was the case with bug #40301).

mkoctfile still worked with MXE-cross-built Octave based on sources of October 16 (I can't check the hg id anymore as I've updated & even wiped + refreshed my local repo before I noted this issue, and AFAIK in Octave builds there's no trace of the hg id it is based on).

What I see is this:

>> mkoctfile cell2csv.cc
mkoctfile: no way to compile C++ file cell2csv.cc
warning: mkoctfile exited with failure status

I could track it down to mkoctfile not picking up the CXX flag:

>> mkoctfile -p CXX

>>

Setting this flag in the environment before starting up Octave with "set CXX=g++" (easily done in a batch file) I get:

>> mkoctfile -p CXX
g++
>> mkoctfile cell2csv.cc
'-shared' is not recognized as an internal or external command,
operable program or batch file.
warning: mkoctfile exited with failure status
>>

..so mkoctfile apparently lacks more flags.

Looking in the on-line repo I recognize no changesets that could explain this.

Philip Nienhuis <philipnienhuis>
Project Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #29483:  bug40321-fix.patch added by lostbard (2KiB - text/x-patch)
file #29482:  octave-1-fixes.patch added by lostbard (1KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by rik5 (Updated the item)
  • -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 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-10-27 philipnienhuis StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2013-10-27 lostbard StatusIn Progress => Ready For Test
    2013-10-27 lostbard Attached File- => Added bug40321-fix.patch, #29483
    2013-10-26 lostbard Item GroupNone => Build Failure
        StatusConfirmed => In Progress
        Assigned toNone => lostbard
    2013-10-26 lostbard Attached File- => Added octave-1-fixes.patch, #29482
    2013-10-26 rik5 StatusNone => Confirmed
    2013-10-24 rik5 CategoryOctave Function => Configuration and Build System

    Back to the top


    Powered by Savane 3.5