bugGNU Octave - Bugs: bug #62090, Package installation fails with...

 
 

bug #62090: Package installation fails with spaces in path

Submitter:  Georg Wiora <gwiora>
Submitted:  Mon 21 Feb 2022 09:33:27 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Installation Failure
Status:  Fixed Assigned to:  None
Originator Name:  gwiora Open/Closed:  * Closed
Release:  * 7.0.90 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 27 Aug 2023 12:11:06 PM UTC, comment #28: 

I probably need to open a new bug report, but the issue with mkoctfile and spaces in back in dev octave for octave 9?

Running for pkg install -verbose -forge io


mkdir (C:\Users\johnd\AppData\Local\Temp\oct-upWcic)
untar (C:\Users\johnd\AppData\Local\Temp\io-2.6.4-8xuyXe.tar.gz, C:\Users\johnd\AppData\Local\Temp\oct-upWcic)
make: Entering directory '/tmp/oct-upWcic/io-2.6.4/src'
C:/Users/johnd/AppData/Local/Programs/GNU\ Octave/Octave-9.0.0/mingw64/bin/mkoctfile-9.0.0.exe --verbose csvexplode.cc
g++ -c -IC:\Users\johnd\AppData\Local\Programs\GNU Octave\Octave-9.0.0\mingw64/include  -I"C:\Users\johnd\AppData\Local\Programs\GNU Octave\Octave-9.0.0\mingw64\include\octave-9.0.0\octave\.." -I"C:\Users\johnd\AppData\Local\Programs\GNU Octave\Octave-9.0.0\mingw64\include\octave-9.0.0\octave" -I"C:\Users\johnd\AppData\Local\Programs\GNU Octave\Octave-9.0.0\mingw64\include"  -pthread -fopenmp -g -O2    csvexplode.cc -o C:\Users\johnd\AppData\Local\Temp/oct-MjCRUd.o
g++: warning: Octave\Octave-9.0.0\mingw64/include: linker input file unused because linking not done
g++: error: Octave\Octave-9.0.0\mingw64/include: linker input file not found: No such file or directory
make: *** [Makefile:6: csvexplode.oct] Error 1
make: Leaving directory '/tmp/oct-upWcic/io-2.6.4/src'
error: pkg: error running 'make' for the io package
error: called from
    configure_make at line 117 column 9
    install at line 202 column 7
    pkg at line 619 column 9
octave:4>


The CPPFLAGS part of mkoctfile is not quoted - in my case
-IC:\Users\johnd\AppData\Local\Programs\GNU Octave\Octave-9.0.0\mingw64/include


John Donoghue <lostbard>
Group Member
Mon 07 Mar 2022 10:00:36 AM UTC, comment #27: 

Thanks a lot. Also, for your help in tracking this down.

That probably means that it is working for this particular error.
If there are other errors (e.g., when installing to a path with spaces as opposed to Octave being installed in a path with spaces, or when installing a different package), new reports can be opened.

Closing as fixed.

Markus Mützel <mmuetzel>
Group administrator
Mon 07 Mar 2022 09:50:55 AM UTC, comment #26: 

Just tested it with a nightly build 7.0.91 (hg Id: f5587d651bc7) and it worked. Because the io package was preinstalled it is not removed before installation, and the new build is installed in

%appdata%\octave\api-v57\packages\io-2.6.4

The final path is

C:\Users\usergw.DOMAIN\AppData\Roaming\octave\api-v57\packages\io-2.6.4

Obviously this is a path without blanks.
Nevertheless there are a lot of include and other directory paths that are pointing to "c:\program files\...". All are correctly quoted and working.

I tried to install it with admin rights, but the installation went to the above directory.

I am not completely sure what this means as test result. At least I could install the package now. But I had no test case for an installation path with blanks. Maybe I should try another package that is not preinstalled.

Georg Wiora <gwiora>
Mon 07 Mar 2022 09:12:00 AM UTC, comment #25: 

@Georg: Could you please test if it works for you with an installation of a nightly build into your "Program Files" folder?

