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

Issues installing galacticus using install script #5

Closed
abensonca opened this issue Sep 9, 2015 · 36 comments
Closed

Issues installing galacticus using install script #5

abensonca opened this issue Sep 9, 2015 · 36 comments
Labels
bug Something isn't working minor

Comments

@abensonca
Copy link
Collaborator

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

@abensonca
Copy link
Collaborator Author

Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff).


Further issues:
LaTeX:Encode fails with "Compilation failed in require at -e line 1",
but apt-get reports that liblatex-encode-perl is already the newest version.

I can manually install it with CPAN:
sudo cpan
followed by
install LaTeX:Encode
(note case-sensitive)

** Switch module **

Testing for Perl module Switch
Can't locate Switch.pm in @inc (you may need to install the Switch 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.
Switch - not found - will be installed
Installing via CPAN
./galacticusInstall_v0.9.4.sh: eval: line 2447: syntax error near unexpected token (' ./galacticusInstall_v0.9.4.sh: eval: line 2447: sudo -E -S -- perl -MCPAN -e force('install','Switch')'

I was able to manually install withut problem using cpan.

@abensonca
Copy link
Collaborator Author

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)

Another perl package fails to install:
Script output:
XML::SAX - not found - will be installed
Installing via CPAN
...failed

Log-file:
Can't locate XML/SAX.pm in @inc (you may need to install the XML::SAX 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.
XML::SAX - not found - will be installed
Installing via CPAN

solved using manual CPAN install.

@abensonca
Copy link
Collaborator Author

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'

@abensonca
Copy link
Collaborator Author

Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff).


Enhancement proposal:
Would it be possible to include a switch for the install script to only install the requirements, but use the precompiled binary?

@abensonca
Copy link
Collaborator Author

Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff).


Building galacticus:
Build failed on Linux Mint.
It complained about missing perl module File::Slurp.
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)
                                                                1

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

@abensonca
Copy link
Collaborator Author

Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff).


After using the install script I get errors when starting a new terminal:

#!bash

