How to build MinGW linux compiler from sources? - linux

I want to install wine using a remote terminal. My main limitation is that I can't use sudo, or apt-get. To install wine, I am following the steps described here. When I run the command /configure --enable-win64, I get:
(...)
configure: MinGW compiler not found, cross-compiling PE files won't be supported.
configure: libXxf86vm 64-bit development files not found, XFree86 Vidmode won't be supported.
configure: libOSMesa 64-bit development files not found (or too old), OpenGL rendering in bitmaps won't be supported.
configure: OpenCL 64-bit development files not found, OpenCL won't be supported.
configure: pcap 64-bit development files not found, wpcap won't be supported.
configure: libdbus 64-bit development files not found, no dynamic device support.
configure: libsane 64-bit development files not found, scanners won't be supported.
configure: libusb-1.0 64-bit development files not found (or too old), USB devices won't be supported.
configure: libgphoto2 64-bit development files not found, digital cameras won't be supported.
configure: libgphoto2_port 64-bit development files not found, digital cameras won't be auto-detected.
configure: gstreamer-1.0 base plugins 64-bit development files not found, GStreamer won't be supported.
configure: OSS sound system found but too old (OSSv4 needed), OSS won't be supported.
configure: libudev 64-bit development files not found, plug and play won't be supported.
configure: libSDL2 64-bit development files not found, SDL2 won't be supported.
configure: libcapi20 64-bit development files not found, ISDN won't be supported.
configure: libcups 64-bit development files not found, CUPS won't be supported.
configure: libopenal 64-bit development files not found (or too old), OpenAL won't be supported.
configure: libnetapi not found, Samba NetAPI won't be supported.
configure: Finished. Do 'make' to compile Wine.
I understand that I need a MinGW compiler first. Every search I do on how to install it leads to using sudo or apt-get, which I can't do.
So my question is, how to install gcc-mingw from sources or without using sudo, apt-get??
Thank you.

Related

How to build the 32-bit GRPC binaries from sources with CMAKE on Linux (CentOS 7)?

Does anyone know how to build the 32-bit GRPC binaries from sources with CMAKE on Linux (CentOS 7)? Which specific flags must be set to what specific values and passed to CMAKE in which specific way?
We know how to build the 64-bit GRPC binaries from sources with CMAKE on Linux but we also need its 32-bit version. I would imagine that there has to be a way to turn off the default 64-bit build and turn on the 32-bit build instead.
Thank you.

cross-compiling x264 for ARM

