GithubHelp home page GithubHelp logo

Installation adjustments about ciao HOT 20 CLOSED

ciao-lang avatar ciao-lang commented on August 23, 2024
Installation adjustments

from ciao.

Comments (20)

jfagoagas avatar jfagoagas commented on August 23, 2024

Before that I mentioned in the previous issue, the installer should enable the option to install the development environment without generating the LaTex documentation, because the necessary dependencies occupy 1098 MB.

When you execute ./ciao-boot.sh get devenv if you do not have installed texlive, texinfo and imagemagick, that are needed to generate the documentation, the installer will abort his execution.

Reference: https://gist.github.com/jfagoagas/56d6633a741e831f8a109cab397d129f

from ciao.

jfmc avatar jfmc commented on August 23, 2024

Before that I mentioned in the previous issue, the installer should enable the option to install the development environment without generating the LaTex documentation, because the necessary dependencies occupy 1098 MB.

When you execute ./ciao-boot.sh get devenv if you do not have installed texlive, texinfo and imagemagick, that are needed to generate the documentation, the installer will abort his execution.

Reference: https://gist.github.com/jfagoagas/56d6633a741e831f8a109cab397d129f

The --with-docs=no option (e.g., ./ciao-boot.sh get devenv --with-docs=no) will skip the generation of documentation. This option is now added automatically for the curl-based installer. Another option would be disabling PDF generation if some of the tools are not available (HTML should still work). If needed, I'd be better to open a separate issue for this feature.

from ciao.

jfmc avatar jfmc commented on August 23, 2024

Hi, it is necessary to include the following code in ~/.emacs.d/init.el so that emacs correctly loads the development environment.

(if (file-exists-p "path_to_ciao_folder/ciao_emacs/elisp/ciao-site-file.el")
  (load-file "path_to_ciao_folder/ciao_emacs/elisp/ciao-site-file.el"))

Thanks. It seems that emacs reads the first existing file from this list: ~/.emacs, ~/.emacs.el, ~/.emacs.d/init.el. Our installation modifies ~/.emacs or creates a new one if it does not exists. This may explain why installation is not working in your case.

We can fix it by patching the first file that exists, or create a new config file if the user has none.

It is also necessary to update $PATH with that: export PATH=$PATH:path_to_ciao_folder/build/bin and paste it in ~/.profile

(path_to_ciao_folder is the content of the environment variable ciaoroot)

This one is very strange. The ciao-env command (introduced during installation in .bashrc) is already modifying the PATH. I do not see why you need it twice in your gist.

from ciao.

jfagoagas avatar jfagoagas commented on August 23, 2024

The --with-docs=no option (e.g., ./ciao-boot.sh get devenv --with-docs=no) will skip the generation of documentation. This option is now added automatically for the curl-based installer. Another option would be disabling PDF generation if some of the tools are not available (HTML should still work). If needed, I'd be better to open a separate issue for this feature.

Thanks, I did not know that option was available. I think that only HTML documentation is enough.

from ciao.

jfagoagas avatar jfagoagas commented on August 23, 2024

It is also necessary to update $PATH with that: export PATH=$PATH:path_to_ciao_folder/build/bin and paste it in ~/.profile
(path_to_ciao_folder is the content of the environment variable ciaoroot)

This one is very strange. The ciao-env command (introduced during installation in .bashrc) is already modifying the PATH. I do not see why you need it twice in your gist.

I have installed Ciao on Debian and Ubuntu and in none of them the installation process has modified the PATH variable. That is why I have to add that to mi .profile.

It is possible that ciao-env command could be executed after generating the documentation?

from ciao.

jfmc avatar jfmc commented on August 23, 2024

It is also necessary to update $PATH with that: export PATH=$PATH:path_to_ciao_folder/build/bin and paste it in ~/.profile
(path_to_ciao_folder is the content of the environment variable ciaoroot)

This one is very strange. The ciao-env command (introduced during installation in .bashrc) is already modifying the PATH. I do not see why you need it twice in your gist.

I have installed Ciao on Debian and Ubuntu and in none of them the installation process has modified the PATH variable. That is why I have to add that to mi .profile.

It is possible that ciao-env command could be executed after generating the documentation?

Could you execute eval $(ciao-env --sh) manually to see if it is changing PATH? (it should do it)

from ciao.

jfagoagas avatar jfagoagas commented on August 23, 2024