Not all systems are affected by this issue. So, we depend on users of affected systems to confirm if the fix actually works.

Markus Mützel <mmuetzel>
Group administrator
Fri 25 Feb 2022 02:46:17 PM UTC, comment #24: 

I pushed a slightly different change to the stable branch here:
https://hg.savannah.gnu.org/hgweb/octave/rev/e36380193f2b

Marking as ready for test.

The next nightly build (from tomorrow Feb 26 or later) by Kai's buildbots should be including that change. You could download it from here:
https://buildbot.octave.space/#/download

Markus Mützel <mmuetzel>
Group administrator
Fri 25 Feb 2022 10:06:19 AM UTC, comment #23: 

Oops. Hit the submit button too early on accident. I wanted to add:

Thanks for testing.
I'll clean that change up and will probably push it to the stable branch. So, this will be part of Octave 7.

Markus Mützel <mmuetzel>
Group administrator
Fri 25 Feb 2022 10:04:11 AM UTC, comment #22: 


> Fun fact: The installation is now performed locally even after reinstalling octave for "all users". Is this an intended behavior?


That has been changed a while ago for bug #44548 to align Windows with all other platforms.

I'm not sure what you mean though. Intended behavior is that packages are installed locally unless Octave is executed with elevated privileges or the user passes the "-global" switch explicitly. Locally installed packages are retained even if Octave is un-installed or re-installed.


Octave 6 is end-of-life already and will soon be superseded by Octave 7. We probably won't re-open development of Octave 6 for this change.

Markus Mützel <mmuetzel>
Group administrator
Fri 25 Feb 2022 09:52:47 AM UTC, comment #21: 

comment #20:

> Sorry. I wasn't specific enough.
>
> Please, try that file `configure_make.m` from comment #18 with the original (un-modified) io package.


SUCCESS :-)

Fun fact: The installation is now performed locally even after reinstalling octave for "all users". Is this an intended behavior?

C:\Users\user.DOMAIN\AppData\Roaming\octave\api-v57\packages\io-2.6.4


I will try if your fix is also valid for Version 6.4.

Georg Wiora <gwiora>
Fri 25 Feb 2022 09:28:23 AM UTC, comment #20: 

Sorry. I wasn't specific enough.

Please, try that file `configure_make.m` from comment #18 with the original (un-modified) io package.

Markus Mützel <mmuetzel>
Group administrator
Fri 25 Feb 2022 08:01:33 AM UTC, comment #19: 

Next trial... :-)


pkg install io-2.6.4-v2.tar.gz -verbose
mkdir (C:\Users\USERGW~1.DOM\AppData\Local\Temp\oct-8pT7z7)
untar (io-2.6.4-v2.tar.gz, C:\Users\USERGW~1.DOM\AppData\Local\Temp\oct-8pT7z7)
make: Entering directory '/c/Users/USERGW.DOMAIN/AppData/Local/Temp/oct-8pT7z7/io-2.6.4/src'
echo "C:/Program\ Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe --verbose" csvexplode.cc
C:/Program\ Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe --verbose csvexplode.cc
"C:/Program\ Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe --verbose" csvexplode.cc
/bin/sh: line 1: C:/Program\ Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe --verbose: No such file or directory
make: *** [Makefile:7: csvexplode.oct] Error 127
make: Leaving directory '/c/Users/USERGW.DOMAIN/AppData/Local/Temp/oct-8pT7z7/io-2.6.4/src'

error: pkg: error running 'make' for the io package
error: called from
    configure_make at line 116 column 9
    install at line 202 column 7
    pkg at line 603 column 9
stopped in install at line 210 [C:\Program Files\GNU Octave\Octave-7.0.90\mingw64\share\octave\7.0.90\m\pkg\private\install.m]
210:     rethrow (lasterror ());


Georg Wiora <gwiora>
Thu 24 Feb 2022 04:52:34 PM UTC, comment #18: 

I think we are getting closer.

Could you please try again with the attached file?


