Raku: Installation of Gnome::Gtk3 on Windows - gtk3

I am trying to install the Raku module «Gnome::Gtk3» module on a Windows pc, without success.
Powershell> zef install Gnome::Gtk3
This fails with a lot of "Cannot locate native library"-messages.
I have installed Raku with choco, along with git. And have fixed the path.
That alone took quite some time to figure out, due to missing documentation.
I have installed Gtk, as described here: https://www.gtk.org/docs/installations/windows
But Raku is unable to locate the libraries. Is this something that can work, or do
I have to use the Windows Subsystem for Linux?
(I am aware of the «GTK::Simple» module, but cannot use that as a replacement as it lacks support for keyboard interrupts - which I need.
I have installed it, as it states that it installs the GTK dll's as well.)

In order to make this kind of modules work, you need the -dev version of the library, that is, the DLLs which are actually the ones that NativeCall uses. This tutorial shows how to set them up for C++ and Python, Raku shouldn't be too different.

This now installs on MSYS2, Windows 10. First download the latest version of rakudo from here and extract the zip file to e.g. C:\rakudo-2020.11. Then install MSYS2, and when finished open the MSYS2 terminal window and install the following packages:
$ pacman -Syu
$ pacman -S base-devel gcc git libcrypt-devel libreadline
$ pacman -S mingw-w64-x86_64-gtk3
$ pacman -S mingw-w64-x86_64-toolchain
Then add the following to the MSYS2 ~/.bashrc configuration file:
export PKG_CONFIG_PATH=/mingw64/lib/pkgconfig
export PATH="$PATH:/c/rakudo-2020.11/bin:/c/rakudo-2020.11/share/perl6/site/bin"
export PATH="$PATH:/mingw64/bin"
Save the updated .bashrc and reload it from the MSYS2 terminal prompt:
$ source ~/.bashrc
Finally, install Gnome::Gtk3:
$ zef install Gnome::Gtk3

Related

I'm not able to use my C/C++ compiler on vscode

I followed the gcc compiler installation tutorial for windows from the vscode website: https://code.visualstudio.com/docs/cpp/config-mingw
And the bin folder (C:\msys64\mingw64\bin) is empty, so i'm not able to run the "g++ --version" by adding this path to the Windows path environment variable.
My alternative to it was to use the codeblocks compiler to run my code in vscode, by adding this path: (C:\Program Files\CodeBlocks\MinGW\bin) to the "path" selection in the windows environment variables.
I want to make the MSYS2 compiler work properly in my vscode.
Hope you guys can help me!
MSYS2 comes with a package manager pacman that you should use to install any components you need.
In your case, open the MSYS2 shell (by running mingw64.exe) and run the following commands:
pacman -Syu --noconfirm
pacman -S mingw-w64-x86_64-toolchain
The first command will tell the package manager to update it's database, the second command will get the MinGW-w64 64-bit GCC compiler.
If you don't really need MSYS2 (e.g. because you dan't plan to use the MSYS2 shell) you could also consider getting a standalone MinGW-w64 build from https://winlibs.com/

curl: transfer closing when trying to install perlbrew

