-
Notifications
You must be signed in to change notification settings - Fork 18
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
Issues installing galacticus using install script #5
Comments
Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff). Further issues: I can manually install it with CPAN: ** Switch module ** Testing for Perl module Switch I was able to manually install withut problem using cpan. |
Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff). Regarding HDF5: Another perl package fails to install: Log-file: solved using manual CPAN install. |
Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff). In general regarding CPAN install: In Ubuntu/Mint the following command works to install perl packages (note the semicolon and install commands): sudo -E -S -- perl -MCPAN -e 'install List::MoreUtils; install List::Uniq' will work to install packages, but bash stumbles when using: perl -MCPAN -e ’force("install","Module::Name")’ where the important difference is the choice of quotation marks around the force statement. Looking at the instal script it seems that it uses "X" quotation marks, but that they somehow get converted to ’X’ in bash (Note that these are not the same as 'X'). Here is a one-liner that I think will install all the appropriate (minimal) perl requirements: sudo -E -S -- perl -MCPAN -e 'install List::MoreUtils; install List::Uniq; install XML::SAX; install XML::Validator::Schema; install Sort::Topological; Date::Time; Data::Dumper' |
Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff). Enhancement proposal: |
Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff). Building galacticus: ./work/build/stellar_populations.luminosities.p.F90:434.68:
Warning: Unused dummy argument 'parameterpointer' at (1) |
Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff). After using the install script I get errors when starting a new terminal:
The end of my bash_rc is:
The error goes away if I remove the last ' |
Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca). Thanks for reporting. I'll fix some of this issues immediately and send you questions about others. In future, can you file issues about the install scripts to their own repo at: https://bitbucket.org/abensonca/installationscripts Thanks! |
Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca). *gsl-config: Not installed by default in Ubuntu and Linux Mint: Can be installed with sudo apt-get install libgsl0-dev Install script says command not found, but continues.* This sounds like expected behavior - it's using the presence (or not) of gsl-config to test if gsl is installed. If it's not, it attempts to install it. |
Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca). *FGSL: will not configure. The error message is: basename: Missing operand. I solved it by installing gsl-bin (The configure script failed due to missing gsl-histogram when doing ./configure for FGSL).* More information needed: gsl-bin should have been installed already by the script. Did gsl-bin installation fail? It would be useful if you could upload the galacticusInstall.log file output during the installation process. |
Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca). *HDF5 HDF5 is already installed but the install script fails to recognize this and instead gives this message: program test; use hdf5; end program test 1 Fatal Error: Cannot read module file 'hdf5.mod' opened at (1), because it was created by a different version of GNU Fortran hdf5 - not found - will be installed* This is also expected behavior - it's testing if it can compile against the installed HDF5, discovers that it can't and so will try to install HDF5. *Installing via apt-get Reading package lists... Building dependency tree... Reading state information... hdf5-tools is already the newest version. I assume this is because I have installed a newer version of gfortran than was used to compile HDF5 for my system, but the install script fails instead of attempting a source install because a repository package is available. I guess a possible solution is to manually install HDF5 in a newer version, but perhaps you can figure out a better test? I got around this by rerunning the script without using the package-manager option. This has the downside of installing the rest of the software from source.* The install script should detect this situation if it installed GCC itself. If you installed GCC yourself to a different location, then the install script won't know about this, so it won't know that it needs to compile HDF5 from source. Unfortunately it's almost impossible to make an install script that detects every possible situation, and this could be one of those cases. *This works on Linux Mint 17, but compilation fails on Ubuntu 15.04 during testing. In the log file when installing from source I get: "Testing hard normalized long double -> signed char conversion Command terminated by signal 11" If trying to install from the package manager in Ubuntu 15.10 I get no errors, but the test for hdf5 fails again: Fatal Error: Can't open module file 'hdf5.mod' for reading at (1): No such file or directory. I am at this moment unsure if this is a bug in the Ubuntu packages.* Installing HDF5 via the package manager almost certainly won't work if you installed your own GCC - the version in the package manager would be compiled with a much earlier version of GCC so would be incompatible. It will be necessary to install HDF5 from source. |
Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca). Regarding the various Perl module install failures. Since they install cleanly with CPAN when you use sudo it seems the problem must be that you don't have a Perl locallib set up to allow you to install as a local user. What does: perl -I$HOME/perl5/lib/perl5 -Mlocal::lib show? |
Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca).
perl -MCPAN -e ’force("install","Module::Name")’ where the important difference is the choice of quotation marks around the force statement. * Can you provide an example of this failing in bash? I don't see this behavior. The scripts use: perl -MCPAN -e "force('install','package')" quoting. |
Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca). Regarding HDF5: This problem was solved by running with CFLAGS=-O0 before running ./configure (in the hdf5 folder in galacticusInstallwork) This looks like a known problem in kernel versions prior to 3.5. The install scripts handle this case when installing HDF5 if they detect an earlier kernel version. |
Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca). *After installing it compilation progresses further but fails at: ./work/build/stellar_populations.luminosities.p.F90:434.68: function Filter_Luminosity_Integrand(wavelength,parameterPointer) bind(c) Warning: Unused dummy argument 'parameterpointer' at (1) ./work/build/stellar_populations.luminosities.p.F90: In function ‘__stellar_population_luminosities_MOD_stellar_population_luminosity._omp_fn.0’: ./work/build/stellar_populations.luminosities.p.F90:67:0: internal compiler error: in get_expr_operands, at tree-ssa-operands.c:900 use Memory_Management ^ Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-4.9/README.Bugs for instructions. make: *** [work/build/stellar_populations.luminosities.o] Error 1 failed to build Galacticus* This looks like you're trying to build with GCC v4.9 which is too old. You need the latest (v6.0) version of GCC. If you installed the latest version then you may need to adjust your PATH environment variable to make sure that the new version takes priority. |
Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca). Thanks for all of these reports. Testing the installation scripts is difficult unfortunately, so bugs often creep in. I'm hoping to have a better testing solution for them soon. For future bug reports, please open a separate issue for individual problem - it makes it easier to track them and get them resolved more rapidly. |
Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca). The install script now has an additional option "binary" which will not attempt to compile Galacticus, but instead downloads the statically-linked binary (and one or two Perl modules required to run the test model). Thanks for the suggestion! |
Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff). I will try to respond in the same order as you: Yes, I will submit bugs to the other repository in the future. Maybe update the webpage to indicate that the repo exists? Currently the install scripts list your email under "report".
"FGSL: will not configure. The error message is: basename: Missing operand. I will post the relevant galacticusInstall.log file output when I try with a fresh install. By the way: For debugging purposes it would be useful if the logfile also contained the stdout output (I guess this could be done with the tee command). That way you don't have to scroll the two next to each other. Outputting the actual commands would also help but I think this is trickier to do. |
Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff). Regarding HDF5: I agree that this is probably one of the cases that will unavoidably fall outside of the scope of the script to handle in all cases. |
Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff). Regarding the various Perl module install failures. Since they install cleanly with CPAN when you use sudo it seems the problem must be that you don't have a Perl locallib set up to allow you to install as a local user. What does: hans@hans-VirtualBox:~$ perl -I$HOME/perl5/lib/perl5 -Mlocal::lib But I was always installing using sudo and for all users so I doubt that this is the problem. perl -MCPAN -e ’force("install","Module::Name")’ I don't understand how/why, but in the case of Bash running on Mint/Ubuntu the script converts the double quote (") to single quotes before running which triggers the error. Using
everything works just fine. This is probably a trickier bug to track down. |
Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff). Regarding HDF5: This problem was solved by running with CFLAGS=-O0 before running ./configure (in the hdf5 folder in galacticusInstallwork) I believe the kernel version that experienced the problem was 3.13. But maybe the bug is present elsewhere as well. I will test later to see if the problem persists. |
Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff). This looks like you're trying to build with GCC v4.9 which is too old. You need the latest (v6.0) version of GCC. If you installed the latest version then you may need to adjust your PATH environment variable to make sure that the new version takes priority. That's fair, I am running GCC 4.9 since that was mentioned in the manual (p. 6) and that is the newest version readily avaliable for my system. It is only needed for the compilation, not for running galacticus, correct? |
Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca).
In most cases the stdout from commands is redirected to the log file. Do you |
Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca). When you try re-installing, please try the attached version of the install script first. I've added an extra function which will cause commands to be written to the log file before they are executed as you suggested. Currently, this is only implemented for regular "configure/make/make install" builds, but if it works I'll extend it to other command also. |
Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff). "How do you know that the script is converting " to ' before running the command? Is this written to stdout or the log file?" It was written in the log file as the bash error. It complained about the unexpected (. |
Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff). "In most cases the stdout from commands is redirected to the log file. Do you see specific cases where this does not happen?" |
Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca). I think commands saying that e.g. an install failed are not sent to sdterr as well. Thus a silent failure (from the point of view of the log) can occur. I've modified the script such that all "failed" messages should get written to stdout and also to the log file. Please try the copy of the script attached to this issue report - if it works OK for you I'll go ahead and commit it. |
Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff). Log file obtained from running the install script at minimal level. But the module switch sees the same substitution of quotation marks as I described earlier. If you want the discussion can continue here and we can close this very confusing bug report. I hope my bug reports are still useful :) |
Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca). LaTeX::Encode has some issues - if I had time I would attempt to submit patches for the module.....! Your bug reports are definitely very helpful. Unfortunately, it's essentially impossible (based on my experience) to create an install script that can work correctly with every system - there are just two many different versions of libraries, interdependencies and corner cases that need to be handled. So, my goal is to make the script as robust as possible, but it seems clear that it will always struggle on some systems. |
Original report by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff).
I am trying to install galacticus using the provided install script. (I have tried in version 14.04 of Ubuntu Linux (I am currently updating this to newer version with more up to date fortran packages) and Linux Mint version 17)
Here are some issues that I ran into while installing and some pointers to what was needed to bypass them for use by other people trying to install galacticus or for improvements to the install script.
I don't have a working version yet, but I am getting closer. :)
I have run into some issues with 404 error due to dead links:
APR: The APR version on motorlogy is now 1.5.2 and 1.5.1 is no longer available (due to security issues)
gsl-config: Not installed by default in Ubuntu and Linux Mint: Can be installed with
sudo apt-get install libgsl0-dev
Install script says command not found, but continues.
FGSL: will not configure. The error message is:
basename: Missing operand.
I solved it by installing gsl-bin (The configure script failed due to missing gsl-histogram when doing ./configure for FGSL).
** HDF5 **
HDF5 is already installed but the install script fails to recognize this and instead gives this message:
program test; use hdf5; end program test
1
Fatal Error: Cannot read module file 'hdf5.mod' opened at (1), because it was created by a different version of GNU Fortran
hdf5 - not found - will be installed
Installing via apt-get
Reading package lists...
Building dependency tree...
Reading state information...
hdf5-tools is already the newest version.
I assume this is because I have installed a newer version of gfortran than was used to compile HDF5 for my system, but the install script fails instead of attempting a source install because a repository package is available.
I guess a possible solution is to manually install HDF5 in a newer version, but perhaps you can figure out a better test? I got around this by rerunning the script without using the package-manager option. This has the downside of installing the rest of the software from source.
This works on Linux Mint 17, but compilation fails on Ubuntu 15.04 during testing.
In the log file when installing from source I get:
"Testing hard normalized long double -> signed char conversion Command terminated by signal 11"
If trying to install from the package manager in Ubuntu 15.10 I get no errors, but the test for hdf5 fails again:
Fatal Error: Can't open module file 'hdf5.mod' for reading at (1): No such file or directory.
I am at this moment unsure if this is a bug in the Ubuntu packages.
** OpenSSL **
I get the error:
Could not make OpenSSL.
I was able to bypass the problem by installing the package: libssl-dev
** Perl modules:**
Sort::Topological - not found - will be installed
Installing via CPAN
...failed
Log file says:
Can't locate Sort/Topological.pm in @inc (you may need to install the Sort::Topological module) (@inc contains: /home/hans/perl5/lib/perl5 /usr/local/galacticus/lib/perl5 /home/hans/perl5/lib64/perl5 /usr/local/galacticus/lib64/perl5 /home/hans/perl5/lib/perl5/site_perl /usr/local/galacticus/lib/perl5/site_perl /home/hans/perl5/lib64/perl5/site_perl /usr/local/galacticus/lib64/perl5/site_perl /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
Sort::Topological - not found - will be installed
Installing via CPAN
This doesn't work, but I can bypass by writing:
sudo cpan
followed by
install Sort:Topological
The text was updated successfully, but these errors were encountered: