./xsum: Permission denied make: *** [xsum.out] Error 126

0

0

I am trying to insall f2c/f77 compiler on mac osx using the instructions given http://www.webmo.net/support/fortran_osx.html and I get the following error :

./xsum: Permission denied 
make: *** [xsum.out] Error 126

please help , as in installation it misses to create : /usr/local/bin/f2c

the install_f2c_osx.csh contains:

#! /bin/csh

#! /bin/csh setenv INSTALL /usr/local curl "http://netlib.sandia.gov/cgi-bin/netlib/netlibfiles.tar?filename=netlib/f2c" -o "f2c.tar" tar -xvf f2c.tar gunzip -rf f2c/* cd f2c mkdir libf2c mv libf2c.zip libf2c cd libf2c unzip libf2c.zip cp makefile.u Makefile make cp f2c.h $INSTALL/include cp libf2c.a $INSTALL/lib cd ../src cp makefile.u Makefile make cp f2c $INSTALL/bin cd .. mkdir -p $INSTALL/share/man/man1 cp f2c.1t $INSTALL/share/man/man1 cp fc $INSTALL/bin/f77 chmod +x $INSTALL/bin/f77 cd .. rm -rf f2c echo "==================SUMMARY==================" echo $0 " has built and installed:" find $INSTALL -name '*f2c*' -mmin -5 find $INSTALL -name '*f77*' -mmin -5

user2721585

Posted 2014-06-24T16:32:57.863

Reputation: 1

What command do you run that produces this output? – a CVn – 2014-06-24T16:38:53.873

after downloading the .csh file from the site : – user2721585 – 2014-06-25T05:31:03.077

'code'$ chmod +x install_f2c_osx.csh $ sudo ./install_f2c_osx.csh – user2721585 – 2014-06-25T05:31:34.047

@MichaelKjörling – user2721585 – 2014-06-26T10:37:43.403

Answers

1

I've just come across this issue myself (on CentOS 6.5), but managed to fix it by adding a 'chmod' in the installation script at line 6. See the revised scripts below. I've included fixed version of both the Linux and MacOSX installation scripts below (there are minor differences).

I realise it's probably far too late to help the original poster, but it may help others who get stuck. A lot of forums have people with this same issue but none have a solution.

The disappointing thing is that the 'xsum' command is just verifying the files as far as I can see - so it's a broken test step that makes the installation fail - ironic.

If you subsequently encounter ELF errors referring to missing .so files then you are probably missing the 32bit 'glibc' libraries and need to install ones that exactly match your 64bit 'glibc' (or install/update both at the same time) - that was the next issue I had to overcome.

For Linux installs:

#! /bin/csh
setenv INSTALL /usr/local
curl "http://netlib.sandia.gov/cgi-bin/netlib/netlibfiles.tar?filename=netlib/f2c" -o "f2c.tar"
tar -xvf f2c.tar
gunzip -rf f2c/*
chmod a+x f2c/src/xsum    # ADDED chmod for 'xsum' execution permissions.
cd f2c
mkdir libf2c
mv libf2c.zip libf2c
cd libf2c
unzip libf2c.zip
cp makefile.u Makefile
make
cp f2c.h $INSTALL/include
cp libf2c.a $INSTALL/lib
cd ../src
cp makefile.u Makefile
make
cp f2c $INSTALL/bin
cd ..
mkdir -p $INSTALL/share/man/man1
cp f2c.1t $INSTALL/share/man/man1
cp fc $INSTALL/bin/f77
chmod +x $INSTALL/bin/f77
cd ..
rm -rf f2c
echo "==================SUMMARY=================="
echo $0 " has built and installed:"
find $INSTALL -name '*f2c*' -mmin -5
find $INSTALL -name '*f77*' -mmin -5

For MacOSX installs:

#! /bin/csh
setenv INSTALL /usr/local
curl "http://netlib.sandia.gov/cgi-bin/netlib/netlibfiles.tar?filename=netlib/f2c" -o "f2c.tar"
tar -xvf f2c.tar
gunzip -rf f2c/*
chmod a+x f2c/src/xsum    # ADDED chmod for 'xsum' execution permissions.
cd f2c
mkdir libf2c
mv libf2c.zip libf2c
cd libf2c
unzip libf2c.zip
cp makefile.u Makefile
make
cp f2c.h $INSTALL/include
cp libf2c.a $INSTALL/lib
cd ../src
cp makefile.u Makefile
make
cp f2c $INSTALL/bin
cd ..
mkdir -p $INSTALL/share/man/man1
cp f2c.1t $INSTALL/share/man/man1
cp fc $INSTALL/bin/f77
chmod +x $INSTALL/bin/f77
cd ..
rm -rf f2c
echo "==================SUMMARY=================="
echo $0 " has built and installed:"
find $INSTALL -name '*f2c*' -mmin -5
find $INSTALL -name '*f77*' -mmin -5

Steele Griffiths

Posted 2014-06-24T16:32:57.863

Reputation: 11

0

for anyone else that has an issue with this, you may also check that the xsum binary is useable by your system. Head into the f2c/src/ directory, then:

user@computer$ file xsum and compare to the output of, say, user@computer$ file /bin/sh

They should be the same. If not, delete the xsum binary that came with f2c and build your own using the xsum.c source. That is, edit the relevant part Griffiths' script to be:

<------snip--------> cd ../src cp makefile.u Makefile rm xsum cc -O xsum.c -o xsum chmod +x xsum make cp f2c $INSTALL/bin <------snip----->

Lucas

Posted 2014-06-24T16:32:57.863

Reputation: 1