Could you execute eval $(ciao-env --sh) manually to see if it is changing PATH? (it should do it)

Hi, the eval $(ciao-env --sh) command modifies the PATH variable and adds two more:

  • INFOPATH=/home/<user>/.ciao/build/doc:/home/<user>/ciao/build/doc: (new)
  • MANPATH=/home/<user>/.ciao/build/doc:/home/<user>/ciao/build/doc: (new)
  • PATH=/home/<user>/.ciao/build/bin:/home/<user>/ciao/build/bin:

In the installation process, when is this command executed?

from ciao.

jfmc avatar jfmc commented on August 23, 2024

Could you execute eval $(ciao-env --sh) manually to see if it is changing PATH? (it should do it)

Hi, the eval $(ciao-env --sh) command modifies the PATH variable and adds two more:

  • INFOPATH=/home/<user>/.ciao/build/doc:/home/<user>/ciao/build/doc: (new)
  • MANPATH=/home/<user>/.ciao/build/doc:/home/<user>/ciao/build/doc: (new)
  • PATH=/home/<user>/.ciao/build/bin:/home/<user>/ciao/build/bin:

In the installation process, when is this command executed?

Indeed, the ciao-env command is not executed during the installation process. The installation adds a call to eval "$(PATH_FOR_YOUR_CIAO_BIN)/ciao-env --sh)" to .bashrc. When starting a new bash session this command will extend the PATH as well as other environment variables for manuals (MANPATH, INFOPATH). This is useful to switch between different Ciao installations.
Note that the ciao-env command is a bit smart and it will not add duplicated path entries.
If the installation is correctly updating your .bashrc and you still do not see the PATH change, then something else must be happening. The current installation scheme works in Ubuntu, Debian, Termux (Android), macOS, etc.

Perhaps your default shell is something different than bash, like ksh? We could update the installation to change .kshrc as well as .bashrc. I am a bit reluctant to update .profile since it only affects login shells. Other modern systems like Rust's cargo or Ruby's gem suggest changing .bashrc.

from ciao.

jfagoagas avatar jfagoagas commented on August 23, 2024

Indeed, the ciao-env command is not executed during the installation process. The installation adds a call to eval "$(PATH_FOR_YOUR_CIAO_BIN)/ciao-env --sh)" to .bashrc. When starting a new bash session this command will extend the PATH as well as other environment variables for manuals (MANPATH, INFOPATH). This is useful to switch between different Ciao installations.
Note that the ciao-env command is a bit smart and it will not add duplicated path entries.
If the installation is correctly updating your .bashrc and you still do not see the PATH change, then something else must be happening. The current installation scheme works in Ubuntu, Debian, Termux (Android), macOS, etc.

I am using Debian and when I have installed Ciao I did not see any changes in my .bashrc file.

Perhaps your default shell is something different than bash, like ksh? We could update the installation to change .kshrc as well as .bashrc. I am a bit reluctant to update .profile since it only affects login shells. Other modern systems like Rust's cargo or Ruby's gem suggest changing .bashrc.

I am using bash too, and like I said the installation process did not modify neither PATH variables and .bashrc.

from ciao.

jfmc avatar jfmc commented on August 23, 2024

Indeed, the ciao-env command is not executed during the installation process. The installation adds a call to eval "$(PATH_FOR_YOUR_CIAO_BIN)/ciao-env --sh)" to .bashrc. When starting a new bash session this command will extend the PATH as well as other environment variables for manuals (MANPATH, INFOPATH). This is useful to switch between different Ciao installations.
Note that the ciao-env command is a bit smart and it will not add duplicated path entries.
If the installation is correctly updating your .bashrc and you still do not see the PATH change, then something else must be happening. The current installation scheme works in Ubuntu, Debian, Termux (Android), macOS, etc.

I am using Debian and when I have installed Ciao I did not see any changes in my .bashrc file.

Perhaps your default shell is something different than bash, like ksh? We could update the installation to change .kshrc as well as .bashrc. I am a bit reluctant to update .profile since it only affects login shells. Other modern systems like Rust's cargo or Ruby's gem suggest changing .bashrc.

I am using bash too, and like I said the installation process did not modify neither PATH variables and .bashrc.

It would be great if you could try to see what is really happening (add echo $PATH before/after the ciao-env call and see if/when it is modified, etc.).

from ciao.

jfagoagas avatar jfagoagas commented on August 23, 2024

