You are not logged in.

#1 2020-04-29 15:38:20

cmasso6
Member
Registered: 2020-04-29
Posts: 2

[SOLVED] make error, gcc: "make[4]: gcc: permission denied"

I encountered a rather strange make error when trying to compile some packages. I am running Arch Linux 5.6.7

For instance, when trying to compile R 3.6, I get the following error (full output at the end):

    gcc -shared -fopenmp -L/usr/local/lib64 -o libRblas.so blas.o  cmplxblas.o -lgfortran -lm -lquadmath
    make[4]: gcc: Permission denied

However gcc is up-to-date, worked for other installs, and everything seems correctly configured:

    [cmasso6@cmasso6 R-3.6.3]$ gcc --version
    gcc (Arch Linux 9.3.0-1) 9.3.0
    Copyright (C) 2019 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    [cmasso6@cmasso6 R-3.6.3]$ which gcc
    /usr/bin/gcc

I took a look at the Makeconf file of the package, which contains the following line:

CC=gcc

I changed it to

CC=/usr/bin/gcc

which made it work.

Here is my $PATH:

    /usr/lib/aurutils:/usr/lib:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

Again, gcc runs correctly from the command line. I don't know what is going on.

To be clear, I made this install work by changing the Makeconf file, and I can also install R 4.0 with pacman without any trouble. However, I get the same error when trying to install some R packages, like ps. So I guess there is a general issue with gcc and/or make.

I have no idea what to do, any help would be greatly appreciated!

The full output of the make error:

    [cmasso6@cmasso6 R-3.6.3]$ make
    make[1]: Entering directory '/home/cmasso6/Downloads/R-3.6.3/m4'
    make[1]: Nothing to be done for 'R'.
    make[1]: Leaving directory '/home/cmasso6/Downloads/R-3.6.3/m4'
    make[1]: Entering directory '/home/cmasso6/Downloads/R-3.6.3/tools'
    make[1]: Nothing to be done for 'R'.
    make[1]: Leaving directory '/home/cmasso6/Downloads/R-3.6.3/tools'
    make[1]: Entering directory '/home/cmasso6/Downloads/R-3.6.3/doc'
    make[2]: Entering directory '/home/cmasso6/Downloads/R-3.6.3/doc/html'
    make[2]: Leaving directory '/home/cmasso6/Downloads/R-3.6.3/doc/html'
    make[2]: Entering directory '/home/cmasso6/Downloads/R-3.6.3/doc/manual'
    make[2]: Nothing to be done for 'R'.
    make[2]: Leaving directory '/home/cmasso6/Downloads/R-3.6.3/doc/manual'
    make[1]: Leaving directory '/home/cmasso6/Downloads/R-3.6.3/doc'
    make[1]: Entering directory '/home/cmasso6/Downloads/R-3.6.3/etc'
    make[1]: Leaving directory '/home/cmasso6/Downloads/R-3.6.3/etc'
    make[1]: Entering directory '/home/cmasso6/Downloads/R-3.6.3/share'
    make[1]: Leaving directory '/home/cmasso6/Downloads/R-3.6.3/share'
    make[1]: Entering directory '/home/cmasso6/Downloads/R-3.6.3/src'
    make[2]: Entering directory '/home/cmasso6/Downloads/R-3.6.3/src/scripts'
    creating src/scripts/R.fe
    make[3]: Entering directory '/home/cmasso6/Downloads/R-3.6.3/src/scripts'
    make[3]: Leaving directory '/home/cmasso6/Downloads/R-3.6.3/src/scripts'
    make[2]: Leaving directory '/home/cmasso6/Downloads/R-3.6.3/src/scripts'
    make[2]: Entering directory '/home/cmasso6/Downloads/R-3.6.3/src/include'
    config.status: creating src/include/config.h
    config.status: src/include/config.h is unchanged
    make[3]: Entering directory '/home/cmasso6/Downloads/R-3.6.3/src/include/R_ext'
    make[3]: Leaving directory '/home/cmasso6/Downloads/R-3.6.3/src/include/R_ext'
    make[2]: Leaving directory '/home/cmasso6/Downloads/R-3.6.3/src/include'
    make[2]: Entering directory '/home/cmasso6/Downloads/R-3.6.3/src/extra'
    make[3]: Entering directory '/home/cmasso6/Downloads/R-3.6.3/src/extra/blas'
    make[4]: Entering directory '/home/cmasso6/Downloads/R-3.6.3/src/extra/blas'
    gfortran -fno-optimize-sibling-calls -fpic  -g -O2  -c blas.f -o blas.o
    gfortran -fno-optimize-sibling-calls -fpic  -g -O2  -c cmplxblas.f -o cmplxblas.o
    gcc -shared -fopenmp -L/usr/local/lib64 -o libRblas.so blas.o  cmplxblas.o -lgfortran -lm -lquadmath
    make[4]: gcc: Permission denied
    make[4]: *** [Makefile:37: libRblas.so] Error 127
    make[4]: Leaving directory '/home/cmasso6/Downloads/R-3.6.3/src/extra/blas'
    make[3]: *** [Makefile:32: R] Error 2
    make[3]: Leaving directory '/home/cmasso6/Downloads/R-3.6.3/src/extra/blas'
    make[2]: *** [Makefile:35: make.blas] Error 2
    make[2]: Leaving directory '/home/cmasso6/Downloads/R-3.6.3/src/extra'
    make[1]: *** [Makefile:28: R] Error 1
    make[1]: Leaving directory '/home/cmasso6/Downloads/R-3.6.3/src'
    make: *** [Makefile:61: R] Error 1

Last edited by cmasso6 (2020-04-29 17:03:10)

Offline

#2 2020-04-29 15:47:29

loqs
Member
Registered: 2014-03-06
Posts: 18,626

Re: [SOLVED] make error, gcc: "make[4]: gcc: permission denied"

What is the output of

type -a gcc

Offline

#3 2020-04-29 15:48:58

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,405
Website

Re: [SOLVED] make error, gcc: "make[4]: gcc: permission denied"

What source are you using for that build?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2020-04-29 17:02:20

cmasso6
Member
Registered: 2020-04-29
Posts: 2

Re: [SOLVED] make error, gcc: "make[4]: gcc: permission denied"

Thank you for your replies. I got the answer on SO:
https://stackoverflow.com/questions/615 … arch-linux

Offline

Board footer

Powered by FluxBB