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

Install script hangs on Linux #3

Open
dinkelk opened this issue Jul 12, 2018 · 4 comments
Open

Install script hangs on Linux #3

dinkelk opened this issue Jul 12, 2018 · 4 comments

Comments

@dinkelk
Copy link

dinkelk commented Jul 12, 2018

Hi there,

I am trying to use this script on a 18.04 Ubuntu machine and when I run it, the program just hangs.

$ sh -x ./install_package.sh ../gnat-community-2018-20180524-arm-elf-linux64-bin ../../gnat/gnat-community-2018-20180524-arm-elf-linux64
+ dirname ./install_package.sh
+ script_dir=.
+ [ 2 -ne 2 ]
+ package_file=../gnat-community-2018-20180524-arm-elf-linux64-bin
+ target=../../gnat_old/gnat-community-2018-20180524-arm-elf-linux64-bin
+ [ -f ../../gnat_old/gnat-community-2018-20180524-arm-elf-linux64-bin ]
+ [ -d ../../gnat_old/gnat-community-2018-20180524-arm-elf-linux64-bin ]
+ ls -A ../../gnat_old/gnat-community-2018-20180524-arm-elf-linux64-bin
+ ls=
+ [ ! -z  ]
+ uname
+ install_linux
+ chmod +x ../gnat-community-2018-20180524-arm-elf-linux64-bin
+ ../gnat-community-2018-20180524-arm-elf-linux64-bin --script ./install_script.qs --platform minimal InstallPrefix=../../gnat/gnat-community-2018-20180524-arm-elf-linux64

Trying to run the hanging line manually with the -v option produces:

../gnat-community-2018-20180524-arm-elf-linux64-bin -v --script ./install_script.qs --platform minimal InstallPrefix=../../gnat/gnat-community-2018-20180524-arm-elf-linux64
IFW Version: 3.0.2, built with Qt 5.9.0.
Build date: Nov 23 2017
Installer Framework SHA1: a97afeb
[0] Language: en-US
[0] Arguments: ../gnat-community-2018-20180524-arm-elf-linux64-bin, -v, --script, ./install_script.qs, InstallPrefix=../../gnat_old/gnat-community-2018-20180524-arm-elf-linux64
[0] Operations sanity check succeeded.
[0] Resource tree:
[0]      :/translations
[0]      :/translations/da.qm
[0]      :/translations/de.qm
[0]      :/translations/en.qm
[0]      :/translations/es.qm
[0]      :/translations/fr.qm
[0]      :/translations/ja.qm
[0]      :/translations/it.qm
[0]      :/translations/pl.qm
[0]      :/translations/ru.qm
[0]      :/translations/qt_da.qm
[1]      :/translations/qt_de.qm
[1]      :/translations/qt_en.qm
[1]      :/translations/qt_es.qm
[1]      :/translations/qt_fr.qm
[1]      :/translations/qt_ja.qm
[1]      :/translations/qt_it.qm
[1]      :/translations/qt_pl.qm
[1]      :/translations/qt_ru.qm
[1]      :/translations/zh_CN.qm
[1]      :/translations/qt_zh_CN.qm
[1]      :/uninstall.png
[1]      :/installer.png
[1]      :/installer.ico
[1]      :/keepinstalled.png
[1]      :/installer.icns
[1]      :/install.png
[1]      :/keepuninstalled.png
[4]      :/metadata
[4]      :/metadata/com.adacore.gnat
[4]      :/metadata/com.adacore.gnat/installscript.qs
[4]      :/metadata/config
[4]      :/metadata/config/config-internal.ini
[4]      :/metadata/installer-config
[4]      :/metadata/installer-config/configscript_qs.qs
[4]      :/metadata/installer-config/_fox_a_gnatmail_community_x86_64-linux_installers_install_resources_adacore_banner_bmp.bmp
[4]      :/metadata/installer-config/_fox_a_gnatmail_community_x86_64-linux_installers_install_resources_community_banner_png.png
[4]      :/metadata/installer-config/_fox_a_gnatmail_community_x86_64-linux_installers_install_resources_adacore_installer.png
[4]      :/metadata/installer-config/config.xml
[4]      :/metadata/com.adacore
[4]      :/metadata/com.adacore/community_agreement_text.txt
[4]      :/metadata/com.adacore/installscript.qs
[4]      :/metadata/com.adacore/registerfileextensionsform.ui
[4]      :/metadata/Updates.xml
[4]      :/metadata/rccprojectw19950.qrc
[31] Loaded control script "./install_script.qs"
[32] Using control script: "./install_script.qs"
[38] Url is: "://metadata/"

and then hangs indefinitely.

Any help would be appreciated!

@setton
Copy link
Member

setton commented Jul 27, 2018

Try removing

--platform minimal

to see where the installer hangs?

@reznikmm
Copy link
Member

Ensure you have make installed.

Here is the command line that I use to install dependencies while building a docker image

RUN apt-get update && apt-get install -y \
 libx11-6 \
 libx11-xcb1 \
 fontconfig \
 dbus \
 curl \
 make \
 libc-dev

@dinkelk
Copy link
Author

dinkelk commented Jul 27, 2018

Thank you for the suggestions. Running without --platform minimal, I was able to see the following error.

The installation path cannot be relative, please specify an absolute path.

So I fixed my command so that I provided an absolute path and everything went swimmingly.

Maybe you should convert the InstallPrefix to an absolute path before passing it to the installer, or maybe just check the prefix and warn the user if they provide a relative path instead of an absolute one.

I'll let you close the issue in case you want to take action first.

Thank you!

@setton
Copy link
Member

setton commented Jul 28, 2018

Thank you for the feedback! We'll fix this. Keeping the issue open until such a time that it is done :)

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

No branches or pull requests

3 participants