Can I create an exe on Linux? - launch4j

I would like to package a Java application into a .exe file using launch4j.
My build server is a Linux based operating system. Is it possible to build the .exe on a Linux machine?

Yes, it is possible. I have done it with Jenkins on a debian system. You might get some problems with missing libs. So you have to install them on your build server.
See: https://github.com/lukaszlenart/launch4j-maven-plugin#faq
Q: Can I use Launch4j on 64bit OS?
A: Yes but you will have to install these libs to avoid problems:
lib32z1
lib32ncurses5
lib32bz2-1.0 ( (has been ia32-libs in older Ubuntu versions)
zlib.i686
ncurses-libs.i686
bzip2-libs.i686
In my case for debian I've installed the following packages:
apt-get install zlib1g-dev libncurses5-dev
apt-get install lib32z1 lib32ncurses5

Related

ATLAS BLAS Windows

I am trying to install ATLAS BLAS package.
The solution would be write on terminal
sudo apt-get install libblas-dev liblapack-dev
The problem is that I am running on Windows, so don't have the sudo neither apt-get command.
How could I install it ?
Sorry for the late answer, I just stumbled on your question searching for something else.
First, the command that you want to use (apt-get install) mainly concerns Debian-based Linux operating system and not Windows.
Second, it would install base BLAS and LAPACK libraries that are not ATLAS.
I think that you have at least two possibilities:
use Windows Subsystem for Linux (WSL) to install and run a Linux subsystem on your Windows machine, like a Ubuntu Linux distribution (more details here for the installation instruction), in which you will be able to use apt-get install command to install packages, and specifically apt-get install libatlas-base-dev for ATLAS, and any other software packages that you would need to run your computations.
directly install ATLAS in Windows, following the instructions on their website, based on the Cygwin software.
Maybe, other alternatives exist.

Install Metatrader 5 on Ubuntu 17.04

I try to install Metatrader 5, on Ubuntu 17.04 (64-bit).
I get stuck, and need somebody to help me to solve this problem.
I've installed wine-2.0.1, which is the latest stable version at the moment, and it's for 64-bit.
Finally, after successfully installing Metatrader 5, on launching the application appears an error window: terminal64.exe, with message:
A debugger has been found running in your system.
Please, unload it from memory and restart your programm.
On wiki.winehq.org, I've found that is needed to install 2 separate versions of wine: 32-bit and 64-bit. I try to do all like in:
https://wiki.winehq.org/Building_Biarch_Wine_On_Ubuntu
, but at the stage "Build 64-bit Wine", for: make clean, I got:
make: *** No rule to make target 'clean'. Stop.
There is a way to really install mt5 on Ubuntu 17.04 ?
Just installed it after suffering a little bit. After seeing many requests from the installer to provide a proxy!
First install the latest Wine from the instructions given in its website for Ubuntu (this is the one that will work!)
sudo dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/Release.key
sudo apt-key add Release.key sudo apt-add-repository
https://dl.winehq.org/wine-builds/ubuntu/
sudo apt-get update
Stable branch:
sudo apt-get install --install-recommends winehq-stable
Configure Wine to 32 bits (only your user)
WINEARCH=win32 WINEPREFIX=~/.wine32 wineboot
Install Metatrader 5
WINEPREFIX=~/.wine32 wine start /unix /path/to/mt5setup.exe
Happiness
Finally to run MetaTrader 5 add the following to your .bashrc our .profile. And type metatrader on your terminal.
export WINEPREFIX=~/.wine32
alias metatrader='wine start "C:\program files\metatrader 5\terminal.exe"'
Thanks to #Kaleshwar Chand
I recently installed metatrader5 on ubuntu 17.04, using the instructions found on mql5 thread
basically mt5 is 32 bit and your ubuntu is 64 bit so you need to change arch to 32 bit to install/use it properly
enter into terminal
WINEARCH=win32 WINEPREFIX=/home/user/.wine32 wineboot
replace user with your username
then install with
WINEPREFIX=/home/user/.wine32 wine start /unix /path/to/mtsetup.exe
again replace user with your username
I am running MT5 on Arch,
in my case, a 64bit wineprefix is needed for connect with other apis so...
For install and run it correctly I installed:
wine, wine-mono, wine_gecko, winetricks, playonlinux
winetircks corefonts, winetricks winhttp
libgnutls allowed to skip the required proxy error
MT5 was installed throught playonlinux on a 64bit wineprefix
Follow the steps from office winehq at https://wiki.winehq.org/
and find your OS you are using
Android (WineHQ binary packages for Android)
Ubuntu (WineHQ binary packages for Ubuntu 16.04, 18.04, 19.04, and 19.10)
Debian (WineHQ binary packages for Debian Stretch, Buster, and Bullseye)
Fedora (WineHQ binary packages for Fedora 30 and 31)
MacOS (WineHQ binary packages for macOS 10.8 through 10.14)

exec: "gcc": executable file not found in %PATH% when trying go build

I am using Windows 10. When I tried to build Chaincode it reported this error
# github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11
exec: "gcc": executable file not found in %PATH%
My chaincode imports:
import (
"fmt"
"strconv"
"github.com/hyperledger/fabric/core/chaincode/shim"
pb "github.com/hyperledger/fabric/protos/peer"
)
It's running fine in Docker.
gcc (the GNU Compiler Collection) provides a C compiler. On Windows, install TDM-GCC. The github.com/miekg/pkcs11 package uses cgo. Cgo enables the creation of Go packages that call C code.
If you are running Ubuntu do:
apt-get install build-essential
This solved the problem. It installs the gcc/g++ compilers and libraries.
I also encountered this message, but in my case, it was missing gcc.exe. I used choco and installed mingw, and then it worked.
details:
download choco
choco install mingw -y
check: gcc -v
1) Install .exe from > https://sourceforge.net/projects/mingw-w64/
1.2) ! use x86_64 architecture
2) Add C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin to PATH in User Variables and in System Variables. For me it works.
! To edit Path variable press Windows key, type 'path', choose 'Edit the system environment variables', click 'Environment Variables', find Path variable in System variables and in User variables then edit.
On Windows install http://tdm-gcc.tdragon.net/download, that is all.
If you are using an alpine based image with your Dockerfile
Install build-base which will be met with your requirements.
apk add build-base
$ go env
check CGO_ENABLED if its 1 change it to 0 by
$export CGO_ENABLED=0
For my case :
os: windows 10
command:
choco install mingw
install choco if not installed:
Link: https://www.liquidweb.com/kb/how-to-install-chocolatey-on-windows/
worked for me.
The proper explanations why go build does not work for hyperledger in Windows environment are given as other answers.
For your compilation purposes, just to make it work without installing anything extra, you can try the following
go build --tags nopkcs11
It worked for me. I hope same works for you too.
You can try - this is not a solution but a temp workaround
cgo_enabled=0 go build
Once you install gcc - and make sure %PATH has a way to find it (gcc.exe) - this should go away.
Also running this one will ensure the cgo_enabled variable will stay this way as long as terminal is open. That way you don't have to prefix it each time you do a build.
export cgo_enabled=0 go build
just followed instructions from following and it solve my issue
https://code.visualstudio.com/docs/cpp/config-mingw
it ask to install Mingw-w64 via MSYS2
important command is pacman -S --needed base-devel mingw-w64-x86_64-toolchain
then add C:\msys64\mingw64\bin to PATH
thanks
For Ubuntu, what worked for me was to simply run:
sudo apt install gcc
On Amazon Linux 2:
Install go
wget https://go.dev/dl/go1.18.1.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.1.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
Install gcc
sudo yum groupinstall "Development Tools"
I recommend using the package group, even though it can be done without it, because groupinstall gives you the necessary packages to compile software on Amazon Linux and Redhat, CentOS for that matter.
on Ubuntu its very easy but on windows need to do it:
download MinGW on http://www.mingw.org/
install on basic package Gcc-g++ (see this image)
add on environment Patch of windows variables.
restart and continue with "go get ..."
If you are running Ubuntu do:
sudo apt-get update
sudo apt-get install build-essential.
If the above commands do not work do:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe"
The main component contains applications that are free software, can be freely redistributed and are fully supported by the Ubuntu team. & The universe component is a snapshot of the free, open-source, and Linux world.
Then install package by following command in terminal:
sudo apt-get update
sudo apt-get install build-essential.
For more info click here: https://itectec.com/ubuntu/ubuntu-problem-installing-build-essential-on-14-04-1-lts-duplicate/
Just add this to your Dockerfile
RUN apk add alpine-sdk
gcc should not be necessary, unless you are cross compiling for a non-windows platform, or use cgo.
If you still need gcc, however, you should install MinGW, which provides a gcc port for Windows (Cygwin and msys should also work, although I have never actually tested this).
Edit: I see from your error message now, that it is a dependency that requires gcc. If you didn't already know this, gcc is a c/c++ compiler, and in this case it is probably needed to compile c source files included by a dependency or sub-dependency.
Instruction to fix the "exec: “gcc”: executable file not found in %PATH%" error with MSYS2:
Download MSYS2.
Put MSYS2 folder into your $PATH.
Start the MSYS2 command line program.
Run this command: pacman -S gcc.
Kindly install the MINGW after GUI will automatically take.
http://mingw.org/wiki/Getting_Started
On Windows, you can install gcc by Scoop:
scoop install gcc
you need to download MingGW64
put MingGW64 folder into your $PATH
run go build xxx.go (with cgo library)
Hi jaswanth the main problem is that you haven't register your %GO_HOME%\pkg\tool\windows_amd64 to yuour Environment Path.
%GO_HOME% is the repository where you install your go at the first time.
same as other, just install tdm-gcc, but you can use its terminal, "MinGW", you can access it from start menu folder tdm-gcc, after start, browse to your project, and run it again
I'm a Windows user and I downloaded tdm-gcc (MinGW-w64 based) from the link below:
https://jmeubank.github.io/tdm-gcc/
After installation, it made a folder named "TDM-GCC-64".
I added "C:\TDM-GCC-64\bin" to my PATH, And it fixed my problem.

