bugGNU Octave - Bugs: bug #45082, [mxe-octave] Windows native build...

 
 

bug #45082: [mxe-octave] Windows native build fails at gmp

Submitter:  Tatsuro MATSUOKA <tmacchant>
Submitted:  Tue 12 May 2015 08:46:55 AM UTC
   
 
Category:  Configuration and Build System Severity:  2 - Minor
Priority:  3 - Low Item Group:  Build Failure
Status:  Wont Fix Assigned to:  None
Originator Name:  Tatsuro MATSUOKA Open/Closed:  * Closed
Release:  * dev Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 23 Oct 2022 05:10:11 PM UTC, comment #25: 

We are using MXE Octave mainly to cross-build on Linux for Windows.
People interested in building Octave natively on Windows could check using the native build environments of MSYS2.

Closing as won't fix. But anyone that is still interested on using MXE Octave natively on Windows is welcome to investigate.

Markus Mützel <mmuetzel>
Group administrator
Mon 31 Dec 2018 02:16:30 AM UTC, comment #24: 

Just noting that this is low priority and won't be fixed for Octave 5.0.

Rik <rik5>
Group administrator
Wed 20 Sep 2017 03:02:22 PM UTC, comment #23: 

Would being able to build a native octave (or mxe-octave) from an existing install of mxe-octave be of use?

At least at that point, we will know what versions of dev tools will be in use

John Donoghue <lostbard>
Group Member
Sat 02 Jul 2016 02:33:19 AM UTC, comment #22: 

I've lowered the severity and updated the title for clarity.

I think we're in agreement that the best supported ways of building Octave for Windows are either mxe-octave cross-build from GNU/Linux or Cygwin. But I think it's still a desired goal to support native building on Windows with mxe-octave and mingw.

Mike Miller <mtmiller>
Group Member
Sat 02 Jul 2016 02:05:24 AM UTC, comment #21: 

Ive never tried compiling for cygwin - just assuming it works ok and doesnt fall under the "gmp under native windows"

John Donoghue <lostbard>
Group Member
Fri 01 Jul 2016 11:54:37 PM UTC, comment #20: 


> The normal method of compiling octave for windows would be mxe-octave, perhaps also Cygwin.


What do you mean by terms of "perhaps also Cygwin"? The Cygwin binary is build on the Cygwin environments using usual unixy tools and libraries by Marco Atzeri.

Tatsuro MATSUOKA <tmacchant>
Fri 01 Jul 2016 11:49:25 PM UTC, comment #19: 

This is a case of native build on Windows.
I now think that the title is better to be changed to.

*******************************************
mxe native build fails at gmp on native windows
*******************************************

Rik raised Severity of this issue from 3 to 4.
I do not think that it is necessary because released version of windows binary is produced on linux but not native windows.

Tatsuro MATSUOKA <tmacchant>
Fri 01 Jul 2016 07:56:06 PM UTC, comment #18: 

Priority for this can be lowered I think (unless someone else disagrees)

The normal method of compiling octave for windows would be mxe-octave, perhaps also Cygwin.


John Donoghue <lostbard>
Group Member
Wed 17 Jun 2015 07:53:36 PM UTC, comment #17: 

I got a msys2 32bit version to compile and paushed some changes up to mxe.

Running a 64 bit version, so far, I have seen a couple of issues - most being the same problem, which I think is the issues you were seeing comment #16.

libicon, build-texinfo fail with an unknown build type  - copying config.guess and config.sub from the mxe-octave tools folder to  the correct build-aux folders in the failing packages appears to fix the issue.

 

John Donoghue <lostbard>
Group Member
Thu 11 Jun 2015 10:27:10 PM UTC, comment #16: 

I have made a mistake. The packages in which build detection failed are texinfo and libiconv.

> build-pkg-config worked for me - haven't gotten to pkg-config yet.


I have gotten pkg-config.

Tatsuro MATSUOKA <tmacchant>
Thu 11 Jun 2015 09:31:53 PM UTC, comment #15: 

Theoretically what you said is quite right.
I am using 64 bit version msys2 because it can be used both mingw32 and mingw64 using corresponding start up batch file. I am gnuplot a binary provider and build dependency libraries msys2(64bit). Sometimes build detection does not work irrelevant to 32bit or 64bit.

Anyway I manually add build and host option when configure miss to detect build and host.

