Changes

Jump to navigation Jump to search
957 bytes added ,  02:26, 3 August 2016
m
=== Using Msys2 ===
Tatsuro told to use [https://msys2.github.io/ msys2] , which aims to provide support to facilitate using the bash shell, autotools, revision control systems and the like for building native Windows applications using MinGW-w64 toolchains, for the job. He also suggested to use octave-4.0.2 as octave-4.0.0 was buggy on windows.
Later on he provided development version of octave that he built using octave itself (along with msys2). I started using that development version (4.1.0+) of octave. He also suggested the following steps after installing msys2 for the setup:
# [https://sourceforge.net/p/msys2/wiki/MSYS2%20installation/ Install Msys2 and update core and basics packages]
After installing boost too, the build was failing with errors related to boost libraries. I saw that the *.a and *.dll files had '-mt' appended to their name and didn't work because of that... Once I renamed them to remove the '-mt' then the configure could find the libs and finally the ''configure'' steps was successful with just one warning that 'uselocale' was not supported!
Now when I ran ''make'' then ''libtool'' weirdly escaped all the '\' characters in the paths for libraries found during the configure step. Ex "-IE:\octave_dev\include\octave-4.1.0+ -IE:\octave_dev\include\octave-4.1.0+/octave" was passed as "-IE:octave_devincludeoctave-4.1.0+ -IE:octave_devincludeoctave-4.1.0+/octave". I have no knowledge of how exactly the configure and m4 scripts co-ordinate the tasks and hence it was dificult difficult for me to find the cause for this. I tried to see how to change the default path separator but it didn't work.
Tatsuro told to use 'CPPFLAGS' to pass these directories during configure only. This worked and the ''make'' step moved past that point.
Now a new error arised, the Makefile was calling 'grep/sed' at some point which showed that the library file have been moved (which was present in /e/octave_dev/lib/octave/4.1.0+/) And then the script tries to use it from /usr/lib/octave/4.1.0+. But the library files were actually present in the previous directory only and not in /usr/lib. So, we passed 'LDFLAGS' along with 'CPPFLAGS' during configure. But the error persisted. Editing the last parte part of liboct*.la files to change the 'libdir' didn't work as well.
As per Mike's suggestion deleting the liboct*.la files helped and the ''make'' step moved even furthur. Now the errors showed some missing libraries (lapack, GraphickMagik, ...)
Since all these libraries were present along with octave so we added "/e/octave_dev/lib" to LDFLAGS too. Now the build went even furthurfurther. This time there were some C++11 errors. As per Mike's and Tatsuro's suggestions Octave uses 4.9.3 gcc on windows and gcc changed the library around version 5. Msys2 had GCC 5.4 which caused the errors. So, either pass all the gcc tools in octave_dev/bin to configure on MSYS2 or use octave's shell with MSYS2 on top of it.
At this point, I switched to using the bash shell present with octave.
=== Use MSYS2 on top of Octave's MSYS environment with help of msys2 toolchains === ==== Build boost_python ====When using the bash prompt from 'octave-cli.exe' we could not use the libboost-python that we used octave Msys environment with help of MSYS2. First thing we had to do to build boost-python from source. The steps I used to build boost are:
When using the bash prompt from 'octave-cli.exe' we could not use the libboost-python that we used with MSYS2, so we had to build boost from source using octave's msys tools.. The steps I used to build boost are:
# Open octave-cli.exe
# cd e:/boost_1_61_0
# ./b2 install --with-python --prefix=/e/boost_build
But I was getting some linking error At this moment building of boost-python with 64 bit tool chain fails at final link stage. So far octave-4. Tatsuro provided a 1.0+ 64 bit was used. From this point we shifted to using 32 bit version of octave that he had built. After this, I had to use install Using 32 bit Python and rebuild boostoctave 4.1.0+ for windows build of boost_python was successful. ==== Build Pytave ==== # Open octave-cli.exe# cd (Pytave build directoy)# system bash# export PATH=$PATH:/c/msys64/usr/bin# ./configure (with CPPFLAGS LDFLAGS setting )# make 
There was an error in configure that PYTHON_EXTRA_LIBS was 'None' on windows and hence the configure failed. As per Mike's suggestion I set it to a valid gcc flag for the time being with ''export $PYTHON_EXTRA_LIBS=-g''
After this too the build failed with undefined references to few symbols. Tatsuro suggested to build boost with ''link=static,shared''. He had successfully built boost with it but I could not build boost with this option on my PC.
To sum up, Tatsuro has built 32 bit version of octave and used it to build libboost-python with the option ''link=static,shared'' and has successfully got the configure step done. But in the ''make'' step he is getting some undefined symbol errors for ''__imp__'' symbols.
(This information is obtained from trials of out-of-box of linking object files. )
=== Summary ===
=== Conclusion ===
To With some efforts, build Pytave on windows has not been completed yet. Here list of unsolved issue including boost-python are listed  # libboost_python cannot be build be build on 64 bit environments# path separator handling issue in libtool (windows standard path separator \ (back slash) is ignored.# make fails at building shared library  For 3, to quote Tatsuro ''A lot of _imp__ symbols errors are detected because no _imp__(symbol)s exist in object files. While object files libboost_python for threading-multi have _imp__(symbol)s in their object files. Boost does not show full compiling states. Therefore I do not know what libboost is to do.''
I too have googled extensively but haven't gotten to any solution for this problem.

Navigation menu