I'm novice in cross-compiling and just started to cross-compile packages on my linux machine (amd64) for host (NAS) with ARMv5 (linux kernel 2.6.31.8). I installed crosstool-ng and with it created toolchain for compilation for ARM. According to some tutorials online I succeeded to compile x264 package. But now when I try to run it, I was given the following error message
./x264: /lib/libm.so.6: version 'GLIBC_2.15' not found (required by ./x264)
Ok now I see that I need libm library but what it is and how to compile x264 with it?
From the error message: the version of x264 you built requires version of glibc 2.15. The Glibc is built as part of your cross compilation toolchain (through crosstool-ng).
You need to build a new toolchain with the same version of glibc found on your NAS root filesystem (or compatible).
(edited after #NotLikeThat comment)

Install a GCC ARM Embedded toolchain

I would like to load a very simple, hello world program, on an Embedded ARM processor. For this, I would like to install a toolchain in order to cross compile my code. I am currently working on a 64-bit Linux OS. Does anyone know of a GCC ARM embedded toolchain that I can download? I've downloaded a pre-built version of Linaro GCC but it only runs on a 32-bit Linux machine and I can't install the ia32-libs package because my Linux machine has no internet connection.
The gcc-arm toolchain I'm using for ARM Cortex-M processors can be found here-
https://launchpad.net/gcc-arm-embedded
It also builds for Cortex-A targets, which should cover the majority of embedded ARM systems.
You can download standalone distributions for many operating systems, including linux.
There are also 64bit builds of Linaro toolchain here. Just download the x86_64 and not the i686 version.

error on cross compile gdbserver

I want to use gdb to debug on arm-Linux development board. I get error when compiling gdbserver.
Host: Ubuntu 11 32bit
Target: arm-linux-gcc (gcc version 4.4.3)
root#mickeyvm:/home/mickey/gdb-7.4# ./configure --target=arm-linux --host=arm-linux
make
I get this error message:
configure: error: no termcap library found
From what I have searched in Google. The compiler cannot get ncurses library.
checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for tgetent in -lcurses... no
checking for tgetent in -lncurses... no
I follow suggested solution to install libncurses5-dev, but the problem still exist.
The libncurses5 really exists in my Linux.
root#mickeyvm:/home/mickey# dpkg -l | grep curse
ii libcurses-perl 1.28-1 Curses interface for Perl
ii libghc6-hscurses-dev 1.3.0.2-3build3 ncurses bindings for Haskell - development files for GHC6
ii libncurses5 5.7+20101128-1 shared libraries for terminal handling
ii libncurses5-dev 5.7+20101128-1 developer's libraries for ncurses
ii libncursesw5 5.7+20101128-1 shared libraries for terminal handling (wide character support)
ii libncursesw5-dev 5.7+20101128-1 developer's libraries for ncursesw
ii mtr-tiny 0.80-1 Full screen ncurses traceroute tool
ii ncurses-base 5.7+20101128-1 basic terminal type definitions
ii ncurses-bin 5.7+20101128-1 terminal-related programs and man pages
ii ncurses-term 5.7+20101128-1 additional terminal type definitions
Please help and point out what I missed. Thank you very much
Host: Ubuntu 11 32bit
32-bit what? Presumably your host is i686-linux-gnu, and not sparc-linux-gnu.
./configure --target=arm-linux --host=arm-linux
With above command you are attempting to build GDB that will run on arm-linux and debug arm-linux binaries, i.e. you are configuring a native GDB for arm-linux (but building it on i686-linux). Such native GDB can't use host libraries (for obvious reasons).
But it looks like you want a cross-gdb, not a native one. In that case, try
./configure --build=i686-linux --host=i686-linux --target=arm-linux
Reading this might help.

Which cross compiler?

What is the difference between
MinGW cross compiler and
GCC Cross compiler.
Which one used in which operating system?
I need to create an EXE file in the Linux operating system using Qt, hence which is the cross compiler to be used?
MinGW is a GCC cross compiler for Windows environments. (There are multiple GCC cross compilers for various different targets.)
To compile Windows executables on your Linux box, you want a MinGW install for your distribution of Linux.
If you're running
Debian, you want http://packages.debian.org/lenny/mingw32 (apt-get install mingw32)
Ubuntu, you want http://packages.ubuntu.com/jaunty/mingw32 (apt-get install mingw32)
Red Hat Linux or CentOS, you want several of the MinGW packages from http://download.fedora.redhat.com/pub/epel/5/i386/repoview/M.group.html (see EPEL how-to then yum install mingw32-binutils and mingw32-gcc-g++ at minimum)
Gentoo, see http://www.gentoo-wiki.info/MinGW
openSUSE, then you can find builds at http://download.opensuse.org/repositories/CrossToolchain:/mingw/
MingW32 is a port of GCC with "win32 target".
There are two architecture in a cross-compiler: host and target. The host is the platform the compiler run on; the target is what the result code will run.
Assume you are using Ubuntu, you can see the package here.
MinGW is basically a port of GCC and related tools, allowing them to run natively on Windows machines.
Cross compiling is the act of using a compiler on one operating system/architecture to generate a binary/EXE/DLL/object that is compatible with another operating system/architecture. Basically, you ask the compiler to generate assembly and startup routines for something other than the host OS's default.
If you were on a Linux machine, you'd use GCC to compile it for the Linux machine... If you were on a Windows machine, you'd use MinGW, but with flags to tell it to compile for the Linux machine's specifications.
GCC is usually used in Linux.. MinGW is just a Windows port of GCC to compile source to EXE files.

Resources