octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building PyTave on windows - cygwin


From: Abhinav Tripathi
Subject: Re: Building PyTave on windows - cygwin
Date: Tue, 14 Jun 2016 22:49:12 +0530

 
For consistency reason, please use MinGW 64 installed in octave/bin directory.
You should not install gcc tool chains of msys2

Thanks.
 
To use MinGW gcc inside octave start Msys (not msys2) bash from octave prompt

1. Start octave (both gui or cli are OK.) 
2. Start msys bash embedded on octave (Note not msys2!)  from octave prompt
 >> system bash  
 
 You will see bash prompt
 bash-3.1$  
3. export path from bash


$ export PATH=$PATH:/c/msys64/usr/bin 

The above is required to use msys2 tools from msys embedded octave. 
Path name should be changed if you install msys2 some other places.
If you use extra tools that should be placed under the path, you can add it.

Thanks for the steps but, it would mean using msys2 tools... So, when PyTave will be packages and installed (maybe via 'pkg install -forge') then we would assume msys2 to be present at the user's PC! But, octave only has msys.. Or, is it like if we can build using msys2 then we can adapt it to build using msys?

  
>2) While building on MSYS2, should I prefer calling .exe files or linux executables of the same program (python.exe or python)?

Msys and msys2 have specific executable files that understand unixy path /usr/local/ 
While *native* windows  program does not understand such path names. It uses windows specific path like C:\octave\ (C:/octave/).
Octave for windows itself is native   

There two different python binaries on msys2. 
Msys2 specific python and windows native (mingw 64) python.
This is very complicated situations.

Msys2 specific python binaries are prepared for building unixy program that require python on build process.

Windows native (mingw64) python  binaries are prepare for native use on windows.


If you need python for building, install msys2 python from msys2 prompt

In msys2 directory there are three terminal startup program for batch files.
 1. msys2   
 2. mingw64 (use this if you use 64 bit program)
 3. mingw32 (use this if you use 32 bit program)

If you want install python on msys2 start msys2 prompt and execute
pacman -S python2
pacman -S python3 # if required.


Thanks for this explaination. Really helped. Just 1 question, 'python-dev' is not present for msys2 (atleast via pacman). '/usr/include' or '/usr/local/include' don't have the python headers either after doing both 'pacman -S python2' and 'pacman -S python3'.
I found that /mingw64/include has all the python headers that I need and used it instead
Will it be a good idea to build python from source on msys2 or simply use the one on mingw64? 
  
>3) PyTave has libboost-python as dependency. Should I build boost on windows (from source) and then use it somehow on MSYS2 or should I build boost from source on the unixy environment of MYSY2?

I do not know libboost and libboost-python so that I cannot give you correct advises.

I checked packages of Msys2[a] and Mingw64[b] 
[a] https://github.com/Alexpux/MSYS2-packages
[b] https://github.com/Alexpux/MINGW-packages

It seem that Mingw have boost

To install mingw boost execute on msys2  
$ pacman -S  mingw64/mingw-w64-x86_64-boost # 64 bit
( $ pacman -S  mingw32/mingw-w64-i686-boost # 32 bit )

This saved me a lot of trouble. Thanks.
After doing this, to make libboost-python to work I had to rename a few dlls and library files (*.a and *.dll) because they weirdly had '-mt' appended to their name and didn't work because of that... 
 
See:
https://sourceforge.net/p/msys2/discussion/general/thread/13a5c241/


If you need build boost on windows with msys2
please refer
https://github.com/gtorrent/gtorrent-core/wiki/Building-on-Windows


Great... Thanks a lot for all the help. It really saved a lot of time...
.
Regards,
Abhinav

reply via email to

[Prev in Thread] Current Thread [Next in Thread]