Installing f2c on Mac OSX 10.6.8 - xcode

I used f2c builds from http://hpc.sourceforge.net/buildf2c and http://hamishrickerby.com/2009/02/20/installing-f2c-on-a-mac/#disqus_thread, but none of them worked.
I followed the installation instructions. All goes well until step 4:
4. Creating and installing f2c header file f2c.h ...
make: `f2c.h' is up to date.
mkdir: /usr/local/include: File exists
cp: /usr/local/include is not a directory
... done.
5. Creating and installing f2c library libf2c.a ...
cp signal1.h0 signal1.h
cp sysdep1.h0 sysdep1.h
/usr/bin/cc -c f77vers.c
cc1: error: /usr/local/include: not a directory
make: *** [f77vers.o] Error 1
cp: libf2c.a: No such file or directory
ranlib: can't open file: /usr/local/lib/libf2c.a (Permission denied)
... done.
6. Creating and installing f2c translator ...
/usr/bin/cc -O -o xsum xsum.c
cc1: error: /usr/local/include: not a directory
make: *** [xsum] Error 1
cp: f2c: No such file or directory
ln: /bin/f2c: Permission denied
... done.
7. Installing fc script ...
cp: /usr/local/bin/fc: Permission denied
ln: /bin/fc: Permission denied
ln: /bin/f77: Permission denied
... done.
8. Installing man pages ...
cp: /usr/share/man/man1/f2c.1: Permission denied
... done.
9. Cleaning up ...
rm -f *.o f2c sysdep.hd tokdefs.h f2c.t
rm -f libf2c.a *.o arith.h signal1.h sysdep1.h
... All done!
The results is of course:
-bash: f2c: command not found
I repaired disk permissions before trying another time, but this had no effect. I don't understand what went wrong. I previously installed Xcode 4 and Intel fortran. The latter works well.
My problem seems similar to one that was described in another thread
Newbie question f2c compilation problem: cc1plus error: /include: not a directory What does this mean?
As in the mentioned thread, I get
--with-gxx-include-dir=/include/c++/4.2.1
but I don't know how to fix this. Could it be an incompatibility between Xcode and f2c?
Thanks for any help :-)

Permission denied doesn't mean the installation was successful...
It actually means your user can't install in the specific location.
When installing, use sudo, so you'll install with admin privileges.
Usually:
./configure
make
sudo make install
Note the sudo before make install

Related

Permission denied on MAKE TEST

Does anyone know why in the process of installing Redis I get these errors when running make test after I already ran sudo apt install build-esential
$ make test
cd src && make test
make[1]: Entering directory '/home/alek/redis-6.0.8/src'
touch: cannot touch 'release.h': Permission denied
...
touch: cannot touch 'release.c': Permission denied
/bin/sh: 1: pkg-config: not found
...
CC Makefile.dep
/bin/sh: 1: cannot create Makefile.dep: Permission denied
...
echo STD=-std=c11 -pedantic -DREDIS_STATIC='' >> .make-settings
/bin/sh: 1: cannot create .make-settings: Permission denied
If this helps:
$ make --version
GNU Make 4.2.1
Built for x86_64-pc-linux-gnu

Install IDF Espressif make menuconfig fatal error

I want to install the Espressif IDF on my Raspberry PI 3.
I've followed a tutorial to clone github files and so one...
I'm at the step where I have to "make menuconfig" but I get a fatal error.
The fatal error message is :
pi#raspberrypi:~/ESP32/premier $ make menuconfig
make[1]: Entering directory '/home/pi/ESP32/esp-idf/tools/kconfig'
cc -D_GNU_SOURCE -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE -MD -c -o mconf.o mconf.c
mconf.c:1047:1: fatal error: opening dependency file mconf.d: Permission denied
}
^
compilation terminated.
<builtin>: recipe for target 'mconf.o' failed
make[1]: *** [mconf.o] Error 1
make[1]: Leaving directory '/home/pi/ESP32/esp-idf/tools/kconfig'
make: *** No rule to make target '/home/pi/ESP32/esp-idf/tools/kconfig/conf', needed by '/home/pi/ESP32/esp-idf/tools/kconfig/mconf'. Stop.
Would someone has encountered this issue ???
Permission based problems, either:
* As mentioned in the comments, restart tutorial by not deviating, or
* Fix permissions, in your "home"-case (otherwise /opt/...)
chmod -R 777 /home/pi/ESP32/esp-idf/

Makefile error when building on Cygwin

I am installing some NASA's software (HEASoft) from the source code on Cygwin (32-bit) running on Windows 10. Configure ran successfully, but make gives the following errors:
Makefile:26: /home/Mario/heasoft-6.21/heacore/BUILD_DIR/Makefile-std: No such file or directory
gmake[2]: *** No rule to make target '/home/Mario/heasoft-6.21/heacore/BUILD_DIR/Makefile-std'. Stop.
gmake[2]: Leaving directory 'C:/cygwin/home/Mario/heasoft-6.21/heacore/BUILD_DIR'
make[1]: *** [Makefile:74: heacore] Error 2
make[1]: se sale del directorio '/home/Mario/heasoft-6.21/BUILD_DIR'
make: *** [Makefile:10: all] Error 2
My problem is that the file /home/Mario/heasoft-6.21/heacore/BUILD_DIR/Makefile-std is not found; however, it actually exists and is located in the correct directory. EDIT: here it can be seen that this file exists:
$ ls /home/Mario/heasoft-6.21/heacore/BUILD_DIR
config.guess config.sub hd_config_info headas-init.csh headas-setup.in hmakerc lhea-fixperl Makefile-CCfits
config.log configure hd_install.c headas-init.sh hmake hmakerc.in Makefile Makefile-std
config.status configure.in hd_scanenv headas-setup hmake_hd install-sh Makefile.in
Any clue why this might be happening and how can be solved?
When Cygwin shell is opened cd /cygdrive/c/home/Mario and run make on your project from that directory. I remember I had similar issue when the current directory was /home/foo. I got it solved just changing the directory to /cygdrive/c/home/foo which is definitely is the same directory, but somehow Cygwin's Make likes it better

Error building LAPACK on Redhat 4.1

I am trying to build LAPACK (the full version) with ATLAS on Redhat 4.1. I have been successful in building ATLAS depending upon the tarfile of lapack:
atlas/configure --prefix=HOME/atlas --with-netlib-lapack-tarfile=HOME/lapack-3.4.1.tgz
make build
make check
make install
But I need the whole installation of LAPACK. I found
http://math-atlas.sourceforge.net/atlas_install/atlas_install.html
and
http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CGcQFjAA&url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.136.5309%26rep%3Drep1%26type%3Dpdf&ei=3C8YUKaqOIqm8AT6kYC4Cg&usg=AFQjCNHKbHg1H0qupmzQbj9tGq3tsmXRDQ&sig2=etIB36nxjasjUg4sEwQ0DQ
which suggest changing a few lines of the default make.inc.example to build the rest of LAPACK. However, I am unsuccessful in getting even the default build of LAPACK to work:
cp make.inc.example make.inc
compute-1-29.local make
( cd INSTALL; make; ./testlsame; ./testslamch; ./testdlamch; \
./testsecond; ./testdsecnd; ./testieee; ./testversion )
make[1]: Entering directory `/home/jmorgens/lap/lapack/INSTALL'
gfortran -O0 -c slamch.f -o slamch.o
/share/apps/gcc-trunk/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.2.0/f951: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
make[1]: *** [slamch.o] Error 1
make[1]: Leaving directory `/home/jmorgens/lap/lapack/INSTALL'
ASCII character set
Tests completed
/bin/sh: ./testslamch: No such file or directory
/bin/sh: ./testdlamch: No such file or directory
/bin/sh: ./testsecond: No such file or directory
/bin/sh: ./testdsecnd: No such file or directory
/bin/sh: ./testieee: No such file or directory
/bin/sh: ./testversion: No such file or directory
make: *** [lapack_install] Error 127
Suggestions?

Homebrew and Permission denied issue

I try to compile and install libapreq2 via Homebrew package manager.
brew create http://www.apache.si//httpd/libapreq/libapreq2-2.13.tar.gz
The content of the libapreq2.rb formula is as follows.
require 'formula'
class Libapreq2 < Formula
url 'http://www.apache.si//httpd/libapreq/libapreq2-2.13.tar.gz'
homepage ''
md5 'c11fb0861aa84dcc6cd0f0798b045eee'
# depends_on 'cmake'
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
# system "cmake . #{std_cmake_parameters}"
system "make install"
end
end
I proceed with
brew install -vd libapreq2
but unfortunately the compilation ended with errors.
mkdir: /usr/include/apache2/apreq2: Permission denied
make[3]: *** [install-pkgincludeHEADERS] Error 1
make[3]: *** Waiting for unfinished jobs....
/usr/bin/install -c .libs/mod_apreq2.so /usr/libexec/apache2/mod_apreq2.so
install: /usr/libexec/apache2/mod_apreq2.so: Permission denied
make[3]: *** [install-pkglibLTLIBRARIES] Error 71
make[2]: *** [install-am] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
Brew try to install some files outside the /usr/local/Cellar/libapreq2/ directory. I wonder how to manage these "permission denied" issues. I tried as root user (i.e., sudo brew install libapreq2), but if I later want to remove the library, only the files in /usr/local/Cellar/libapreq2/ are removed.
Thanks for any pointers.
Try this:
sudo chown -R $(whoami) /usr/local/Cellar/libapreq2/
It works for me!
Your package really shouldn't install anything in the system includes in /usr/include. The place for homebrew packaged includes is /usr/local/include (as symlinks into Cellar). You'll just have to adjust your ./configure invocation to use #{prefix}/include for the includes (probably --incdir or something very similar).

Resources