1

I'm installing Cygwin and GNU C compiler with the help of the tutorial How to Install the Latest GCC on Windows

I have completed the following steps

  1. Install Cygwin
  2. Install Required Cygwin Packages

The 3rd step is "Download, Build and Install the Latest GCC".
I'm stuck when I run the make -j4 command with the following error in the Cygwin Terminal.

$ make -j4
make[1]: Entering directory '/home/Prasanna Rajaram/build-gcc-6.1.0'
Configuring in ./intl
Configuring in ./libiberty
Configuring in ./lto-plugin
/bin/sh: /home/Prasanna: No such file or directory
Makefile:7416: recipe for target 'configure-libiberty' failed
make[1]: *** [configure-libiberty] Error 1
make[1]: *** Waiting for unfinished jobs....
Configuring in ./fixincludes
/bin/sh: /home/Prasanna: No such file or directory
Makefile:5330: recipe for target 'configure-intl' failed
make[1]: *** [configure-intl] Error 1
/bin/sh: /home/Prasanna: No such file or directory
Makefile:9308: recipe for target 'configure-lto-plugin' failed
make[1]: *** [configure-lto-plugin] Error 1
/bin/sh: /home/Prasanna: No such file or directory
Makefile:3470: recipe for target 'configure-fixincludes' failed
make[1]: *** [configure-fixincludes] Error 1
make[1]: Leaving directory '/home/Prasanna Rajaram/build-gcc-6.1.0'
Makefile:879: recipe for target 'all' failed
make: *** [all] Error 2

I also do guess where it has gone wrong. In my home directory path '/home/Prasanna Rajaram/ there is a space between my first and last name. I don't know how Windows 10 had created a folder name like that, under the C:\Users directory.

How can I overcome this problem? I'm reluctant to rename the user directory as one word (like:PrasannaRajaram) as this might affect other programs which might use this path.

There is also this thought, that this path may apply only for Cygwin as it starts with /home

How can I make this work?

Edit-1 After the following the steps from the below answer

mkdir /home/prasanna
mkpasswd -c > /etc/passwd
sed -i -e "s/Prasanna Rajaram/prasanna/g" /etc/passwd

The output on Cygwin now looks like this:

$ make -j4
make[1]: Entering directory '/home/Prasanna Rajaram/build-gcc-6.1.0'
Configuring in ./lto-plugin
Configuring in ./intl
Configuring in ./fixincludes
/home/Prasanna: /home/Prasanna: is a directory
Makefile:9308: recipe for target 'configure-lto-plugin' failed
make[1]: *** [configure-lto-plugin] Error 1
make[1]: *** Waiting for unfinished jobs....
Configuring in ./libiberty
/home/Prasanna: /home/Prasanna: is a directory
Makefile:5330: recipe for target 'configure-intl' failed
make[1]: *** [configure-intl] Error 1
/home/Prasanna: /home/Prasanna: is a directory
Makefile:3470: recipe for target 'configure-fixincludes' failed
make[1]: *** [configure-fixincludes] Error 1
/home/Prasanna: /home/Prasanna: is a directory
Makefile:7416: recipe for target 'configure-libiberty' failed
make[1]: *** [configure-libiberty] Error 1
make[1]: Leaving directory '/home/Prasanna Rajaram/build-gcc-6.1.0'
Makefile:879: recipe for target 'all' failed
make: *** [all] Error 2

1 Answer 1

2

https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-passwdinfo

in short:

mkdir /home/prasanna
mkpasswd -c > /etc/passwd
sed -i -e "s/Prasanna Rajaram/prasanna/g" /etc/passwd

close all Cygwin Terminal and restart it.

Disclaimer: building gcc is for expert; I suggest you to start with a much simpler project.

Update from the comments

  1. Once the above steps are completed, move the build-gcc-6.1.0 and gcc-6.1.0 folders to /home/prasanna folder

  2. Run the make -j4 and now (from /home/prasanna folder)it should run without any problems

5
  • I completed the steps you suggested. It still gives me the same set of errors
    – Prasanna
    May 5, 2016 at 1:18
  • 1
    This one /bin/sh: /home/Prasanna: No such file or directory ?
    – matzeri
    May 5, 2016 at 4:51
  • It is the first error in your log. Is still there or not?
    – matzeri
    May 5, 2016 at 14:58
  • I will post the new screen shot as edit. The answer is It's gone now. I didn't notice. Thanks for pointing out. Looks like the right direction !
    – Prasanna
    May 5, 2016 at 15:02
  • 1
    You are still using the wrong directory "/home/Prasanna Rajaram/build-gcc-6.1.0" with a space inside. Move the code in another place and restart including the config stage.
    – matzeri
    May 5, 2016 at 16:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .