The space character in "Program Files" in Cygwin on Windows

368 views
Skip to first unread message

Samuel Lelievre

unread,
Dec 8, 2019, 10:53:15 PM12/8/19
to sage-devel
Dear Sage-devel,

Recently I have a problem with Sage on Cygwin where
running `make configure` runs into a problem with the
space in the "Program Files" directory in Windows.

Apparently there is an attempt to read

    /cygdrive/c/Program Files/Git/mingw64/bin/gettextize

but the path gets split at the space into two parts,
as if

    /cygdrive/c/Program

and

    Files/Git/mingw64/bin/gettextize

were two different paths, and this protest is issued:

    sed: unable to read
    /cygdrive/c/Program:
    No such file or directory

    sed: unable to read
    Files/Git/mingw64/bin/gettextize:
    No such file or directory

See below with a French locale.

Any advice on what to do?

Samuel

----- output of make configure -----
```
$ make configure
./bootstrap -d
make[1] : on entre dans le répertoire « /home/lelievre/s/sage2 »
rm -rf config configure build/make/Makefile-auto.in
make[1] : on quitte le répertoire « /home/lelievre/s/sage2 »
sed: impossible de lire /cygdrive/c/Program: No such file or directory
sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such file or directory
sed: impossible de lire /cygdrive/c/Program: No such file or directory
sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such file or directory
sed: impossible de lire /cygdrive/c/Program: No such file or directory
sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such file or directory
sed: impossible de lire /cygdrive/c/Program: No such file or directory
sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such file or directory
Failed to read the gettext_datadir directory from /cygdrive/c/Program Files/Git/mingw64/bin/gettextize
The config.rpath file must manually be copied into config/
This file is installed with gettext typically in /usr/share/gettext
Bootstrap failed, downloading required files instead.
Attempting to download package configure-b4df16c19ab9b47303b7f3eaf78bb6c1b1c89679.tar.gz from mirrors
Downloading the Sage mirror list
```

Dima Pasechnik

unread,
Dec 9, 2019, 2:42:27 AM12/9/19
to sage-devel
I don't think Cygwin supports paths with spaces in them.

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/9fcf423f-ff7a-47ed-ac55-7f66bd1e90cb%40googlegroups.com.

E. Madison Bray

unread,
Dec 9, 2019, 10:34:19 AM12/9/19
to sage-devel
On Mon, Dec 9, 2019 at 8:42 AM Dima Pasechnik <dim...@gmail.com> wrote:
>
> I don't think Cygwin supports paths with spaces in them.

Of course it does. However, it looks like Samuel ran `make configure`
which is trying to run the `bootstrap` script, which since
https://trac.sagemath.org/ticket/27823 calls gettextize, but some of
the uses of gettextize are not properly quoted.

However, it looks like the gettext-devel package is not installed on
his Cygwin, and it happens to be finding a gettextize that was
including in Git for Windows which was also on his path. This is
clearly no good.

gettextize-devel should be added to the list of packages to install I
guess (the default instructions assume you don't have autotools and
all and will just download the configure tarball...)
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq3qGbu9eo4eM1-sv-D%3Dx-UBb_C_t%3D-JgvdViOTe9xzkPQ%40mail.gmail.com.

E. Madison Bray

unread,
Dec 9, 2019, 10:35:32 AM12/9/19
to sage-devel
On Mon, Dec 9, 2019 at 4:34 PM E. Madison Bray <erik....@gmail.com> wrote:
>
> On Mon, Dec 9, 2019 at 8:42 AM Dima Pasechnik <dim...@gmail.com> wrote:
> >
> > I don't think Cygwin supports paths with spaces in them.
>
> Of course it does. However, it looks like Samuel ran `make configure`
> which is trying to run the `bootstrap` script, which since
> https://trac.sagemath.org/ticket/27823 calls gettextize, but some of
> the uses of gettextize are not properly quoted.
>
> However, it looks like the gettext-devel package is not installed on
> his Cygwin, and it happens to be finding a gettextize that was
> including in Git for Windows which was also on his path. This is
> clearly no good.
>
> gettextize-devel should be added to the list of packages to install I
> guess (the default instructions assume you don't have autotools and
> all and will just download the configure tarball...)

