Skip to content

Conversation

smeskos
Copy link
Contributor

@smeskos smeskos commented Oct 6, 2020

Hi all, this PR is a follow-up to Issue #134.
The goal is to provide, in a beginners-friendly format, all the necessary steps to choose and install a compiler, as well as it includes information about text-editors and IDEs.
It is not complete and definitely needs "attention"... take it as a template to start building on it.
The part with the text-editors needs a few of you with experience with some of those editors to contribute with "how to configure them".
I am aware that some parts are opinionated, but the topic itself is subjective by nature... choosing compilers, text-editors, or IDEs. Let's discuss them and find a common path.

@arjenmarkus
Copy link
Member

arjenmarkus commented Oct 6, 2020 via email

@smeskos

This comment has been minimized.

@github-actions

This comment has been minimized.

@smeskos
Copy link
Contributor Author

smeskos commented Oct 6, 2020

The link at the preview doesn't work. I am now sure why. I've built it locally and the site appears fine.

Copy link
Member

@LKedward LKedward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @smeskos, many thanks! I've had a quick read through and left a few minor corrections.

  • I've left a suggestion to expand the section on WSL etc. with some important points.

  • The page on OpenCoarrays is short and I think it would be better suited as a subsection on the gfortran page since it describes how to 'enable' coarrays with gfortran.