bash: /home/hans/.bashrc: line 155: unexpected EOF while looking for matching `''
bash: /home/hans/.bashrc: line 156: syntax error: unexpected end of file

The end of my bash_rc is:

#!bash
if [ -n "${LD_LIBRARY_PATH}" ]; then
 export LD_LIBRARY_PATH=/usr/local/galacticus/lib:/usr/local/galacticus/lib64:$LD_LIBRARY_PATH
else
 export LD_LIBRARY_PATH=/usr/local/galacticus/lib:/usr/local/galacticus/lib64
fi
if [ -n "${PATH}" ]; then
 export PATH=/usr/local/galacticus/bin:$PATH
else
 export PATH=/usr/local/galacticus/bin
fi
if [ -n "${PYTHONPATH}" ]; then
 export PYTHONPATH=/usr/local/galacticus/python:/usr/local/galacticus/py-lib:$PYTHONPATH
else
 export PYTHONPATH=/usr/local/galacticus/python:/usr/local/galacticus/py-lib
fi
export GALACTICUS_FCFLAGS="-fintrinsic-modules-path /usr/local/galacticus/finclude -fintrinsic-modules-path /usr/local/galacticus/include -fintrinsic-modules-path /usr/local/galacticus/include/gfortran -fintrinsic-modules-path /usr/local/galacticus/lib/gfortran/modules -L/usr/local/galacticus/lib -L/usr/local/galacticus/lib64"
'
# Alias to configure the environment to compile and run Galacticus v0.9.4
alias galacticus094='
if [ -n "${LD_LIBRARY_PATH}" ]; then
 export LD_LIBRARY_PATH=/usr/local/galacticus/lib:/usr/local/galacticus/lib64:$LD_LIBRARY_PATH
else
 export LD_LIBRARY_PATH=/usr/local/galacticus/lib:/usr/local/galacticus/lib64
fi
if [ -n "${PATH}" ]; then
 export PATH=/usr/local/galacticus/bin:$PATH
else
 export PATH=/usr/local/galacticus/bin
fi
if [ -n "${PYTHONPATH}" ]; then
 export PYTHONPATH=/usr/local/galacticus/python:/usr/local/galacticus/py-lib:$PYTHONPATH
else
 export PYTHONPATH=/usr/local/galacticus/python:/usr/local/galacticus/py-lib
fi
export GALACTICUS_FCFLAGS="-fintrinsic-modules-path /usr/local/galacticus/finclude -fintrinsic-modules-path /usr/local/galacticus/include -fintrinsic-modules-path /usr/local/galacticus/include/gfortran -fintrinsic-modules-path /usr/local/galacticus/lib/gfortran/modules -L/usr/local/galacticus/lib -L/usr/local/galacticus/lib64"
'



The error goes away if I remove the last '

@abensonca
Copy link
Collaborator Author

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!

@abensonca
Copy link
Collaborator Author

Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca).


APR URL updated to v1.5.2.

@abensonca
Copy link
Collaborator Author

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.

@abensonca
Copy link
Collaborator Author

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.

@abensonca
Copy link
Collaborator Author

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.

@abensonca
Copy link
Collaborator Author

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?

@abensonca
Copy link
Collaborator Author

Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca).


  • 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. *

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.

@abensonca
Copy link
Collaborator Author

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.

@abensonca
Copy link
Collaborator Author

Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca).


Enhancement proposal: Would it be possible to include a switch for the install script to only install the requirements, but use the precompiled binary?

This is a good idea - I'll look into implementing it.

@abensonca
Copy link
Collaborator Author

Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca).


Building galacticus: Build failed on Linux Mint. It complained about missing perl module File::Slurp.

This module is now required for building - installation scripts updated to install it as a required module.

@abensonca
Copy link
Collaborator Author

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)
1

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.

@abensonca
Copy link
Collaborator Author

Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca).


After using the install script I get errors when starting a new terminal:

This is now fixed.

@abensonca
Copy link
Collaborator Author

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.

@abensonca
Copy link
Collaborator Author

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!

@abensonca
Copy link
Collaborator Author

Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff).


I will try to respond in the same order as you:
(Note that since I managed to get galacticus working (with precompiled binary) I cannot reproduce all the relevant errors without reinstalling Mint or Ubuntu since the packages are now installed :) . I can try this later if necessary)

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".

  1. Good :)

  2. "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."
    The problem is that it tries to install the wrong package. It looks for gsl-config, doesn't find it and then tries to install a package that is already installed (instead of installing libgsl0-dev). Thus the script fails.

"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."

I will post the relevant galacticusInstall.log file output when I try with a fresh install.
I think the problem is that gsl-bin is a separate package (at least in Ubuntu/Mint) from libgsl0-dev and both need to be installed. Once libgsl0-dev was installed the script was happy to continue, but failed when looking for gsl-bin (that is looking for the gsl-histogram executable).

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.

@abensonca
Copy link
Collaborator Author

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.
I will retry with newer versions of Ubuntu/Mint later and see if it goes more smoothly in which case the problem will sort itself out :)

@abensonca
Copy link
Collaborator Author

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:
perl -I$HOME/perl5/lib/perl5 -Mlocal::lib
show?

hans@hans-VirtualBox:~$ perl -I$HOME/perl5/lib/perl5 -Mlocal::lib
Can't locate local/lib.pm in @inc (you may need to install the local::lib module) (@inc contains: /home/hans/perl5/lib/perl5 /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 .).
BEGIN failed--compilation aborted.

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")’
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.

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

#!bash

perl -MCPAN -e "force('install','package')"

everything works just fine. This is probably a trickier bug to track down.

@abensonca
Copy link
Collaborator Author

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)
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.*

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.

@abensonca
Copy link
Collaborator Author

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?

@abensonca
Copy link
Collaborator Author

Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca).


OK - I've updated the documentation to specify that v6.0.0 is required, and
also updated the installation script to require v6.0.0 for gfortran.

@abensonca
Copy link
Collaborator Author

Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca).


OK - if this still happens, confirm the kernel version and let me know and I'll
adjust the script to include CFLAGS=-O0 for that kernel version.

@abensonca
Copy link
Collaborator Author

Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca).


How do you know that the script is converting " to ' before running the
command? Is this written to stdout or the log file?

@abensonca
Copy link
Collaborator Author

Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca).


  1. The "report" link is now updated to point to the relevant issues page on
    BitBucket.

  2. It actually tries to install both "libgsl0-dev" and "gsl-bin" if the test
    for gsl-config fails. Are there additional packages required on Ubuntu? (I
    don't use Ubuntu so I can't easily check this.)

In most cases the stdout from commands is redirected to the log file. Do you
see specific cases where this does not happen?

@abensonca
Copy link
Collaborator Author

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.

@abensonca
Copy link
Collaborator Author

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 (.

@abensonca
Copy link
Collaborator Author

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?"
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.

@abensonca
Copy link
Collaborator Author

Original comment by Andrew Benson (Bitbucket: abensonca, GitHub: abensonca).


OK - can you send the log file - it's difficult to diagnose the problem without
seeing the full context and error messages.

@abensonca
Copy link
Collaborator Author

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.

@abensonca
Copy link
Collaborator Author

Original comment by HansHarhoff (Bitbucket: HansHarhoff, GitHub: HansHarhoff).


Log file obtained from running the install script at minimal level.
I manually installed Sort::Topological which worked fine.
Latex::Encode failed to install via apt-get so I tried (as seen in the log file) to install without package manager which worked.

But the module switch sees the same substitution of quotation marks as I described earlier.
The script used was the one given to me for testing in the preceding comment. I am not sure if that was implemented in the repository yet.

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 :)

@abensonca
Copy link
Collaborator Author

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.

@abensonca abensonca added minor bug Something isn't working labels Aug 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working minor
Projects
None yet
Development

No branches or pull requests

1 participant