"make" in a Fortran library results in "Command not found" error - g77

I have Ubuntu 10.04 and gcc version 4.4.3
I have been trying to install this library called SUPER_LU and there are some codes in it are written in Fortran. Typing "make" at the top level directory gives me the following errors
gaurish108#gaurish108-laptop:~/Desktop/Research Meetings/PETSC and SUper LU/SuperLU_4.0$ make
( cd INSTALL; make )
make[1]: Entering directory `/home/gaurish108/Desktop/Research Meetings/PETSC and SUper LU/SuperLU_4.0/INSTALL'
g77 -o testdlamch dlamch.o lsame.o dlamchtst.o
***make[1]: g77: Command not found***
make[1]: *** [testdlamch] Error 127
make[1]: Leaving directory `/home/gaurish108/Desktop/Research Meetings/PETSC and SUper LU/SuperLU_4.0/INSTALL'
make: *** [install] Error 2
This has happened with me in the past also when i tried to download some math libraries? always thought g77 cam bundles up with gcc. When I tried to install g77 separately with sudo apt-get install g77, this is what I got
gaurish108#gaurish108-laptop:~/Desktop/Research Meetings/PETSC and SUper LU/SuperLU_4.0$ sudo apt-get install g77[sudo] password for gaurish108:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package g77 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package g77 has no installation candidate
What should I do?

As of gcc 4.0, g77 has been replaced with gfortran.

Related

Build Coq and CoqIDE from source

Following this post I managed to install LablGtk (I think) but still when I try to configure-make Coq I get the following message that CoqIDE will not be built:
$ ./configure
You have OCaml 4.09.0+dev0-2019-01-18. Good!
You have OCamlfind 1.7.1. Good!
You have native-code compilation. Good!
You have the Num library installed. Good!
Warning: Incomplete LablGtk2 (via ocamlfind): no /usr/local/lib/ocaml/4.04.0/lablgtk2/gSourceView2.cmi.
Warning: Incomplete LablGtk2 (in OCaml library): no /usr/lib/ocaml/lablgtk2/gSourceView2.cmi.
LablGtk2 not found:
=> no CoqIde will be built.
Where should I install the Coq binaries [/usr/local/bin]?
How can I make sure LablGtk is installed? or if something else is missing?
EDIT:
I ran sudo make install again from the extracted LablGtk folder and I now see it failed because it already has this library, but it is somehow associated with an old ocaml version (???):
$ sudo make install
ocamlfind: Package lablgtk2 is already installed
- (file /usr/local/lib/ocaml/4.04.0/lablgtk2/META already exists)
Makefile:400: recipe for target 'findlib-install' failed
make[1]: *** [findlib-install] Error 2
make[1]: Leaving directory '/home/oren/Downloads/lablgtk-2.18.7/src'
Makefile:5: recipe for target 'install' failed
make: *** [install] Error 2

Setting up Fortran in Eclipse PTP via homebrew

Using homebrew on my El Capitan(10.11.6), i installed java and eclipse-ptp through the following commands:
brew cask install java
brew cask install eclipse-ptp
I have gcc and thus gfortran through homebrew from earlier.
Eclipse PTP got copied into the Apps successfully. I opened the application and created a helloworld demo project and tried to build it. I get the following message in the build console window:
make all
make: gfortran: No such file or directory
gfortran -O2 -g \
-o bin/demo \
src/demo.f90
make: *** [all] Error 1
I glean that this issue maybe due to improper setting of the path variable, what i do fail to understand is:
Given that all the installs happened through homebrew, why is this problem appearing?
How do i fix this issue?

Which missing library results in the message '/usr/bin/ld: cannot find -lglib-2.0'?