Tatsuro MATSUOKA <tmacchant>
Thu 11 Jun 2015 01:50:17 PM UTC, comment #14: 

build and host tell it information for cross compile, and shouldn't be needed for native compile.

build-pkg-config worked for me - haven't gotten to pkg-config yet.

libiconv worked for me.

I am using msys2 32bit, and running the Mingw-w64 win32 script to run msys.

John Donoghue <lostbard>
Group Member
Thu 11 Jun 2015 11:00:19 AM UTC, comment #13: 

At least pkg-config and iconv failed build system guess:


checking build system type... build-aux/config.guess: unable to guess system type


For native build --build and --host option hopefully specified to avoid this kind of bug.

Tatsuro MATSUOKA <tmacchant>
Wed 10 Jun 2015 11:31:41 PM UTC, comment #12: 

I have a few fixes I will push up for msys build when I get a successful build.

Currently, I needed to do some changes to lapack and gnutls

John Donoghue <lostbard>
Group Member
Wed 10 Jun 2015 11:07:47 AM UTC, comment #11: 

Thank you for your variable information.
I will try it after some changes in reference with your experience.



Tatsuro MATSUOKA <tmacchant>
Wed 10 Jun 2015 10:40:12 AM UTC, comment #10: 

msys2 seems to have a number of issues come up - i didnt get it build mxe allthe way yet myself, but noticed:

What i had found so far:
- I had to uninstall the msys libtool
- installing gcc doesnt work - it needed mingw-w64-i686-gcc, mingw-w64-i686-fortran
- I had to install python2 (I had installed python, which appears to install python 3) and make a copy python2.exe to python.exe
- I installed also autoconf wget patch perl vim  make
unzip automake bison

As of yet, I didnt get it to fully build yet.

I did manage to compile the octave sources yesterday from within the octave install. So will be pushing some changes to support that.

John Donoghue <lostbard>
Group Member
Wed 10 Jun 2015 06:01:21 AM UTC, comment #9: 

I have prepared another note PC (core-i5 win 8.1)
to try mxe native build.

This time the tool-kits are msys2+mingw32 (gcc-4.9.2 rt3 win32 thread, dwarf) (MinGW-w64).


cd /c/usr/Tatsu/msys2_mingw32/mxe-octave32
hg clone http://hg.octave.org/mxe-octave/

export PATH=$PWD:/c/msys64/usr/bin:$PATH
export MXE_NATIVE_MINGW_BUILD='yes'
export MXE_SYSTEM='mingw'

cd /c/usr/Tatsu/msys2_mingw32/mxe-octave32/mxe-octave
autoconf
./configure --disable-system-fontconfig --enable-native-build  --enable-jit --enable-java

source tools/set-mxe-env.sh
make tar-dist


Failed to build package build-pkg-config!

I looked into log/build-pkg-config.


C:/usr/Tatsu/msys2_mingw32/mxe-octave32/mxe-octave/tmp-build-pkg-config/pkg-config-0.28/main.c:290:24: warning: unknown escape sequence: '\/'
C:/usr/Tatsu/msys2_mingw32/mxe-octave32/mxe-octave/tmp-build-pkg-config/pkg-config-0.28/main.c:290:24: warning: unknown escape sequence: '\/'
C:/usr/Tatsu/msys2_mingw32/mxe-octave32/mxe-octave/tmp-build-pkg-config/pkg-config-0.28/main.c:290:24: warning: unknown escape sequence: '\/'
C:/usr/Tatsu/msys2_mingw32/mxe-octave32/mxe-octave/tmp-build-pkg-config/pkg-config-0.28/main.c:290:24: warning: unknown escape sequence: '\/'
C:/usr/Tatsu/msys2_mingw32/mxe-octave32/mxe-octave/tmp-build-pkg-config/pkg-config-0.28/main.c:290:24: warning: unknown escape sequence: '\/'
C:/usr/Tatsu/msys2_mingw32/mxe-octave32/mxe-octave/tmp-build-pkg-config/pkg-config-0.28/main.c:290:24: warning: unknown escape sequence: '\/'
C:/usr/Tatsu/msys2_mingw32/mxe-octave32/mxe-octave/tmp-build-pkg-config/pkg-config-0.28/main.c:290:24: warning: unknown escape sequence: '\/'
C:/usr/Tatsu/msys2_mingw32/mxe-octave32/mxe-octave/tmp-build-pkg-config/pkg-config-0.28/main.c:290:24: warning: unknown escape sequence: '\/'
  CCLD   pkg-config.exe
