Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installations information link and skeletal script #65

Closed
rouson opened this issue Sep 26, 2016 · 12 comments
Closed

Installations information link and skeletal script #65

rouson opened this issue Sep 26, 2016 · 12 comments
Assignees

Comments

@rouson
Copy link

rouson commented Sep 26, 2016

It would be nice if the FLAP README and GitHub Pages documentation contained links to the FLAP compilation instructions on the wiki. Starting from the README and perusing the Pages documentation, it took some time to figure out that the compilation instructions are on the wiki.

Specifically, it would be great if there were either an INSTALL.md file at the top level of the source tree or simply an Installation section in the README.md contains a link to the Compile page on the wiki. Also, even just a really simple installation script would be nice. It might just be a few lines:

$ cat install.sh
#!/bin/bash
sudo apt-get install python-pip python-dev build-essential #For Debian-based Linux if pip not already installed
sudo pip install FoBiS.py
git clone https://github.com/szaghi/PENF
cd PENF
FoBiS.py build
cd ..
cp PENF/shared/mod/*.mod src/lib/
Fobis.py build

I realize the above script is not robust in several ways, but even just having a skeletal script at the top level of the source tree as a guide could save a lot of reading and searching. Once the script is there, people might add to it and make it more solid, but it really helps to start from something that at least worked on some system somewhere.

@szaghi
Copy link
Owner

szaghi commented Sep 26, 2016

Hi Damian, as I said in the other thread I am out of office now. When I
come back we will have a make/cmake system. Cheers.

Il 26/set/2016 11:12, "Damian Rouson" notifications@github.com ha scritto:

It would be nice if the FLAP README
https://github.com/szaghi/FLAP/blob/master/README.md and GitHub Pages
documentation http://szaghi.github.io/FLAP/ contained links to the FLAP
compilation instructions on the wiki. Starting from the README and perusing
the Pages documentation, it took some time to figure out that the
compilation instructions are on the wiki.

Specifically, it would be great if there were either an INSTALL.md file at
the top level of the source tree or simply an Installation section in the
README.md contains a link to the Compile
https://github.com/szaghi/FLAP/wiki/Compile page on the wiki. Also,
even just a really simple installation script would be nice. It might just
be a few lines:

$ cat install.sh
#!/bin/bash
sudo apt-get install python-pip python-dev build-essential #For Debian-based Linux if pip not already installed
sudo pip install FoBiS.py
git clone https://github.com/szaghi/PENF
cd PENF
FoBiS.py build
cd ..
cp PENF/shared/mod/*.mod src/lib/
Fobis.py build

I realize the above script is not robust in several ways, but even just
having a skeletal script at the top level of the source tree as a guide
could save a lot of reading and searching. Once the script is there, people
might add to it and make it more solid, but it really helps to start from
something that at least worked on some system somewhere.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#65, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABlb9i_98Z8PydFF4GlAisC5ltIHDpGkks5qt4xogaJpZM4KGTBB
.

@szaghi
Copy link
Owner

szaghi commented Sep 27, 2016

@rouson

I just read this issue more carefully. All your suggestions are right. I'll update documentation very soon. Moreover, the currently provided makefile is broken due to the last updates to PENF. I will fix this soon.

@szaghi
Copy link
Owner

szaghi commented Sep 27, 2016

The provided makefile is now up-to-date 😄

@szaghi
Copy link
Owner

szaghi commented Sep 27, 2016

@rouson

Hi Damian,

I have updated README and Wiki:

Let me know what you think about this documentation.

Concerning the installation script let me think few, I would like to discuss with @zbeekman and @victorsndvg that more wise than me. Your proposal about ubuntu-stuff (apt-get ...) let me afraid... I am an Archer...

Cheers.

@szaghi
Copy link
Owner

szaghi commented Sep 29, 2016

@rouson

I am working on the install script. I read more carefully your example... there is a misunderstanding on how work FoBiS

...
git clone https://github.com/szaghi/PENF
cd PENF
FoBiS.py build
cd ..
cp PENF/shared/mod/*.mod src/lib/
Fobis.py build

all these stuff are not necessary to build FLAP.

FoBiS can build automatically all by default, moreover with FLAP tree, where there is an already-setup fobos file, there is not the necessity to build PENF separately. Once you have cloned FLAP (recursively) you only need to type

FoBiS.py build

and the FLAP library is magically built.

What I am really afraid is how the installer should handle the building systems (now you can use also a legacy makefile or a more powerfull CMake setup alongside FoBiS) and the place where the compiled library must be placed. For FoBiS.py I am providing a nice way that do not require sudo power, but for GNU Make and CMake I do not know how to better handly their installation. And after FLAP is built, where I should place .a/.so and .mod files? My simple solution is to left compiled FLAP inside the FLAP tree...

You have a great experience, can you give me some hints on these?

Thank you as always.

@rouson
Copy link
Author

rouson commented Sep 29, 2016

I'm pretty sure I tried what you're recommending and it didn't work. It would be great to set up some time to go over this interactively via screen-share. My guess is we'll iterate to an answer much faster that way. As before, feel free to book a time at http://rouson.youcanbook.me. I teach on Mondays and Wednesdays this Fall so other days are preferred.

@szaghi
Copy link
Owner

szaghi commented Sep 30, 2016

@rouson Sure, it is always a pleasure to talk with you. Now I am out of office. Let me think when I come back. In the meanwhile I report all the commands that should work (I guess that somithings with submodules of git are going wrong).

git clone --recursive https://github.com/szaghi/FLAP
cd FLAP
git submodule update --init --recursive
FoBiS.py build #this build only the library as shared libflap.so, pass other modes for other buildings

I see that in the readme I forget to initialize the submodules... my bad!

Thank you very much for your help!

P.S. on a thread on comp.lang.fortran you have been "tagged" as my evangelist of OOP because I reported your teachings 😄

P.P.S. have you planned a travel to Rome in the next future, maybe to meet Filipone or for a class? If for any reasons you should come in Rome in the next future (1 year I shoull stay here) let me know please 😄

@szaghi
Copy link
Owner

szaghi commented Oct 5, 2016

@rouson

Hi Damian,

I have just added an install script, install.sh. It does not cover all possibilities, but it is able to download and build the project with some sane-bunch-of-options. For details on how invoke the script I added some doc here in the README, but it is a very simple script that is almost self-explanatory.

I am closing this issue: probably, this script is the best (an optional improvement will be try to add some intelligence for installing, in user-space, FoBiS on system that have not it yet) that I would like to do to automatize the project install because for covering all scenario I have to invest to much time on the install script itself. Nevertheless, feel free to reopen the issue for any reasons.

@szaghi szaghi closed this as completed Oct 5, 2016
@szaghi szaghi self-assigned this Oct 5, 2016
@victorsndvg
Copy link

Hi @szaghi ,

nice script I will try it as soon as possible!

There is a minor fix in L90 in the build step with cmake. (I also need to fix it in my README.md files...).

To ensure portability, the recomended cmake build command is:

cmake --build .

instead of:

make

Using cmake --build [BUILD_PATH] you can ignore which generator was used to create the compilation system of the project (make, visual studio, eclipse, nmake, etc.)

@rouson
Copy link
Author

rouson commented Oct 5, 2016

Bravo! 👏

In the open-source world, I think even a minimal installation script is a must. It doesn't have to cover all possible cases. Interested users can add to the script to handle previously uncovered cases. It will probably be a while before I test this, but I'll gladly add to the script when I do.

@szaghi
Copy link
Owner

szaghi commented Oct 5, 2016

@rouson you are right as usual

@szaghi
Copy link
Owner

szaghi commented Oct 6, 2016

@victorsndvg @rouson

Now the install script is shipped also as a standalone asset, from release. Thus the end user that do not want to bother with git/FoBiS can download only the script and use it almost blindly. I updated the doc.

Cheers.

P.S. this is all automatized by Travis CI, thus it can be worth to be shared into our group.

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

No branches or pull requests

3 participants