I am cross compiling a Lazarus program, creating a 32bit program on a 64bit Ubuntu 14.04 Trusty Tahr system, and everything apparently compiles to the very end when I get this messsage
/usr/bin/ld: cannot find -lglib-2.0
What is the full name of the library whose absence results in this error mesage?
libc6-dev:i386 appears to be the most likely library, but when I try to install it with apt indicates build-essential g++ gcc gcc-multilib will be removed so I abort it.
sudo apt-get install libc6-dev:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
linux-libc-dev linux-libc-dev:i386
Suggested packages:
glibc-doc:i386 manpages-dev:i386
Recommended packages:
gcc:i386 c-compiler:i386
The following packages will be REMOVED
build-essential g++ gcc gcc-multilib
The following NEW packages will be installed
libc6-dev:i386 linux-libc-dev:i386
The following packages will be upgraded:
linux-libc-dev
1 to upgrade, 2 to newly install, 4 to remove and 18 not to upgrade.
Need to get 3,126 kB of archives.
After this operation, 12.6 MB of additional disk space will be used.
Do you want to continue? [Y/n]
It turns out it was the libglib2.0-0:i386 package. It was already installed earlier, but it had not been fully configured.
It was present in the /lib/i386-linux directory and I had to create a symlink to it include it to the fpc.cfg configuration file used by Free Pascal.
locate libglib | grep ^/lib produced:
/lib/i386-linux-gnu/libglib-2.0.so.0
/lib/i386-linux-gnu/libglib-2.0.so.0.4002.0
/lib/x86_64-linux-gnu/libglib-2.0.so.0
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0
I symlinked it with the expected name:
ln -s /lib/i386-linux-gnu/libglib-2.0.so.0 /lib/i386-linux-gnu/libglib-2.0.so
then added to the Lazarus installations fpc.cfg file
#ifdef cpui386
-Fl/usr/lib32
-Fl/lib/i386-linux-gnu
#endif

glib2 build can't find automake 1.13 when automake 1.14 is installed

I'm attempting to build glib-2.36.4 on CentOS5. I realize it would be wiser to upgrade to 6 but this isn't possible because of a customer requirement.
I've started a make build and I get the below error. The error complains that automake-1.13 doesn't exist on the system. However, I built automake 1.14 and installed it. An automake --version outputs the correct version.
I've done a yum list installed | grep automake to insure automake doesn't have conflicting installations.
I've tried googling the issue but I can't come up with anything.
make[4]: Entering directory `/home/tharper/glib-2.36.4/docs/reference/glib'
cd ../../.. && /bin/sh /home/tharper/glib-2.36.4/missing
automake-1.13 --gnu docs/reference/glib/Makefile
/home/tharper/glib-2.36.4/missing: line 81: automake-1.13: command not found
WARNING: 'automake-1.13' is missing on your system.
You should only need it if you modified 'Makefile.am' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'automake' program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/>
make[4]: *** [Makefile.in] Error 127
make[4]: Leaving directory `/home/tharper/glib-2.36.4/docs/reference/glib'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/tharper/glib-2.36.4/docs/reference'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/tharper/glib-2.36.4/docs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tharper/glib-2.36.4'
make: *** [all] Error 2
From the top level directory run the command
automake
Basically, your makefiles were built using Automake 1.13 and now you've got 1.14 they're getting confused, so running automake will recreate all the Makefiles using your new version.
In my side, it will show some warning after run automake, and I run the command to resolved this issue:
autoreconf -ivf
I ran in a similar problem when trying to compile gnome-mplayer-1.0.9.2 on Ubuntu 14.01.1.
I managed to resolve it by running the following commands in the source folder:
aclocal
automake
./configure
make

How to install XML::Parser without expat-devel?