libtool: Version mismatch error.  This is libtool 2.4.2, but the
libtool: definition of this LT_INIT comes from libtool 2.4.6.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2
libtool: and run autoconf again.


The msys2 only ships libtool 2.4.6 but not 2.4.2.
Is there any way to avoid to install libtool 2.4.2?

If not I will install libtool 2.4.2 into appropriate directory and temporary make PATH to it.



Tatsuro MATSUOKA <tmacchant>
Mon 08 Jun 2015 12:34:31 PM UTC, comment #8: 

I remember some newer versions of packages breaking the build of native mxe.

I recently just tied msys2 as well, and see that depending on what packages are installed in msys2 will greatly effect how how in the mxe build you can get. So far, I haven't reached a full build of octave using it.

As an alternate method, I am looking at being able to compile octave natively from the installed mxe-octave, which from your comments below was one of the methods you also tried.

One of the immediate issues with build from installed mxe-octave that I see is that some of the 'tools' required to build octave are not supplied in the installer, which really only cares about supplying the required libraries etc to run octave.

To that end, I have added a --enable-devel-tools option to the mxe-octave configure script, with the plan to provide the option to include the tools required to build octave etc that are not needed by the normal user/installer.

The main missing files I have seen (so far) is the qt build tools (Linux tools are built for compiling cross octave, but windows binaries of uic, moc, rcc, lrelease are not)

I have a patch to include them, which I am testing out now.

John Donoghue <lostbard>
Group Member
Tue 02 Jun 2015 04:52:20 PM UTC, comment #7: 

Retagging release from 4.0.0-rc4 to 4.0.0.

John W. Eaton <jwe>
Group administrator
Mon 25 May 2015 12:58:40 AM UTC, comment #6: 

Sorry for late reply

> You were using the windows-64 enabled octave ?

No.
I did not use --enable-windows-64 flag for native build.

After gmp built I met a lot of difficulties. I have hacked the *.mk files or Makefile files but I could not accomplish the build.

Now I cannot use a fast windows 7 PC in my lab. (core i7 16Gbyte RAM),
I am now stopping the native build.

(Native build required a lot of time compared to cross build on Ubuntu  so I need to use a fast PC.)

Tatsuro MATSUOKA <tmacchant>
Fri 22 May 2015 10:31:53 AM UTC, comment #5: 

You were using the windows-64 enabled octave ?

John Donoghue <lostbard>
Group Member
Tue 12 May 2015 11:38:58 PM UTC, comment #4: 

I have made quick two hacks and gmp build was successful

hack 1 to the Makefile generated after mxe condfigure


--- a/Makefile    2015-05-12 14:00:52 +0900
+++ b/Makefile    2015-05-13 07:41:55 +0900
@@ -66,7 +66,7 @@
     TARGET := i686-w64-mingw32
   endif
 endif
-BUILD_SYSTEM := $(shell tools/config.guess)
+BUILD_SYSTEM := i686-w64-mingw32

 # Enable shared or static libs, or perhaps both.  Probably it doesn't
 # make sense to disable both...


second hack is for gmp mislead ad 64 bit mode so I hacked gmp.mk as:


--- a/src/gmp.mk  2015-05-12 13:47:23 +0900
+++ b/src/gmp.mk  2015-05-13 08:11:13 +0900
@@ -15,7 +15,7 @@
     $(PKG)_CONFIGURE_OPTIONS := CC_FOR_BUILD='$(MXE_CC)' CCAS='gcc -c' ac_cv_func_memset='yes'
     COMMA := ,
 else
-    $(PKG)_CONFIGURE_OPTIONS := CC_FOR_BUILD=gcc
+    $(PKG)_CONFIGURE_OPTIONS := CC_FOR_BUILD=gcc CFLAGS='-O2 -m32' CXXFLAGS='-O2 -m32'  ABI=32
 endif

 define $(PKG)_UPDATE


Of course, I know that the above are the temporal hacks.

Thanks for your attention

Tatsuro

Tatsuro MATSUOKA <tmacchant>
Tue 12 May 2015 10:56:50 PM UTC, comment #3: 

John