I'm trying to install perlbrew in my mac OSX and this error keeps popping in my terminal, not really sure what this means
Download the latest perlbrew
curl: (18) transfer closed with ###### bytes remaining to read
I understand vaguely that this error is related to poor network service, am I right?
Can anyone help me how to install perlbrew offline and how to install modules after perlbrew is done!
Your help is appreciated
I'm trying to install perlbrew in my mac OSX
There are lots of OSX versions. Can you narrow it down a bit?
I understand vaguely that this error is related to poor network
service, am I right?
If the command you issued was:
$ \curl -L http://install.perlbrew.pl | bash
then that tells a program called curl to download the file install.perlbrew.pl from the internet, then execute the file with a program called bash. You can view that file by entering the url specified in the command in your browser:
http://install.perlbrew.pl
As you can see, the file is very short.
The error means that for some reason curl couldn't download the entirety of a file it was trying to download. That could be because the server(where the file resides) dropped your connection, or the internet connection on your side was disrupted.
Can anyone help me how to install perlbrew offline
You could go to the url and copy the text and paste it into a local file called, say, install_perlbrew.pl. Then you could execute that file offline like this:
$ bash install_perlbrew.pl
That file is a program and when you execute the program with bash, the program uses curl yet again to retrieve another file, namely perlbrew, from the internet. You could also copy the perlbrew file to your computer and modify the install script to use the local perlbrew file, but then when you execute the perlbrew file, it also uses curl to retrieve even more files from the internet, and so on and so on.
So unless you know bash scripting and you can modify the install script to use all local files, and you have the patience to track down all the files required and copy them to local files, you are not going to be able to install perlbrew offline.
Can anyone help me how to ... install modules after perlbrew is done!
If the module name is File::Monitor, you would install it like this:
$ cpan File::Monitor
If it's your first time using the cpan command, you will see this:
$ cpan File::Monitor
CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.
Would you like to configure as much as possible automatically? [yes]
Hit return to use the default answer (which is specified in brackets). After cpan automatically configures itself, it will install the module, and if everything went okay with the installation you will see something like this:
...
...
ANDYA/File-Monitor-1.00.tar.gz
./Build install -- OK
$
Response to comments:
Preamble: Your system has perl installed on it, however it is out of date. But, your system needs perl to perform certain tasks, so you should NEVER delete or update the system perl. In fact, you should leave the system perl alone, so that you don't screw it up and render your OS inoperable. perlbrew to the rescue.
In your Applications folder, look for a Utilities folder, and inside the Utilities folder find Terminal.app. Click on Terminal.app to launch a terminal window.
Here are the steps for installing and using perlbrew:
1) Install perlbrew:
~$ \curl -L http://install.perlbrew.pl | bash
2) Install a perl with perlbrew:
~$ perlbrew install perl-5.23.6
Prior to installing a perl, you can see what versions of perl are available by doing this:
~$ perlbrew available
perl-5.23.6
perl-5.22.1
perl-5.20.3
perl-5.18.4
perl-5.16.3
...
...
Pick whatever version of perl you want to install and specify it in the install command above.
3) Tell perlbrew which perl version to use. Because you will only have one version of perl installed at this point, write:
~$ perlbrew switch perl-5.23.6
perlbrew allows you to install multiple versions of perl, so if you have multiple versions of perl installed, and you want to switch to another version, you can do:
~$ perlbrew list
perl-5.23.6
*perl-5.20.2
perl-5.16.3
~$ perlbrew use perl-5.16.3
~$ perlbrew list
perl-5.23.6
perl-5.20.2
*perl-5.16.3
The asterisk lets you know which version of perl you are currently using.
4) Install modules in the current version of perl:
~$ cpan Path::Class !!DO NOT EVER USE SUDO!!
5) To see a list of all the modules installed in the current perl:
~$ perlbrew list-modules
CPAN::Meta
Date::Parse
File::Monitor
HTTP::CookieJar
HTTP::Date
...
...
...
6) perlbrew has a lot of other commands, so if you need to do something else, try searching through the output of:
~$ perlbrew --help

How to install Git for Cygwin?

