# Installing g95 on Linux

**URL:** https://fortran-lang.discourse.group/t/installing-g95-on-linux/494
**Category:** Uncategorized
**Created:** [December 17, 2020, 3:44pm UTC](https://fortran-lang.discourse.group/t/installing-g95-on-linux/494 "2020-12-17T15:44:17Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Beliavsky](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@Beliavsky](https://fortran-lang.discourse.group/u/Beliavsky)
#### Post date: [December 17, 2020, 3:44pm UTC](https://fortran-lang.discourse.group/t/installing-g95-on-linux/494/1 "2020-12-17T15:44:17Z")

</div>

G95 is no longer being developed by its primary author, and it is mostly a Fortran 95 compiler, but it is a robust if not speedy F95 compiler. It would be good to have it available, but many of the download links at the g95 [site](https://www.g95.org/downloads.shtml) are broken. Has anyone saved those binaries and/or the g95 source code? One could argue for its preservation on historical as well as practical grounds.

In particular, I have installed Windows Subsystem for Linux, Ubuntu 20.04.1 LTS and would like to install g95 on it.

I use g95 on Windows and have uploaded a MinGW binary [here](https://1drv.ms/u/s!Aigf3ob4jrIJhPwx7yDAogw7KsLndQ?e=CFX9F4).

---

<div class="post-metadata">

### Author: ![eugene\_epshteyn](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@eugene\_epshteyn](https://fortran-lang.discourse.group/u/eugene_epshteyn)
#### Post date: [December 18, 2020, 4:08pm UTC](https://fortran-lang.discourse.group/t/installing-g95-on-linux/494/2 "2020-12-18T16:08:24Z")

</div>

I believe there are several g95 fans hanging out on comp.lang.fortran. I suggest that you post your query there.

---

<div class="post-metadata">

### Author: ![billlong](https://avatars.discourse-cdn.com/v4/letter/b/71e660/32.png) [@billlong](https://fortran-lang.discourse.group/u/billlong)
#### Post date: [December 18, 2020, 8:54pm UTC](https://fortran-lang.discourse.group/t/installing-g95-on-linux/494/3 "2020-12-18T20:54:34Z")

</div>

The developer who supported g95 has moved onto other activities. The logical alternative/replacement is gfortran (part of GCC). gfortran is a very good free compiler.  
Farther down the road the new FLANG (part of the LLVM project) is anticipated to be another high-quality alternative. Given the roadmap, I don’t see anyone having the motivation to maintain g95 any longer.

---

<div class="post-metadata">

### Author: ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)
#### Post date: [December 19, 2020, 11:45am UTC](https://fortran-lang.discourse.group/t/installing-g95-on-linux/494/4 "2020-12-19T11:45:48Z")

</div>

Note also that gfortran was forked from G95 in 2003, as can be seen here:  
[https://sourceforge.net/projects/gcc-g95/](https://sourceforge.net/projects/gcc-g95/)

And G95 development was stopped at the beginning of 2013. Its sources seem to be available only in [https://www.g95.org/](https://www.g95.org/)

Here it’s empty: [https://sourceforge.net/projects/g95/files/](https://sourceforge.net/projects/g95/files/)

There is a G95 newsgroup with a few recent messages: [https://groups.google.com/g/gg95](https://groups.google.com/g/gg95)

---

<div class="post-metadata">

### Author: ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)
#### Post date: [December 19, 2020, 11:49am UTC](https://fortran-lang.discourse.group/t/installing-g95-on-linux/494/5 "2020-12-19T11:49:27Z")

</div>

Perhaps you can find something on the Internet Archive Wayback Machine:  
[https://web.archive.org/web/\*/g95%20fortran](https://web.archive.org/web/*/g95%20fortran)  
And especially here:  
[https://web.archive.org/web/20200129121027/http://ftp.g95.org/](https://web.archive.org/web/20200129121027/http://ftp.g95.org/)  
You can go back in time, for example in 2013…

---

<div class="post-metadata">

### Author: ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)
#### Post date: [December 19, 2020, 1:26pm UTC](https://fortran-lang.discourse.group/t/installing-g95-on-linux/494/6 "2020-12-19T13:26:58Z")

</div>

Note also that in the G95 websites, FTP links seem broken, but most of the http links seem OK.

---

<div class="post-metadata">

### Author: ![Beliavsky](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@Beliavsky](https://fortran-lang.discourse.group/u/Beliavsky)
#### Post date: [December 19, 2020, 2:31pm UTC](https://fortran-lang.discourse.group/t/installing-g95-on-linux/494/7 "2020-12-19T14:31:09Z")

</div>

I followed the suggestion of @vmagnin (thanks) and the instructions at [installing g95 on ubuntu 12.04](https://askubuntu.com/questions/297219/installing-g95-on-ubuntu-12-04) . I am using Ubuntu 20.04.1 LTS under Windows Subsystem for Linux. When trying to compile Hello World with g95 I get

```
/tmp/ccwKEEjc.s: Assembler messages:
/tmp/ccwKEEjc.s:11: Error: invalid instruction suffix for `push'
```

---

<div class="post-metadata">

### Author: ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)
#### Post date: [December 19, 2020, 4:03pm UTC](https://fortran-lang.discourse.group/t/installing-g95-on-linux/494/8 "2020-12-19T16:03:10Z")

</div>

> [@Beliavsky](#):
>
> `Error: invalid instruction suffix for `push’`

Seems to be an assembler problem. Could it be a 32 vs. 64 bits problem?

> <https://stackoverflow.com/questions/21679131/error-invalid-instruction-suffix-for-push>

---

<div class="post-metadata">

### Author: ![mecej4](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/mecej4/32/855_2.png) [@mecej4](https://fortran-lang.discourse.group/u/mecej4)
#### Post date: [October 5, 2021, 2:26pm UTC](https://fortran-lang.discourse.group/t/installing-g95-on-linux/494/9 "2021-10-05T14:26:24Z")

</div>

FTP links may appear broken since most modern browsers are dropping FTP support because of security concerns. If you have an FTP client, or Cygwin with the **wget** utility, you can still obtain a tarball from the g95 FTP site. For example, for Cygwin on Windows:

```auto
T:\>wget ftp.g95.org/g95-x86-cygwin.tgz
--2021-10-05 09:22:35-- http://ftp.g95.org/g95-x86-cygwin.tgz
Resolving ftp.g95.org (ftp.g95.org)... 69.89.19.165
Connecting to ftp.g95.org (ftp.g95.org)|69.89.19.165|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3271465 (3.1M) [application/x-tar]
Saving to: 'g95-x86-cygwin.tgz'

g95-x86-cygwin.tgz 100%[=================================================>] 3.12M 4.85MB/s in 0.6s

2021-10-05 09:22:35 (4.85 MB/s) - 'g95-x86-cygwin.tgz' saved [3271465/3271465]

```

For Linux, etc., you can similarly use **wget** to obtain the relevant tarball for your OS.
