gcc-7.3.0 compiling fails on Synology DS212j

Jonathan Wakely jwakely@redhat.com
Fri Apr 27 12:17:00 GMT 2018


On 26/04/18 22:20 +0200, Willem van der Velde wrote:
>Dear developers,
>
>I'm trying to get Fortran working on my DS212j.
>Some time ago I used ipkg and got gcc-4.2.3 working but that version
>goes without Fortran, so I tried to get the universal version 7.3.0
>working. I followed the instructions at https://gcc.gnu.org/install
>A lot of the compiling process is going fine, but in the end it fails...
>Please inform me about the information in the logs so I can get things
>right.

What is wrong with your 'rm' command?

The problem seems to be this:

config.status: creating Makefile
/bin/rm: cannot remove './confi3PYDk/stdin': No such file or directory
/bin/rm: cannot remove 'Makefile': No such file or directory
config.status: error: could not create Makefile

Which comes from:

  rm -f "$tmp/stdin"
  case $ac_file in
  -) cat "$tmp/out" && rm -f "$tmp/out";;
  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
  esac \
  || as_fn_error "could not create $ac_file" "$LINENO" 5

i.e. the command 'rm -f Makefile' is returning an error, and causing config.status to give up.

The 'rm' command is not supposed to give a "No such file or directory"
error when -f is used.

If you cannot fix your OS to get a working 'rm' I suggest you create a
POSIX-like wrapper and put it earlier in your PATH e.g. something like

#!/bin/sh
set -e
real_rm=/bin/rm
if [ $# -eq 2 -a "$1" = "-f" -a ! -e "$2" ]
then
  exit 0
else
  "$real_rm" "$@"
fi



More information about the Gcc-help mailing list