octave-maintainers
[Top][All Lists]
Advanced

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

Re: dirty but most simple method by which pkg install will be successful


From: Michael Goffioul
Subject: Re: dirty but most simple method by which pkg install will be successful in mingw octave
Date: Thu, 8 Nov 2007 11:36:52 +0100

On 11/8/07, Tatsuro MATSUOKA <address@hidden> wrote:
> Hello
>
> I am using the sh and  make on the msys. Perhaps John, Benjamin and David 
> know that the msys is the
> de-facto standard developing system for developing Unixy like software on the 
>  mingw. The pkg command
> requires sh shell and make. In the msys, the default file separator is '/' 
> not but '\'.
> I have been not able to overcome the problem around pkg for a long time.
>
> In the mkoctfile script produced during the octave building, the file 
> separator is '/' on mingw+msys.
> I think that using the msys system for the pkg install command is natural 
> because it uses configure
> script, make and mkoctfile with file separator '/'.
>
> Benjamin, don't you use the msys system for building mingw octave?
>
> I also think my method will be dangerous and should not to be used in the 
> future.
> So I used the word of 'dirty'.
>
> I wrote this thread as a caution the file separator problem in mingw system 
> is not a simple problem.
> Excuse me for my giving insufficient explanation.
> It is the best the to make the patch for pkg.m but it is not completed yet as 
> I wrote before.
> http://www.cae.wisc.edu/pipermail/octave-maintainers/2007-November/004714.html
>
>
> I the msys system, yesterday I aware that the double quoting path with '\' is 
> acceptable like
>
> $ ls "D:\usr\Tatsu\mingwhome"
> CXSparse/    MinGW.lnk      msys-1.0.lnk
>
> So that this will also be a clue to the solution.
>
>
> Without the double quoting, the result is
> $ ls D:\usr\Tatsu\mingwhome
> ls: D:usrTatsumingwhome: No such file or directory
>
> So that configure and make does not work without any modification in pkg 
> install command as long as
> msys is used.

Actually, backslash / forward slash problem is already taken into
account in pkg.m: I also use MSYS to compile octave-forge packages,
and basically pkg.m expects MSYS. The code of pkg.m has been
modified such that it executes its command through a shell (see
"shell" subfunction): in that function, any backslash is converted into
forward slash. So "configure" and "make" work normally. This is not
the problem here.

I compared my verbose output when compiling a package and I noticed
a difference in the "copyfile" call: the paths used only contain backslashes,
no forward slash:

copyfile C:\DOCUME~1\goffioul\LOCALS~1\Temp\oct-15\sockets-1.0.2\src\sockets.oct
C:\DOCUME~1\goffioul\LOCALS~1\Temp\oct-15\sockets
-1.0.2\inst\i686-pc-msdosmsvc-api-v26

What I suspect is that "cp.exe" (which I also use when compiling
octave-forge packages, and which is used internally by "copyfile")
cannot deal with mixed slashes in paths. It works for me, because it
only contains backslashes. The temporary dir used during compilation
is obtained from "tmpnam". For me, it returns a path with backslashes
only. What does it return for you?

Michael.


reply via email to

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