* Sorry, that should say "gettext-devel"

Dima Pasechnik

unread,
Dec 9, 2019, 10:52:37 AM12/9/19
to sage-devel
well, I recall replacing "Program\ Files" with PROGRA~1 all over the place, in 1999  :-)

anyway it is a hassle, for e.g. GNU make is not too happy with paths with spaces, either.

Dima Pasechnik

unread,
Dec 9, 2019, 10:54:12 AM12/9/19
to sage-devel


On Mon, 9 Dec 2019, 15:52 Dima Pasechnik, <dim...@gmail.com> wrote:
well, I recall replacing "Program\ Files" with PROGRA~1 all over the place, in 1999  :-)

anyway it is a hassle, for e.g. GNU make is not too happy with paths with spaces, either.

E. Madison Bray

unread,
Dec 9, 2019, 12:05:22 PM12/9/19
to sage-devel
On Mon, Dec 9, 2019 at 4:54 PM Dima Pasechnik <dim...@gmail.com> wrote:
>
>
>
> On Mon, 9 Dec 2019, 15:52 Dima Pasechnik, <dim...@gmail.com> wrote:
>>
>> well, I recall replacing "Program\ Files" with PROGRA~1 all over the place, in 1999 :-)
>>
>> anyway it is a hassle, for e.g. GNU make is not too happy with paths with spaces, either.
>
>
> http://savannah.gnu.org/bugs/?712

Indeed, spaces in filenames are a problem for a number of UNIX
programs, but it's not a problem for Cygwin itself by any means.

The only problem here is that by default your PATH includes the
default PATH for Windows as well, and if you don't have a program in
one of /bin:/usr/bin:/usr/local/bin or any other Cygwin paths on your
PATH, and there *happens* to be some random program (in this case the
same program but an incompatible build thereof) on your Windows PATH
you'll still end up using that one.

This should obviously be avoided. When working with Cygwin you should
generally avoid using anything outside the Cygwin root filesystem
except by explicit intent (e.g. I do use a few programs outside of
Cygwin such as the Microsoft compilers and related tools).
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq298mjAhviDVWEa%3DJJ%3DYZ0-MV8%2BQCFpkfxy7je8deoLmA%40mail.gmail.com.

Samuel Lelièvre

unread,
Dec 9, 2019, 9:15:58 PM12/9/19
to Sage-devel
Thanks both for your answers. I'm away for a week
without my Cygwin machine, but I'll try next week.

When I open a Cygwin terminal to build SageMath,
should I start by changing the PATH to remove any
occurrence of "Program Files" or its subdirectories?
Also, should the list of optional apt-cyg packages to
install be expanded to use more system things such
as those worked on in #27330 and its subtickets?

Not sure which things from this this list I cooked
somewhat at random (starting from the existing
list and fishing for things based on the names at
#27330) can be useful, and which are useless:

apt-cyg install \
wget curl libcurl-devel lynx \
bc bzip2 libbz2-devel \
ccache cmake libcrypt-devel diffutils \
libffi-devel flex libflint libflint-devel libfreetype-devel \
gcc-core gcc-g++ gcc-fortran libgd3 libgd-devel
gettext-devel git glpk libglpk-devel gmp libgmp-devel \
libiconv-devel isl libisl-devel \
liblapack0 liblapack-devel liblzma-devel \
make m4 mpc libmpc-devel mpfr libmpfr-devel \
ncurses ninja libntl-devel openssl-devel \
patch pcre libpcre-devel pkgconf libpkgconf-devel \
libpng-devel python2 python3 libreadline-devel xz yasm \
zlib zlib-devel python2-zmq python3-zmq libzmq-devel

The following don't seem to be packaged for Cygwin yet:

- arb
- eclib
- ecm
- gf2x
- givaro
- gp2c
- lcalc
- lrcalc
- m4ri
- m4rie
- mpfi
- mpir
- pari
- libpari-gmp
- perl_term_readline_gnu
- rw
- symmetrica
Reply all
Reply to author
Forward
0 new messages