XML::Parser fails to build on a quite fresh 64-bit Debian box. After issuing cpan XML::Parser, cpan fails with lots of errors about Expat.c and Expat.xs:
[...]
Expat.xs:2182: error: ‘CallbackVector’ has no member named ‘skip_until’
Expat.c: In function ‘XS_XML__Parser__Expat_Do_External_Parse’:
Expat.c:2904: error: ‘XML_Parser’ undeclared (first use in this function)
Expat.c:2904: error: expected ‘;’ before ‘parser’
Expat.xs:2194: error: ‘parser’ undeclared (first use in this function)
make[1]: *** [Expat.o] Error 1
make[1]: Leaving directory `/root/.cpan/build/XML-Parser-2.41-rpV6ok/Expat'
make: *** [subdirs] Error 2
TODDR/XML-Parser-2.41.tar.gz
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Message at the start of the output explains that expat-devel is needed for building.
Expat must be installed prior to building XML::Parser and I can't find
it in the standard library directories. Install 'expat-devel' package with your
OS package manager. See 'README'.
But expat-devel is not in Debian repository.
Is it possible to get over this without need to build/install expat from source?
The package you want to install is named libexpat1-dev. You could also just install libxml-parser-perl via apt-get. Or if you really want to install via CPAN try installing the Debian packages dependencies first via apt-get build-dep libxml-parser-perl.
libexpat1-dev contains both libexpat and expat.h, which are both mentioned in the message as well:
If expat is installed, but in a non-standard directory, then use the
following options to Makefile.PL:
EXPATLIBPATH=... To set the directory in which to find libexpat
EXPATINCPATH=... To set the directory in which to find expat.h
Installing libexpat1-dev seems to solve the problem:
$ aptitude install libexpat1-dev
There is always the manual method - to build/install expat from source.
(This example shows installing to an alternative location for XAMPP | LAMPP)
Download from:
http://sourceforge.net/projects/expat/files/expat/
tar zxf /[where-ever]/expat-2.1.0.tar.gz -C /tmp
cd /tmp/expat-2.1.0
/opt/lampp/bin/perl ./configure --prefix=/opt/lampp LDFLAGS=-L/opt/lampp/lib
make
make install
http://search.cpan.org - search for and download - XML::Parser
tar zxf /[where-ever]/XML-Parser-2.41.tar.gz -C /tmp
cd /tmp/XML-Parser-2.41
/opt/lampp/bin/perl ./Makefile.PL EXPATLIBPATH=/opt/lampp/lib EXPATINCPATH=/opt/lampp/include
make
make test
make install
Work like a charm in Ubuntu 15.04. The only thing that I need is install Perl XML Parser with:
sudo apt-get install libxml-parser-perl
And following the instructions here, I was able to import successfully all my ratings into Rhythmbox. Now, the only work that I need to do is create again the smart play lists, that is nothing compared with my entire libray ratings.
Today I had the same issue wanting to complile the new GIMP 2.9.4 beta on OSX 10.8 and the aid of homebrew.
First install perl
brew install perl
Then the XML::Parser module by going into the perl shell with
perl -MCPAN -e shell
And inside the shell install XML::Parser by typing
install XML::Parser
Exit shell
exit
Now, verify it has been installed successfully. If everything is ok, you will not see an error.
perl -e "require XML::Parser"
If the ./configure still fails missing XML::Parser, then intltools is not using the perl you have installed. Looking at the script tells me it does the test with $INTLTOOL_PERL -e "require XML::Parser". Trying a echo $INTLTOOL_PERL gave out nothing, so the magic is to set it with
export $INTLTOOL_PERL=perl
Now run ./configure again.
None of the above methods worked for me. I had the right environment variables setup but they were somehow not picked up by cpanm that I use to install perl modules. Expat was also installed.
Here is what I did to overcome the same problem that OP is reporting.
This is very close to what #LadyBuzz suggested.
Download the XML::Parser from cpan.org
Extract the tarball into directory and descend to it.
Open the Makefile.pl and edit the first lines to actually have the absolute paths to both: EXPATLIBPATH and EXPATINCPATH
Save the Makefile.pl, go up one level and create a new tarball with the Makefile.pl that you just edited.
Execute cpanm on the newly created tarball.
This resulted in successful installation of the module.