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: Thu, 16 Jun 2016 02:08:35 +0530


Perhaps this is due to mix of the msys (inside octave) and msys2 (outside octave).

Sorry for not mentioning this but actually I'm using the msys2 shell for now. I tried doing this from octave shell but it neither has 'pacman' nor I could get a few things to work. So, for the time being I thought to try out MSYS2 only.
 

Second workaround is to add also LDFLAGS like
CPPFLAGS='-IE:/octave_dev/include/octave-4.1.0+ -IE:/octave_dev/include/octave-4.1.0+/octave' \
LDFLAGS='-L/e/ocgtave_dev/lib' \
./configure --with-octave=/e/octave_dev

(It may be required other -L<some lib dir> flag in LDFLAGS.)

I tried that too. It doesn't seem to be a problem of library path though. somehow grep and sed are finding it in some weird directory.
 

Well, I did the configure with the following:

$ CPPFLAGS='-I/e/octave_dev/include/octave-4.1.0+ -I/e/octave_dev/include/octave-4.1.0+/octave' LDFLAGS=-L/e/octave_dev/lib/octave/4.1.0+ ./configure --with-octave=/e/octave_dev


Also, after that the compiling part is okay done. But linking still fails. I tried all sorts of things in the 'Makefile' created by configure. But, nothing seems to work. And I am too inexperienced with makefile to do much.
Following is the ouput of make:
------------------------------
$ make
make  all-am
make[1]: Entering directory '/e/My_Repos/pytave'
/bin/sh ./libtool  --tag=CXX   --mode=link g++ -std=gnu++11  -g -O2 -module -LE:\octave_dev\lib\octave\4.1.0+ -L/e/octave_dev/lib/octave/4.1.0+ -o _pytave.la -rpath /../invalidpath _pytave_la-pytave.lo libpytave.la -lboost_python -loctinterp -loctave
libtool: warning: library 'E:\octave_dev\lib\octave\4.1.0+/liboctinterp.la' was moved.
/usr/bin/grep: /usr/lib/octave/4.1.0+/liboctave.la: No such file or directory
/usr/bin/sed: can't read /usr/lib/octave/4.1.0+/liboctave.la: No such file or directory
libtool:   error: '/usr/lib/octave/4.1.0+/liboctave.la' is not a valid libtool archive
make[1]: *** [Makefile:576: _pytave.la] Error 1
make[1]: Leaving directory '/e/My_Repos/pytave'
make: *** [Makefile:476: all] Error 2
-------------------------------

Probably Mike could help (Assuming that the Makefile part of pytave was written by him).. Why are grep and sed being called at the linker stage? At what place in the Makefile.am (or any other m4 file) are they called? What are they supposed to do? Any suggestion to overwrite the directory they are searching in?
.
Abhinav

On Wed, Jun 15, 2016 at 3:34 PM, Tatsuro MATSUOKA <address@hidden> wrote:
----- Original Message -----
>From: Abhinav Tripathi 
>To: Tatsuro MATSUOKA  
>Cc: "Octave-maintainers; Colin Macdonald ; Mike Miller 
>Date: 2016/6/15, Wed 16:23
>Subject: Re: Building PyTave on windows - cygwin
>
>
>
>On Jun 15, 2016 4:20 AM, "Tatsuro MATSUOKA" <address@hidden> wrote:
>> How about set CPPFLAGS and environment variables before configure?  
>>
>> CPPFLAGS='-IE:/octave_dev/include/octave-4.1.0+ -IE:/octave_dev/include/octave-4.1.0+/octave' \
>> ./configure --with-octave=/e/octave_dev
>>
>>
>> Tatsuro
>Thanks, setting CPPFLAGS added extra flags to compiler and the compilation passed. But, we would probably need a more generic solution.
>I tried replacing all '\' by '/' in the variable in the makefile but it didn't work. I've very little experience with makefiles and I got some weird errors about the variable not been defined!!
>Although I left that to be dealt later as the compilation is successful now.
>.
>But the linking step fails now.
>It calls grep then sed and then:
>It somehow gives a warning that the library file have been moved (which is present in /e/octave_dev/lib/octave/4.1.0+/)
>And tries to use it from /usr/lib/octave/4.1.0+!!
>But the library files are actually present in the previous directory only and not in /usr/lib
>(I can't paste the output now, I'll paste it in the evening if the problem still persists)
>.
>I'm trying to see where grep/sed are called. Or where is the library being searched in /usr/lib...
>Any suggestions?
>.
>Abhinav
>
Perhaps this is due to mix of the msys (inside octave) and msys2 (outside octave).
For octave build, the external libraries are only JAVA related things and their include files and
libraries  can be set in configure option like


../octave/configure --prefix=/c/usr/Tatsu/program/Octave/octaveBuild/4.1.0+/usr/local \
--disable-docs \
--with-java-homedir=/c/Program\ Files\ \(x86\)/Java/jdk1.8.0_91/bin \
--with-java-includedir=/c/Program\ Files\ \(x86\)/Java/jdk1.8.0_91/include \
--with-java-libdir=/c/Program\ Files\ \(x86\)/Java/jdk1.8.0_91/lib 

However the above can be used only for octave itself case.

 
At this moment, it is better to find compromising points to go further.


Second workaround is to add also LDFLAGS like

CPPFLAGS='-IE:/octave_dev/include/octave-4.1.0+ -IE:/octave_dev/include/octave-4.1.0+/octave' \
LDFLAGS='-L/e/ocgtave_dev/lib' \
./configure --with-octave=/e/octave_dev


(It may be required other -L<some lib dir> flag in LDFLAGS.)

We have to construct msys2 based system and
it also use config tools, include files and libraries in the octave directories.
(bin, include and lib)
I am at the moment very occupied with the jobs of my University so that
I cannot take the time for arrange better build environments.


Tatsuro



reply via email to

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