(file #52923)

Markus Mützel <mmuetzel>
Group administrator
Thu 24 Feb 2022 04:46:19 PM UTC, comment #17: 

Here comes the result

debug> pkg install io-2.6.4-v2.tar.gz -verbose
mkdir (C:\Users\USERGW~1.DOM\AppData\Local\Temp\oct-HXe5UL)
untar (io-2.6.4-v2.tar.gz, C:\Users\USERGW~1.DOM\AppData\Local\Temp\oct-HXe5UL)
cmd = MKOCTFILE='C:/Program\ Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe\ --verbose' OCTAVE_CONFIG='C:/Program\ Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/octave-co
nfig-7.0.90.exe' OCTAVE='C:/Program\ Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/octave-7.0.90.exe' V=1 make --jobs 1 --directory 'C:/Users/USERGW~1.DOM/AppData/Local/Temp/oct-HXe5U
L/io-2.6.4/src'
make: Entering directory '/c/Users/USERGW.DOMAIN/AppData/Local/Temp/oct-HXe5UL/io-2.6.4/src'
echo "C:/Program\ Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe\ --verbose" csvexplode.cc
C:/Program\ Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe\ --verbose csvexplode.cc
"C:/Program\ Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe\ --verbose" csvexplode.cc
/bin/sh: line 1: C:/Program\ Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe\ --verbose: No such file or directory
make: *** [Makefile:7: csvexplode.oct] Error 127
make: Leaving directory '/c/Users/USERGW.DOMAIN/AppData/Local/Temp/oct-HXe5UL/io-2.6.4/src'

error: pkg: error running 'make' for the io package
error: called from
    configure_make at line 109 column 9
    install at line 202 column 7
    pkg at line 603 column 9
    pkg at line 595 column 19
debug>
mkdir (C:\Users\USERGW~1.DOM\AppData\Local\Temp\oct-UiICyb)
untar (io-2.6.4-v2.tar.gz, C:\Users\USERGW~1.DOM\AppData\Local\Temp\oct-UiICyb)
cmd = MKOCTFILE='C:/Program\ Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe\ --verbose' OCTAVE_CONFIG='C:/Program\ Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/octave-co
nfig-7.0.90.exe' OCTAVE='C:/Program\ Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/octave-7.0.90.exe' V=1 make --jobs 1 --directory 'C:/Users/USERGW~1.DOM/AppData/Local/Temp/oct-UiICy
b/io-2.6.4/src'
make: Entering directory '/c/Users/USERGW.DOMAIN/AppData/Local/Temp/oct-UiICyb/io-2.6.4/src'
echo "C:/Program\ Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe\ --verbose" csvexplode.cc
C:/Program\ Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe\ --verbose csvexplode.cc
"C:/Program\ Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe\ --verbose" csvexplode.cc
/bin/sh: line 1: C:/Program\ Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe\ --verbose: No such file or directory
make: *** [Makefile:7: csvexplode.oct] Error 127
make: Leaving directory '/c/Users/USERGW.DOMAIN/AppData/Local/Temp/oct-UiICyb/io-2.6.4/src'

error: pkg: error running 'make' for the io package
error: called from
    configure_make at line 109 column 9
    install at line 202 column 7
    pkg at line 603 column 9
    pkg at line 595 column 19


Georg Wiora <gwiora>
Thu 24 Feb 2022 03:56:13 PM UTC, comment #16: 

I wonder what happened to my comment #14...

Thanks. So, the MKOCTFILE makefile variable can contain flags. That means quoting it entirely won't work...

I don't think the issue is with mkoctfile itself, but with how it is called.

It might be possible to solve that in Octave core after all.

I'm attaching a changed version of the file `configure_make.m` that tries to escape the spaces in the file path to the executables passed to the Makefile.
That file sits in `OCTAVE_HOME\share\octave\7.0.90\m\pkg\private` (where `OCTAVE_HOME` is what you see when you execute that command in Octave).

Could you please exchange that file in the installation of Octave 7 with the attached one, open Octave again (to make sure it picks up the changed file) and check if you can install the original io package?


(file #52921)

Markus Mützel <mmuetzel>
Group administrator
Thu 24 Feb 2022 03:21:10 PM UTC, comment #15: 

Installation of v2


>> pkg install io-2.6.4-v2.tar.gz -verbose
mkdir (C:\Users\USERGW~1.DOM\AppData\Local\Temp\oct-iROaBR)
untar (io-2.6.4-v2.tar.gz, C:\Users\USERGW~1.DOM\AppData\Local\Temp\oct-iROaBR)
make: Entering directory '/c/Users/USERGW.DOMAIN/AppData/Local/Temp/oct-iROaBR/io-2.6.4/src'
echo "C:/Program Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe --verbose" csvexplode.cc
C:/Program Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe --verbose csvexplode.cc
"C:/Program Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe --verbose" csvexplode.cc
/bin/sh: line 1: C:/Program Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe --verbose: No such file or directory
make: *** [Makefile:7: csvexplode.oct] Error 127
make: Leaving directory '/c/Users/USERGW.DOMAIN/AppData/Local/Temp/oct-iROaBR/io-2.6.4/src'

error: pkg: error running 'make' for the io package
error: called from
    configure_make at line 110 column 9
    install at line 202 column 7
    pkg at line 603 column 9
stopped in install at line 210 [C:\Program Files\GNU Octave\Octave-7.0.90\mingw64\share\octave\7.0.90\m\pkg\private\install.m]
210:     rethrow (lasterror ());


I am pretty shure that the problem is inside mkoctfile. It does not correctly quote the parameters it is handing over to g++ and other build tools. The MKOCTFILE string does not have a path on my system.

Georg Wiora <gwiora>
Thu 24 Feb 2022 02:49:54 PM UTC, comment #14: 

@gwiora: Thank you for testing. Even if it is still failing, it actually looks better in Octave 7 than in Octave 6. 🙂

@Philip: You are right. This will probably affect many Octave packages out there. (Maybe all that have a Makefile?) We talked about this a few months ago in a developers meeting [1]. Back then, we decided to taggle this on a "per-report" basis. This is the first report we received about this issue since then.
The "nice" thing is that you are also a Windows user and might be better equipped to test possible solutions than other package maintainers.
It's also a nice coincidence that you are planning a new release currently. 👍

Tbh, I'm not very firm when it comes to the internals of Octave packages. Is the MKOCTFILE makefile variable supposed to be the (path and) name of the `mkoctfile` executable without any flags? If it is, the following change might help:

diff -r 11019b16535c src/Makefile
--- a/src/Makefile        Sat Feb 19 17:16:46 2022 +0100
+++ b/src/Makefile        Thu Feb 24 15:34:56 2022 +0100
@@ -3,7 +3,7 @@
 MKOCTFILE ?= mkoctfile

 %.oct: %.cc
-        $(MKOCTFILE) $<
+        "$(MKOCTFILE)" $<

 clean:
         rm -f *.o octave-core core *.oct *.mex *~


@gwiora: I'm attaching a modified version of the io package where I did that change. Can you install the io package in Octave 7 (in `C:\Program Files`) from that file?


[1]: https://wiki.octave.org/Online_Developer_Meeting_(2021-10-26)#Paths_with_spaces_.28on_Windows.29

(file #52919)

Markus Mützel <mmuetzel>
Group administrator
Thu 24 Feb 2022 01:24:56 PM UTC, comment #13: 

Followup to comment #11:
After installing version 7 to "C:\Program files" I got this result


>> pkg install io-2.6.4.tar.gz -verbose
mkdir (C:\Users\USERGW~1.DOM\AppData\Local\Temp\oct-Ch5hEU)
untar (io-2.6.4.tar.gz, C:\Users\USERGW~1.DOM\AppData\Local\Temp\oct-Ch5hEU)
make: Entering directory '/c/Users/USERGW.DOMAIN/AppData/Local/Temp/oct-Ch5hEU/io-2.6.4/src'
C:/Program Files/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe --verbose csvexplode.cc
/bin/sh: line 1: C:/Program: No such file or directory
make: *** [Makefile:6: csvexplode.oct] Error 127
make: Leaving directory '/c/Users/usergw.DOMAIN/AppData/Local/Temp/oct-Ch5hEU/io-2.6.4/src'

error: pkg: error running 'make' for the io package
error: called from
    configure_make at line 110 column 9
    install at line 202 column 7
    pkg at line 603 column 9
stopped in install at line 210 [C:\Program Files\GNU Octave\Octave-7.0.90\mingw64\share\octave\7.0.90\m\pkg\private\install.m]
210:     rethrow (lasterror ());
debug>


Georg Wiora <gwiora>
Thu 24 Feb 2022 09:24:39 AM UTC, comment #12: 


C:\>Dir /X Program*
 Verzeichnis von C:\

11.02.2022  09:07    <DIR>                       Program Files
17.02.2022  09:11    <DIR>                       Program Files (x86)



C:\>Dir /X "Program Files\GNU*"
 Verzeichnis von C:\Program Files

08.11.2021  10:38    <DIR>          GNUOCT~1     GNU Octave


I will try to run the test with v7 installed in "program files" too.

Georg Wiora <gwiora>
Thu 24 Feb 2022 09:08:30 AM UTC, comment #11: 

Thanks for testing. Unfortunately, that doesn't mean that it would work if it was installed in `C:\Program Files` on your PC.
As you can see from the error message in comment #0, the "GNU Octave" folder could be converted to a short file name on your PC, the "Program Files" folder could not.
To make that even "more sure", could you please run the following commands in a CMD prompt and show the results?

C:
cd \
dir /X Program*
cd "\Program Files"
dir /X GNU*


As can be seen in comment #10, all parts of the path of the new installation location could be converted to short paths. So, you wouldn't see issues with spaces in paths in the first place (independent on the version of Octave).

Markus Mützel <mmuetzel>
Group administrator
Thu 24 Feb 2022 08:48:26 AM UTC, comment #10: 

I tested the io installation with a (user) local installation of 7.0.90 and it worked perfectly. The installation path is not under "Program Files" but because of the path component "GNU Octave" there are still spaces in the path name. This seems to be no problem in V7.

I can now definitively exclude an interference with other installed software on my system. As I wrote in comment #7, the mkoctfile tool of V6.4 seems to be the problem because it does not correctly quote arguments handed to g++.


C:/Users/USER.CKH/AppData/Local/Programs/GNUOCT~1/OCTAVE~1.90/mingw64/bin/mkoctfile-7.0.90.exe --verbose csvexplode.cc
g++ -c -DPSAPI_VERSION=2 -I"C:\Users\USER.CKH\AppData\Local\Programs\GNUOCT~1\OCTAVE~1.90\mingw64/include"  -IC:\Users\USER.CKH\AppData\Local\Programs\GNUOCT~1\OCTAVE~1
.90\mingw64\include\octave-7.0.90\octave\.. -IC:\Users\USER.CKH\AppData\Local\Programs\GNUOCT~1\OCTAVE~1.90\mingw64\include\octave-7.0.90\octave -IC:\Users\USER.CKH\App
Data\Local\Programs\GNUOCT~1\OCTAVE~1.90\mingw64\include  -pthread -fopenmp -g -O2    csvexplode.cc -o C:\Users\USER.CKHOME\AppData\Local\Temp/oct-5B1DIi.o


Georg Wiora <gwiora>
Wed 23 Feb 2022 08:32:28 PM UTC, comment #9: 

@Markus:
Are quotes really needed around $(MKOCTFILE)?  There are several other OF packages with a Makefile similar to io's. Looks like a project, fixing them all ...

But reading the OP's description it smells of paths and maybe other settings getting mixed up.
AFAIK Octave (mxe-octave) already weeds out unneeded path components and prepends Octave's installation path stuff; so I wonder if and how e.g., Cygwin could interfere.
On my system where I have just a separate MSYS2/Mingw64 subsystem installed I have no issues like the one in this bug report at all.

Anyway I'm pondering another io release, hopefully before the Octave 7.1.x release so now may be the time to fix its Makefile, be my guest.

Philip Nienhuis <philipnienhuis>
Group Member
Wed 23 Feb 2022 12:26:39 PM UTC, comment #8: 

Can you please try with the RC1 of Octave 7? That is version 7.0.90 that you can download from here:
https://alpha.gnu.org/gnu/octave/?C=M;O=D

It might still be necessary to add quotes around "$(MKOCTFILE)" in the Makefile.

Markus Mützel <mmuetzel>
Group administrator
Wed 23 Feb 2022 11:54:20 AM UTC, comment #7: 

I tried to run installation manually with path string correctly set and got the following output.


C:\Users\USER.CKH\AppData\Local\Temp\octtest\io-2.6.4\src>"\Program Files\GNU Octave\Octave-6.4.0\usr\bin\make.exe" --trace --no-silent --debug=ALL
GNU Make 4.3
Built for x86_64-pc-msys
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Reading makefile 'Makefile'...
Updating makefiles....
 Considering target file 'Makefile'.
  Looking for an implicit rule for 'Makefile'.

[....output cropped....]

Makefile:6: update target 'csvexplode.oct' due to: csvexplode.cc
mkoctfile csvexplode.cc
Putting child 0x600076140 (csvexplode.oct) PID 387 on the chain.
Live child 0x600076140 (csvexplode.oct) PID 387
g++: error: Files\GNU: No such file or directory
g++: error: Octave\Octave-6.4.0\mingw64\/include: No such file or directory
Reaping losing child 0x600076140 PID 387
make: *** [Makefile:6: csvexplode.oct] Error 1


It seems that "mkoctfile" is is messing with blanks in path names by not correctly quoting path strings handed to g++.

I can call it directly and get the following result:


C:\Users\USER\AppData\Local\Temp\octtest\io-2.6.4\src> mkoctfile csvexplode.cc
g++: error: Files\GNU: No such file or directory
g++: error: Octave\Octave-6.4.0\mingw64\/include: No such file or directory


It is obviously breaking the path string at every blank.

I don't know if we can do something here...

Georg Wiora <gwiora>
Wed 23 Feb 2022 08:29:51 AM UTC, comment #6: 

Thank you for your investigations Philip. I was aware about the access rights problem, so my second trial was to run octave as admin for the installation. That made no difference.

"Special" is maybe that I run a windows 7 system. I could also imagine that the build process may not be using the expected tools because I have cygwin and TeX in my path. This could be the reason. I will investigate more on this an report here if this solves the problem.

This could mean that the octave build environment should put more effort on controlling paths.

stay tuned ...

Georg Wiora <gwiora>
Tue 22 Feb 2022 08:19:19 PM UTC, comment #5: 

io's Makefile is just:

all: csvexplode.oct csv2cell.oct csvconcat.oct cell2csv.oct col2num.oct num2col.oct

MKOCTFILE ?= mkoctfile

%.oct: %.cc
        $(MKOCTFILE) $<

clean:
        rm -f *.o octave-core core *.oct *.mex *~


@Markus:
Weren't LFNs morphed no more into 8.3 style file names in mxe-octave a while ago? or was that for Octave-7.x? ISTR something like that.

@OP:
I usually install Octave into s/th along the lines of
C:\Programs\Octave\Octave-<version>-<date>
precisely to avoid space-in-filename issues. There are many other OSS programs that don't like spaces in their installation paths either, Octave is by no means unique.

But: I just installed Octave=6.4.0 into
C:\Programs\GNU Octave\Octave-6.4.0
(note: space in dir name!) and installed io:

pkg unload -nodeps io       ## Just to be sure that loaded binary
clear -f                    ## functions don't hold their
                            ## function files on disk hostage
pkg uninstall -global io    ## Uninstall just to be sure
pkg install -verbose -forge -global io  ## Install in global
                            ## store, i.e. dir name with a space


w/o any issues. So I wonder what's special about your Octave installation.
Furthermore, 'C:\Program Files' and 'C:\Program Files (x86)' are protected by Windows, you just cannot install or copy anything there w/o admin credentials.

Philip Nienhuis <philipnienhuis>
Group Member
Mon 21 Feb 2022 04:45:32 PM UTC, comment #4: 

If you are asking so precisely... no.

I just checked it again and it does not work. Obviously I installed octave with pre-installed packages. I know that I have installed older versions manually but I can not remember which one was the last one working.

Georg Wiora <gwiora>
Mon 21 Feb 2022 04:39:51 PM UTC, comment #3: 

Are you sure installing io-2.6.3 works fine?

Markus Mützel <mmuetzel>
Group administrator
Mon 21 Feb 2022 04:36:46 PM UTC, comment #2: 

I would call this a regression, because io-2.6.3 is installing fine. By comparing these versions the fix may become obvious.

(P.S.: Are we still struggling with blanks in path name? Is it 2022 or 1970?)

Georg Wiora <gwiora>
Mon 21 Feb 2022 04:09:51 PM UTC, comment #1: 

That's a known issue with many packages probably. See also this note in the README file that is displayed after installing Octave on Windows:

> It is a known issue that some operations might fail if Octave is installed in a location containing spaces if short file names have been disabled for the file system of the installation folder. Some systems seem to have disabled that feature for some partitions (e.g., on D:). If you are unsure whether your file system supports short file names, chose an installation folder that doesn't contain spaces.


This is probably not limited to Windows. But spaces in paths are a lot less common on other platforms.

Unfortunately, this can probably not be solved generally for all packages with a change in Octave core. Instead, it would probably be necessary to address this in the `Makefile`s of each affected package. Most likely some commands need to be quoted.

I haven't had a look at the Makefile of the io package though.

Markus Mützel <mmuetzel>
Group administrator
Mon 21 Feb 2022 09:33:27 AM UTC, original submission:  

I tried to install the current version of io package and got the following error:

>> pkg install io-2.6.4.tar.gz
C:/Program: line 1: [Paths]: command not found
C:/Program: line 2: Files/GNUOCT~1/OCTAVE~3.0/: No such file or directory
C:/Program: line 3: FilesGNUOCT~1OCTAVE~3.0\binqt.conf: No such file or directory
C:/Program: line 4: FilesGNUOCT~1OCTAVE~3.0\binqt.conf: No such file or directory
C:/Program: line 5: FilesGNUOCT~1OCTAVE~3.0\binqt.conf: No such file or directory
C:/Program: line 6: FilesGNUOCT~1OCTAVE~3.0\binqt.conf: No such file or directory
C:/Program: line 7: FilesGNUOCT~1OCTAVE~3.0\binqt.conf: No such file or directory
make: *** [Makefile:6: csvexplode.oct] Error 127
make: Entering directory '/tmp/oct-fFN89X/io-2.6.4/src'
C:/Program Files/GNUOCT~1/OCTAVE~3.0/mingw64/bin/mkoctfile-6.4.0.exe csvexplode.cc
make: Leaving directory '/tmp/oct-fFN89X/io-2.6.4/src'


I assume this has something to do with blanks in path names because the folder "C:\Program" does not exist on my system but "C:\Program Files\..." which is the path where octave is installed.

Thank you for fixing.

Georg Wiora <gwiora>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #52923:  configure_make.m added by mmuetzel (7KiB - text/plain)
file #52921:  configure_make.m added by mmuetzel (7KiB - text/plain)
file #52919:  io-2.6.4-v2.tar.gz added by mmuetzel (212KiB - application/gzip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by gwiora (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-03-07 mmuetzel StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2022-02-25 mmuetzel StatusIn Progress Ready For Test
        Summary[octave forge] (io) Installation fails with spaces in path Package installation fails with spaces in path
    2022-02-25 mmuetzel StatusNone In Progress
        Release6.4.0 7.0.90
    2022-02-24 mmuetzel Attached File- Added configure_make.m, #52923
    2022-02-24 mmuetzel Attached File- Added configure_make.m, #52921
    2022-02-24 mmuetzel Attached File- Added io-2.6.4-v2.tar.gz, #52919
    2022-02-21 mmuetzel Operating SystemMicrosoft Windows Any
        SummaryInstalling io-2.6.4 on windows fails [octave forge] (io) Installation fails with spaces in path

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code