UHD Ubuntu 12.04 ZyBo ARMv7 32bit getting libboost-all-dev

Basic info:
I need to install UHD on my ZyBo board (by Digilent and Xilinx), but cannot. I have Xillinux Ubuntu 12.04 installed on it. It has an ARMv7 architecture of 32bits.(Go to bottom for question).
The UHD software can be installed by following the instructions here:
Installation option 1:
http://code.ettus.com/redmine/ettus/projects/uhd/wiki/UHD_Linux
An alternative installation process is:
Install Git and download source code:
sudo apt-get install git
git clone git://github.com/EttusResearch/uhd.git
Install all needed dependencies (see build guide):
sudo apt-get install libboost-all-dev libusb-1.0-0-dev python-cheetah doxygen python-docutils
Build-essential is a well packaged C++ library which is another needed
sudo apt-get install build-essential
Install and run cmake:
sudo apt-get install cmake
Next, to run the cmake program:
cd uhd/host
mkdir build
cd build
cmake ../
Ensure that all tests that are related to the main, necessary dependencies are successful.
Install and setup library path:
make
make test
sudo make install
cd uhd/host/build/lib
cp libuhd.so /etc/ld.so.conf.d
sudo ldconfig
sudo reboot
(I have also tried other website instructions and work-arounds).
PROBLEM / QUESTION:
However, the issue is that this software was made for i386 and amd64 machines. The ZyBo has an ARMv7 architecture. I used one installation guide which required the dependency of package: libboost-all-dev which is not available for my architecture. Therefore I was only to install half the requirements for UHD.
Does anyone know how to build the installation so that it can run on ARMv7 architecture or how to download the package libboost-all-dev onto an ARMv7 processor?
Thanks for the help
libboost-all-dev is available for arm, but accessing it requires Linux knowledge:
1.Search “Update Manager”
2.Click “Settings” on bottom left
3.Click on “Ubuntu Software” tab on upper left.
4.check/select the box “Community-maintained free and open-source Software (Universe)”
5.click “close” on bottom right

Boost C++ Serialization lib missing in xubuntu installation

I have xubuntu OS installed on my PC (12.04, Precise Pangolin) and installed C++ boost lib (1.49) using ubuntu's binary repository for boost by issuing the following command in the terminal:
sudo apt-get install libboost-dev
The command completed successfully and now I need to use boost serialization lib which is named libboost_serialization for my application. However, I cannot find this in any location under /usr/ in my file system and I wonder why this lib has not been installed automatically when I issued the above apt-get command. Am I supposed install another package separately to get boost serialization library in place in my xubuntu installation? Thanks.
You probably want this package: http://packages.ubuntu.com/precise/libboost-serialization-dev.
If you want all Boost sub-packages installed in one operation, you also have a libboost-all-dev package.

Resources