I see some tutorials online but they only show how to install git onto Cygwin AS you are installing Cygwin. I already have cygwin installed and customized so I'd prefer not to repeat that step. How do I install the git framework so I can use it for github?
Thank you.
In the world of Cygwin, there is really no such thing as only installing a package AS you are installing Cygwin. Cygwin was inherently designed with a setup.exe to be run multiple times when necessary.
There are thousands of packages available in the Cygwin repo mirrors. From what you are saying, it sounds as if you had a single go-round with the setup file and then planned to never install any additional available packages or upgrade them in the future. This is what the Cygwin setup file is specifically used for.
If you don't currently have Git installed in your particular Cygwin environment, just run setup.exe again and select the package. It should automatically detect your current installation directory and package directory and previously-selected mirror. When you mark the Git package for installation, it will automatically download all dependencies, just like apt-get or any other *NIX package manager.
There is also an abandoned project called apt-cyg that I still use religiously, especially on remote systems over SSH in order to avoid the GUI setup.exe. apt-cyg is basically a shell script that will install your package directly from the command line, apt-get-style. It requires wget and subversion, but after the 30 seconds it takes to setup, you'd just run apt-cyg install git. It also installs dependencies, just like the GUI setup.exe.
There is also a similar alternative if you install Cygwin via Chocolatey package manager -- you can also install cyg-get (I believe it's called). The syntax is a bit different -- something like cyg-get git. I don't really like this method, because it differs from apt-cyg in the fact that it actually uses the setup.exe and just automates the process so that you don't have to click anything. I don't use this method, because the last I checked, Chocolatey only supported 32-bit Cygwin installs, which is also what the cyg-get package looks for.
apt-cyg may be abandoned, but it has yet to disappoint, and if I know what I'm looking for, I always prefer it over running the setup.exe for package installation.
It looks like the project has been picked back up and is under active development again: https://github.com/transcode-open/apt-cyg
It appears this version requires lynx to install. I don't know. I still just use the original version on Google Code that worked just fine the last I checked: https://code.google.com/p/apt-cyg/
Edit: There has been a new Cygwin package manager out for awhile called cyg-get that can be installed via Chocolatey.
I'm not sure if it only works for Chocolatey-installed Cygwin installations or not, as Chocolatey doesn't install Cygwin in the normal locations anymore by default. Feel free to comment, but cyg-get is now my Cygwin package manager of choice unless I'm running an older installation of Cygwin that was not installed by Chocolatey. I avoided it for a while because they only supported 32-bit installations, but I can confirm that Chocolatey now supports 64-bit installations of Cygwin, and the cyg-get package manager works perfectly with it. I have a function sourced from my ~/.bashrc where I can use either apt or apt-get (with or without the install parameter, and it will just call cyg-get.bat with the programs I have specified to install.
http://redmine.jamoma.org/projects/1/wiki/Installing_and_setting_up_GIT
By following the steps mentioned in the link for windows you can install git using cygwin

SBCL installation in linux

How to install sbcl in os linux for a freshman of lisp.
I found just use the command
sh install.sh
the error info is:
src/runtime/sbcl not found, aborting installation
If you are using the Debian or Ubuntu distributions, you can install SBCL from their repositories: just type sudo apt-get install sbcl.
What flavor of linux?
If you use a popular distribution, e.g., debian, ubuntu, fedora, &c, then sbcl comes prepackaged: aptitude install sbcl or yum install sbcl.
As it says on SBCL's download page, if you have git access, you can run the command git clone git://git.code.sf.net/p/sbcl/sbcl to get the development version to compile from.
To get the binary alone, you may use the following commands depending on your CPU architecture:
x86
wget --trust-server-name http://downloads.sourceforge.net/project/sbcl/sbcl/1.0.58/sbcl-1.0.58-x86-linux-binary.tar.bz2?r=http%3A%2F%2Fwww.sbcl.org%2Fplatform-table.html&ts=1374541378&use_mirror=hivelocity
AMD64 (Note that this is a newer version)
wget --trust-server-name http://downloads.sourceforge.net/project/sbcl/sbcl/1.1.9/sbcl-1.1.9-x86-64-linux-binary.tar.bz2?r=http%3A%2F%2Fwww.sbcl.org%2Fplatform-table.html&ts=1374541416&use_mirror=iweb
in file which include to archive with sources and named INSTALL we see next text:
end of section 2.1
...
Now you should have the same src/runtime/sbcl and output/sbcl.core
files that come with the binary distribution, and you can install
them as described in the section 1. "BINARY DISTRIBUTION".
the way for you are next:
download sbcl sources using any convenient way for you.
run shell terminal (may be window) and go to the sources archive path
$ cd /path/to/sbcl-sources.tar.bz2
$ tar -xjvf sbcl*.tar.bz2
$ cd sbcl [TAB COMPLETE AND ENTER]
$ emacs INSTALL
now you will see INSTALL file, which contains installation notes. As we will see in 2.1 section
To build SBCL you need a working toolchain and a Common Lisp system
(see section 2.5 "Supported platforms").
You also need approximately 128 Mb of free RAM+swap.
To build SBCL using alredy installed SBCL run
$sh make.sh # may be need execute rights. run 'chmod +x make.sh' and try again
and go next according instruction.
If you don't have existing sbcl instruction said next:
If you don't already have an SBCL binary installed as "sbcl" on your
system, you'll need to tell make.sh what Lisp to use as the
cross-compilation host. For example, to use CMUCL (assuming has
been installed under its default name "lisp") as the
cross-compilation host:
$ sh make.sh --xc-host='lisp -batch -noinit'
assuming supported lisp platforms see 2.5 section. Generally, if you attentively read INSTALL file you will able to do it easy and quickly. Have fun and happy new year.
install the binary first
http://sourceforge.net/projects/sbcl/files/sbcl/1.2.7/sbcl-1.2.7
then install the latest version
http://sourceforge.net/projects/sbcl/files/sbcl/1.2.16/sbcl-1.2.16-source.tar.bz2/download?use_mirror=iweb&download=

perlbrew command not found

I installed perlbrew on Linux backtrack on my virtual machine. and I have perl 5.10.1 installed on my backtrack. but when I write perlbrew command in the terminal it shows the following message:
perlbrew: command not found
What is wrong with my system?
When you installed perlbrew, you were instructed to add something like
source ~/perl5/perlbrew/etc/bashrc
to your shell startup script (.bashrc). It appears that you did not do this, or that you did not restart your shell after doing this.
The standard sudo apt install perlbrew on a fresh Ubuntu18 install appears to be borken (and Ubuntu20 too if my memory isn't malfunctioning). And has been so for some time. I couldn't get it to work even if I appended source ~/perl5/perlbrew/etc/bashrc to ~/.bash_profile and/or ~/.bashrc and started a new bash. And also did perlbrew init.
What eventually worked for me is curl -L https://install.perlbrew.pl | bash taken from https://perlbrew.pl/ After this which perlbrew shows the correct /home/me/perl5/perlbrew/bin/perlbrew instead of /usr/bin/perlbrew. And now I can see the whole list of available perl5 versions with perlbrew available.