It would be great if you could try to see what is really happening (add echo $PATH before/after the ciao-env call and see if/when it is modified, etc.).

I did it when you ask me to execute eval $(ciao-env --sh).

Original:

  • PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:

New:

  • INFOPATH=/home/<user>/.ciao/build/doc:/home/<user>/ciao/build/doc: (new)
  • MANPATH=/home/<user>/.ciao/build/doc:/home/<user>/ciao/build/doc: (new)
  • PATH=/home/<user>/.ciao/build/bin:/home/<user>/ciao/build/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:

Where is this command located in the installation scripts?

from ciao.

mherme avatar mherme commented on August 23, 2024

from ciao.

jfagoagas avatar jfagoagas commented on August 23, 2024

This sounds like a good idea (perhaps issuing a warning that the pdfs were not generated), right? Also because it saves time. In fact, generating only html could be the default for user installations, since html is probably more useful nowadays than pdf.

Yes, but it should be enabled in the full devenv install too.

from ciao.

jfagoagas avatar jfagoagas commented on August 23, 2024

I have installed Ciao again, now with the --with-docs=nooption and the installation process was correct.

The only thing that is missing was this:

Hi, it is necessary to include the following code in ~/.emacs.d/init.el so that emacs correctly loads the development environment.

(if (file-exists-p "path_to_ciao_folder/ciao_emacs/elisp/ciao-site-file.el")
  (load-file "path_to_ciao_folder/ciao_emacs/elisp/ciao-site-file.el"))

from ciao.

jfmc avatar jfmc commented on August 23, 2024

I have installed Ciao again, now with the --with-docs=nooption and the installation process was correct.

The only thing that is missing was this:

Hi, it is necessary to include the following code in ~/.emacs.d/init.el so that emacs correctly loads the development environment.

(if (file-exists-p "path_to_ciao_folder/ciao_emacs/elisp/ciao-site-file.el")
  (load-file "path_to_ciao_folder/ciao_emacs/elisp/ciao-site-file.el"))

I added a fix for that in this commit ciao-lang/ciao_emacs@adc4cf9

If you do ciao configure ciao_emacs and ciao install ciao_emacs (and ~/.emacs does not exist) it should update the init.el file.

from ciao.

jfagoagas avatar jfagoagas commented on August 23, 2024

I added a fix for that in this commit ciao-lang/ciao_emacs@adc4cf9

If you do ciao configure ciao_emacs and ciao install ciao_emacs (and ~/.emacs does not exist) it should update the init.el file.

Great, thanks. And if I execute ./ciao-boot.sh get devenv, will it create or update init.el file?

from ciao.

jfmc avatar jfmc commented on August 23, 2024

I added a fix for that in this commit ciao-lang/ciao_emacs@adc4cf9
If you do ciao configure ciao_emacs and ciao install ciao_emacs (and ~/.emacs does not exist) it should update the init.el file.

Great, thanks. And if I execute ./ciao-boot.sh get devenv, will it create or update init.el file?

Yes, it should do it. Otherwise there is still a bug (the build log will be really helpful).

from ciao.

jfagoagas avatar jfagoagas commented on August 23, 2024

I added a fix for that in this commit ciao-lang/ciao_emacs@adc4cf9
If you do ciao configure ciao_emacs and ciao install ciao_emacs (and ~/.emacs does not exist) it should update the init.el file.

Great, thanks. And if I execute ./ciao-boot.sh get devenv, will it create or update init.el file?

Yes, it should do it. Otherwise there is still a bug (the build log will be really helpful).

I have installed it and with emacs installed and also ~/.emacs.d directory, the installation process creates a new .emacs file.
I have attached below the installation log.

ciao_install_log.txt
ciao_emacs_log.txt

from ciao.

jfmc avatar jfmc commented on August 23, 2024

ciao-lang/ciao_emacs@a6c066a selects ~/.emacs.d/init.el as default initialization file, in the case that none exists. Please tell me if this fix the problem so that we can close the issue.

Could you create a new issue for the documentation problem? (e.g., do not abort the installation if tex/latex/bibtex/makeinfo/etc. is missing)

from ciao.

jfagoagas avatar jfagoagas commented on August 23, 2024

I have installed it again and the problem is fixed. Now ~/.bashrc and ~/.emacs.d/init.el are correctly configured.
Thanks.

from ciao.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.