(The preview link is working for me. If you're not seeing anything, try here: https://fortran-lang.org/pr/152/?v=2)

smeskos and others added 9 commits October 6, 2020 12:26
Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
@smeskos
Copy link
Contributor Author

smeskos commented Oct 19, 2020

Thank you @milancurcic for this detailed review. Following your recommendation, I also added a link to a tutorial for update-alternatives.

@smeskos
Copy link
Contributor Author

smeskos commented Oct 19, 2020

#build_preview

@github-actions
Copy link

This PR has been built with Jekyll and can be previewed at: https://fortran-lang.org/pr/152/

@milancurcic
Copy link
Member

@arjenmarkus Do you need more time to review this or it's good to go?

@arjenmarkus
Copy link
Member

arjenmarkus commented Oct 20, 2020 via email

@certik
Copy link
Member

certik commented Oct 20, 2020

I read through it, this is good enough to merge and we can improve it with future PRs. After @arjenmarkus approves, let's merge it.

I think our tools should support all editors, but I think we should ensure that at least one editor works first class.
I think we should pick an editor and provide tutorials with screenshots using it, and we should also write extensions to such an editor with fpm support, with formatting support, with Flang and LFortran support etc. Such an editor should work cross platform, and be in wide use. I think it should be VSCode. But as I said, we should write our tools in an editor independent way, but by ensuring that things just work in VSCode, we can simply direct new users to it, and make our lives simpler. And we can support other editors as we have time, but don't have to stress about it too much, since we have a nice default that will do the job for new users.

@arjenmarkus
Copy link
Member

arjenmarkus commented Oct 20, 2020 via email

@arjenmarkus
Copy link
Member

arjenmarkus commented Oct 20, 2020 via email

2. [TDM GCC](https://jmeubank.github.io/tdm-gcc/articles/2020-03/9.2.0-release), provides 32 and 64-bit x86 executables of the 9.2 gcc-version.
3. [Mingw-w64](http://mingw-w64.org/doku.php/download/mingw-builds) provides a 64-bit x86 executable of the 7.2 gcc-version.
2. [TDM GCC](https://jmeubank.github.io/tdm-gcc/articles/2020-03/9.2.0-release), provides 32 and 64-bit x86 executables of the 9.2 gcc-version.
3. [Mingw-w64](http://mingw-w64.org/doku.php/download/mingw-builds) provides a 64-bit x86 executable of the 7.2 gcc-version.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest: MinGW-w64/MSYS2 provides 32 and 64-bit x86 executable of the 10.2 gcc-version


In all the above choices, the process is straightforward—just download the installer and follow the installation wizard.

### Unix-like development on Windows
For those familiar with a unix-like development environment, several emulation options are available on Windows each of which provide packages for gfortran:

* __Cygwin:__ A runtime environment that provides POSIX compatibility to Windows;
* __MSYS2:__ A collection of Unix-like development tools for compiling native Windows binaries;
* __Windows Subsystem for Linux (WSL):__ An official compatibility layer for running Linux binary executables on Windows.
* __MSYS2:__ A collection of Unix-like development tools for compiling native Windows binaries;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest: MinGW-w64: ...

(There is more to say about all this, but that is not suitable for an introductory text like this! I have struggled with it recently, hence my emphasis on getting it least wrong)

@LKedward
Copy link
Member

Hi @arjenmarkus, the current text on MSYS2 and MinGW was written by myself. I will address your comments with an update. Can you be more specific about what you understand the relationship between MSYS2 and MinGW-w64 to be?
My understanding is that they are separate with MSYS2 providing one (of three) environments that is built atop MinGW-w64, hence why I have written that you can freely distribute programs. Yes, there is a 'native' MSYS2 environment that has it's own DLL dependency, however this environment is only recommended for developing tools for the MSYS2 .

@arjenmarkus
Copy link
Member

arjenmarkus commented Oct 20, 2020 via email

@arjenmarkus
Copy link
Member

arjenmarkus commented Oct 20, 2020 via email

@LKedward
Copy link
Member

Thanks @arjenmarkus, that essentially aligns with my understanding. However it should be clear that the MinGW-w64 toolchain is separate to MSYS2 and can be distributed independent of it.
Further, when you use the native MSYS2 shell, the compiler toolchain is not MinGW, but an MSYS2 native build of gcc.

The text I have written makes the assumption that the reader will use one of the MinGW shells in MSYS2 as opposed to the 'native' MSYS2 shell which should only be used for writing programs to distribute in MSYS2.

To be clear, the following compile environments are available:

  • MinGW-w64: compiler toolchain only (no shell), links with Microsoft libs (native Windows), called from Windows shell
  • MSYS2/mingw64: MinGW-w64 compiler toolchain provided as an MSYS2 package, links with Microsoft libs, called from MSYS2 shell
  • MSYS2/mingw32: same as above with 32bit x-compile target
  • MSYS2/MSYS2: GNU compiler collection compiled within the POSIX environment provided by MSYS2, links with msys-2.0.dll

I will update the text tomorrow to make it simpler and clearer to a beginner.

@smeskos
Copy link
Contributor Author

smeskos commented Oct 20, 2020

@LKedward:

I will update the text tomorrow to make it simpler and clearer to a beginner.

Please try to do that.
I am also reading info from here msys2.org/wiki/History and trying to understand it as well.
My main concern is that every attempt to clarify all these options will lead to content outside of this tutorial's scope.
Honestly, I'd rather remove the whole last paragraph and don't even mention about differences between MSYS2, Cygwin, and MinGW-w64.

@certik
Copy link
Member

certik commented Oct 20, 2020

Why don't we remove the paragraph, merge this PR, and then let's open another PR with just the mingw clarification and we can figure it out there?

@arjenmarkus
Copy link
Member

arjenmarkus commented Oct 21, 2020 via email

Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
@LKedward
Copy link
Member

Thanks @smeskos - I agree, removing that paragraph is the clearest we can be for the scope of this tutorial.

@milancurcic
Copy link
Member

This is now good to merge, correct?

@arjenmarkus
Copy link
Member

arjenmarkus commented Oct 21, 2020 via email

@milancurcic
Copy link
Member

Thank you all, and especially @smeskos who led the effort!

@milancurcic milancurcic merged commit 5f95844 into fortran-lang:master Oct 21, 2020
@smeskos smeskos deleted the new_mini_book--OS-setup-for-Fortran-developement branch October 21, 2020 15:37
@certik
Copy link
Member

certik commented Oct 21, 2020

Thanks everybody, I am glad this is in.

@awvwgk
Copy link
Member

awvwgk commented Feb 13, 2021

#delete_preview

@github-actions
Copy link

The preview build for this PR has now been deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants