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: Tatsuro MATSUOKA
Subject: Re: Building PyTave on windows - cygwin
Date: Tue, 21 Jun 2016 13:42:55 +0900 (JST)

----- Original Message -----

> From: Tatsuro MATSUOKA 
> To: Abhinav Tripathi 
> Cc: "Octave-maintainers "mtmiller
> Date: 2016/6/21, Tue 07:55
> Subject: Re: Building PyTave on windows - cygwin
> 
> ----- Original Message -----
>> From: Abhinav Tripathi 
>> To: Tatsuro MATSUOKA 
>> Cc: "Octave-maintainers "mtmiller
>> Date: 2016/6/21, Tue 06:04
>> Subject: Re: Building PyTave on windows - cygwin
>> 
>> 
>> I am doing exactly same as Tatsuro said:
>> ----------------
>> Open octave-cli.exe;
>> cd e:/boost_1_61_0
>> system bash
>> export PATH=$PATH:/c/msys64/usr/bin
>> ./bootstrap
>> ./b2 install --with-python --prefix=/e/boost_build                #I only 
> need libboost-python so --with-python
>> -------------------
>> But I get the error that pyconfig.h could not be found!
>> I have installed both python 2 and 3 into MSYS2.
>> Also, I tried setting CCFLAGS and LDFLAGS and even CPPFLAGS. But nothing 
> changed.
>> .
>> I've probably some problem with python installation.
>> .
>> On other note,
>> the error in ./configure in pytave has nothing to do with boost.. It is just 
> showing that it cannot link with octave!
>> Any suggestions for that?
>> .
>> Abhinav
>> 
> 
> 
> I have installed python 2.7 for windows using msi installer downloaded from 
> python official web site.
> (Default install directory C:\Python27)
> I remember that I observed that there are some access to the directory under 
> C:\Python27 in building boost.
> Perhaps this is related to my success to build boost on windows.
> 
> Tatsuro



Mike and Abhinav

I have tried pytave configure.

Preparation
1. octave 4.1.0+ for windows + msys2 + python2.7
2. The python 2.7 for windows is used download from python's official web.

 Note : The python 2.7 for windows has libpython27.a in C:\Python27\lib


Step
1. execute octave-cli for 4.1.0+

2. execute bash
>> cd D:\usr\Tatsu\program\Pytave\PytaveBuild\Pytave\build #goto build directory
>> system bash # execute bash embedded to octave


3. setting and configure

$ export PATH=$PATH:/c/msys64_gcc530/usr/bin:/c/Python27:/c/Python27/scripts 
#PATH setting for msys2 and python

$ export CPPFLAGS='-I/c/Python27/include 
-I/d/usr/Tatsu/program/Pytave\/PytaveBuild/boost/boost_1_16_inst/include'
$ export LDFLAGS='-L/c/Python27/libs 
-L/d/usr/Tatsu/program/Pytave/PytaveBuild/boost/boost_1_16_inst/libs'
$ ../pytave/configure LIBS='-Lc:/Python27/libs' \
> --prefix=/d/usr/Tatsu/program/Pytave/PytaveInst 
> --with-octave=/c/octave/octave-4.1.0plus.2016-06-08-08-23


Errors in configure

checking python extra libraries... Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

checking for python... /c/Python27/python
checking for a version of Python >= '2.1.0'... yes
checking for the distutils Python package... yes
checking for Python include path... -Ic:\Python27\include
checking for Python library path... -Lc:\Python27\Lib\config -lpython27
checking for Python site-packages path... c:\Python27\Lib\site-packages
checking python extra libraries... Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

checking python extra linking flags... None
checking consistency of all components of python development environment... no
configure: error: in `/d/usr/Tatsu/program/Pytave/PytaveBuild/Pytave/build':
configure: error:
  Could not link test program to Python. Maybe the main Python library has been
  installed in some non-standard library path. If so, pass it to configure,
  via the LIBS environment variable.
  Example: ./configure LIBS="-L/usr/non-standard-path/python/lib"
  ============================================================================
   ERROR!
   You probably have to install the development version of the Python package
   for your distribution.  The exact name of this package varies among them.
  ============================================================================

See `config.log' for more details

**************************************
config.log corresponding part


configure:5357: checking for python
configure:5375: found /c/Python27/python
configure:5387: result: /c/Python27/python
configure:5403: checking for a version of Python >= '2.1.0'
configure:5429: result: yes
configure:5460: checking for the distutils Python package
configure:5464: result: yes
configure:5478: checking for Python include path
configure:5494: result: -Ic:\Python27\include
configure:5501: checking for Python library path
configure:5578: result: -Lc:\Python27\Lib\config -lpython27
configure:5585: checking for Python site-packages path
configure:5591: result: c:\Python27\Lib\site-packages
configure:5598: checking python extra libraries
configure:5605: result: 
configure:5612: checking python extra linking flags
configure:5619: result: None
configure:5626: checking consistency of all components of python development 
environment
configure:5654: gcc -std=gnu11 -o conftest.exe -g -O2 -I/c/Python27/include 
-I/d/usr/Tatsu/program/Pytave\/PytaveBuild/boost/boost_1_16_inst/include 
-Ic:\Python27\include -L/c/Python27/libs 
-L/d/usr/Tatsu/program/Pytave/PytaveBuild/boost/boost_1_16_inst/libs  
conftest.c -Lc:/Python27/libs -Lc:\Python27\Lib\config -lpython27 None None >&5
gcc.exe: error: None: No such file or directory
gcc.exe: error: None: No such file or directory
configure:5654: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "pytave"
| #define PACKAGE_TARNAME "pytave"
| #define PACKAGE_VERSION "dev"
| #define PACKAGE_STRING "pytave dev"
| #define PACKAGE_BUGREPORT "https://bitbucket.org/mtmiller/pytave/issues";
| #define PACKAGE_URL ""
| #define HAVE_OCTAVE 1
| #define OCTAVE_INCLUDEDIR 
"C:\octave\octave-4.1.0plus.2016-06-08-08-23\include\octave-4.1.0+"
| #define OCTAVE_LIBRARYDIR 
"C:\octave\octave-4.1.0plus.2016-06-08-08-23\lib\octave\4.1.0+"
| #define HAVE_PYTHON "27"
| /* end confdefs.h.  */
| 
| #include <Python.h>
| int
| main ()
| {
| Py_Initialize();
|   ;
|   return 0;
| }
| 
configure:5672: result: no
configure:5676: error: in 
`/d/usr/Tatsu/program/Pytave/PytaveBuild/Pytave/build':
configure:5678: error: 
  Could not link test program to Python. Maybe the main Python library has been
  installed in some non-standard library path. If so, pass it to configure,
  via the LIBS environment variable.
  Example: ./configure LIBS="-L/usr/non-standard-path/python/lib"
  ============================================================================
   ERROR!
   You probably have to install the development version of the Python package
   for your distribution.  The exact name of this package varies among them.
  ============================================================================



******************************************

As error message suggested, I set LIBS='-Lc:/Python27/libs'
However, that seems not to be detected.

configure:5612: checking python extra linking flags
configure:5619: result: None

Any suggestions?

Tatsuro



reply via email to

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