What is the best strategy to deploy a Perl 6 script which use external modules like LWP::Simple?
For example in Perl we have PAR. Is there are an option in Perl 6 to deploy a self contained script that the user need only to run without bothering himself with installing Rakudo and external Perl 6 modules?
You can create a .jar file and then use java to execute the code. From there, there are plenty of tools to convert a .jar into a binary file (or .exe in Windows).
The syntax for that is:
perl6 --target=jvm --output=your_file.jar your_file.pl6
If that script were the trivial
say "this is running as a .jar file"
You should be able to run java -jar your_file.jar and get
this is running as a .jar file
On macOS, there is a bit of a wrinkle since this feature requires you to build perl6 (Rakudo Star) with Java 1.7+ instead of the Mac's system Java. For this reason the version on your system may not have shipped with JVM support.
If you're using homebrew, here's what you do to fix that:
brew uninstall perl6
brew tap homebrew/versions (so you can install Java 1.7)
brew install Caskroom/versions/java7 (install Java 1.7)
optionally: open a new tab in terminal (you only need to do this if, for some reason, you get an error that Java 1.6 is still in use. )
brew install perl6 --with-jvm (build perl6 with Java Virtual Machine support)
Related
I am trying to install a software package called kinsol, a non-linear equation solver, through ccmake as instructed in its documentation. The package requires a cmake version 3.12 or higher. So, I installed 3.17.3. Now, the problem is that my kinsol installation process is not able to locate ccmake and hence gives the message "ccmake ../kinsol-6.2.0
The program 'ccmake' is currently not installed. You can install it by typing:
sudo apt install cmake-curses-gui". But using the aforementioned command installs the version 3.5, which again fails in the task due to the version requirement of kinsol. I had come across a similar question in this forum and so I followed the workarounds suggested there as in putting the installation path of cmake in the .bashrc file still without any success. Does anyone know how to make the path of cmake known to the software?
Thanks,
DP
I'm confused about the environment. Using MSYS2 under Windows, I want to compile, say, the boost library:
http://www.boost.org/users/history/version_1_64_0.html
What file I have to download? The one for Windows or the one for unix?
MSYS2 is a not a Unix environment. It is a hybrid environment made up of these main components:
POSIX-emulation layer called msys-2.0.dll, which is a fork of cygwin.
Tools like GNU Make, Bash, and ls that depend on the msys-2.0.dll runtime.
pacman, another msys-2.0.dll program, that lets you install precompiled packages from the MSYS2 developers.
Native Windows software, which lives under the /mingw32 (for 32-bit) and /mingw64 (for 64-bit) directories.
Anyway, it seems like you are just getting started with MSYS2 and don't know much about it. If your goal is to write native Windows software that could some day be used outside of MSYS2, you should install the native Windows version of Boost provided by the MSYS2 developers. So run one of the commands below:
pacman -S mingw-w64-i686-boost
or
pacman -S mingw-w64-x86_64-boost
Then make sure you are using the right flavor of MSYS2 shell, and make sure you install the corresponding GCC toolchain. For 32-bit development, you must launch MSYS2 with the "MinGW-w64 32-bit Shell" shortcut and use pacman to install mingw-w64-i686-toolchain (pacman -S mingw-w64-i686-toolchain).
If you try to download binaries from boost's website, you will likely run into all sorts of compatibility issues. It's better to use software built using an MSYS2 GCC toolchain, especially if MSYS2 already has a package for that software.
I have developed some codes in Linux which use boost::serialization library. Now I want to copy my files into Cygwin and compile them to produce executable for Windows. I know that I should use Mingw-64 g++ compiler. But how about boost library? Should I download the Windows version or the Linux version of this library?
In Cygwin, you install Boost libraries as per Unix/Linux. From the documentation
Getting Started on Windows
A note to Cygwin and MinGW users
If you plan to use your tools from the Windows command prompt, you're in the right place.
If you plan to build from the Cygwin bash shell, you're actually running on a POSIX
platform and should follow the instructions for getting started on Unix variants.
Other command shells, such as MinGW's MSYS, are not supported—they may or may not work.
I'm pretty new to rails and I'm trying to get an application working. It's currently using ffi and typhoeus which need a version of libcurl. How can I install a version of libcurl for Windows 7.
Thanks!
There's one option I implemented but couldn't install only libcurl packages. Cygwin provides lots of the packages and libraries used for development in Linux for being installed on Windows (included curl, libcurl, libcurl-dev, etc).
http://www.cygwin.com/
It worked for me in windows 7 64 bit OS.
Here's another solution for that specific gem
https://github.com/typhoeus/typhoeus/pull/151/files
Greetings.
Answer that worked for me was:
Download cURL from the following URL: https://curl.haxx.se/windows/ (I chose 64bit because that's the system I'm using)
Go into the archive and browse to /bin
Locate libcurl_x64.dll (it may be just libcurl.dll)
Extract to your local drive
Rename it to libcurl.dll if it has the _x64 suffix
Cut + paste the file into the /bin directory of your Ruby installatio
It should work after this
I am writing a java program using JAVA 6. Our company server is using JAVA 5. They refuse to upgrade it to 6, so the workaround would be install another JRE 6 inside the same machine. They wonder, will installing different version of JRE causes instability?
What the installation process do? Simply copy over the files and setting up environment variable? Will it change any registry or other setting?
Multiple JREs can reside on the same machine. However, if you install JRE6, that's the same as upgrading to Java 6. Java 6 is (as far as I can tell) able to run all older Java code. However, Java 6 binary (.class and .jar files) can not be executed using Java 5, unless they were compiled to target the previous version.
If you need to, you can target Java 5 using a Java 6 JDK. There are command line arguments for javac that you can use (or incorporate into Ant, and probably other build tools) to specify a target JRE. For example, if you used the -target 1.5 command-line option using your JDK, the .class or .jar files that are produced will be executable using the Java 5 JRE.
It's been a while since I have ran two JREs side-by-side, but unless things have changed, there will be two separate java.exe (on Windows, anyway) files - one for the previous Java 5 JRE and a new one for the Java 6 JRE. Due to naming, only one can be in the path at a time - all of the files have the same names, so you can't include the Java 5 and Java 6 java.exe at the same time and expect the right one to magically run. However, you can leave the Java 5 JRE in your path and manually invoke the Java 6 java.exe when you execute your application.
If you use JAVA_HOME set to the Java 5 JRE and set a new environment variable to the Java 6 Java Home, let's say JAVA_1.6, as long as you properly reference the right environment variable, you should be fine.
You can definitely have both. If you are "allowed" maybe you could bundle the jre you want with your app? This URL talks about how..
http://forums.sun.com/thread.jspa?threadID=708451