> Building of the compiler doesn't work in msys.
> Its been a while since I tried a compile in msys, but you used to be able to build octave, but it uses the system gcc.


I was successful to build windows version octave by mxe native build with your assistance.  I have used MinGW compiler but not msys compiler.  This time I tried to use MinGW compiler shipped with mxe-octave 4.0.0-rc4.


export PATH=$PWD:/c/MinGW/msys/1.0/bin:/c/Octave/Octave-4.0.0-rc4/bin:$PATH



> What config options did you pass to mxe-octave?


./configure --disable-system-fontconfig --enable-native-build --enable-octave=alpha --enable-jit --enable-java


My aim of native build this time is get complete environments to build octave in windows native environments. The mxe build delete seem to delete intermediate files like those in libgnu.

Tatsuro

Tatsuro MATSUOKA <tmacchant>
Tue 12 May 2015 02:41:14 PM UTC, comment #2: 

What config options did you pass to mxe-octave?

John Donoghue <lostbard>
Group Member
Tue 12 May 2015 02:02:54 PM UTC, comment #1: 

Building of the  compiler doesn't work in msys.

Its been a while since I tried a compile in msys, but you used to be able to build octave, but it uses the system gcc.



John Donoghue <lostbard>
Group Member
Tue 12 May 2015 08:46:55 AM UTC, original submission:  

I am trying to build mxe-octave on msys+mingw platform.
At building of gmp I have met :


Failed to build package gmp!
------------------------------------------------------------
no
checking compiler icc -no-gcc ... no
checking compiler cc -O ... no
configure: error: could not find a working compiler, see config.log for details
make[1]: *** [build-only-gmp] Error 1
make[1]: Leaving directory `/c/usr/Tatsu/octave_work/mxe-octave32/mxe-octave'
real    0m58.185s
user    0m9.126s
sys     0m44.086s
------------------------------------------------------------
[log]      /c/usr/Tatsu/octave_work/mxe-octave32/mxe-octave/log/gmp


config.log is attached

In the config.log

Configured with: /scratch/jwe/src/mxe-octave/tmp-native-gcc/gcc-4.9.2/configure --target=i686-w64-mingw32 --host=i686-w64-mingw32 --build=x86_64-unknown-linux-gnu --prefix=/scratch/jwe/src/mxe-octave/usr/i686-w64-mingw32 --enable-languages=c,c++,fortran --disable-multilib --disable-libsanitizer --enable-version-specific-runtime-libs --disable-nls --without-x --disable-win32-registry --with-native-system-header-dir=/scratch/jwe/src/mxe-octave/usr/i686-w64-mingw32/include --enable-threads=win32 --disable-sjlj-exceptions --enable-shared --disable-static --disable-libgomp --with-cloog=/scratch/jwe/src/mxe-octave/usr/i686-w64-mingw32 --with-gmp=/scratch/jwe/src/mxe-octave/usr/i686-w64-mingw32 --with-isl=/scratch/jwe/src/mxe-octave/usr/i686-w64-mingw32 --with-mpc=/scratch/jwe/src/mxe-octave/usr/i686-w64-mingw32 --with-mpfr=/scratch/jwe/src/mxe-octave/usr/i686-w64-mingw32


 --build=x86_64-unknown-linux-gnu

is strange for native build.

Please show me the way how to fix gmp.mk for native build.

Thanks in advance.

Tatsuro

Tatsuro MATSUOKA <tmacchant>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #33983:  config.log added by tmacchant (12KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by tmacchant (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 group members can vote.

     

    Follow 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-10-23 mmuetzel StatusPostponed Wont Fix
        Open/ClosedOpen Closed
    2017-09-06 mtmiller Summarymxe-octave: build fails at gmp on Windows native build [mxe-octave] Windows native build fails at gmp
    2016-07-02 rik5 Carbon-CopyRemoved 72865 -
    2016-07-02 mtmiller Severity4 - Important 2 - Minor
        Priority5 - Normal 3 - Low
        StatusNone Postponed
        Release4.0.0 dev
        Summarymxe native build fails at gmp mxe-octave: build fails at gmp on Windows native build
    2016-07-01 rik5 Severity3 - Normal 4 - Important
    2015-06-02 jwe Release4.0.0-rc4 4.0.0
    2015-05-12 tmacchant Attached File- Added config.log, #33983

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code