"X11 libraries not found" error when installing the X11 package with Stack - haskell

I need to use the x11 package with the lts-8.2 resolver, and when I run the command stack build, I get the following :
X11-1.8: configure
Progress: 1/2
-- While building package X11-1.8 using:
/tmp/stack7885/X11-1.8/.stack-work/dist/x86_64-linux/Cabal-1.24.2.0 /setup/setup --builddir=.stack-work/dist/x86_64-linux/Cabal-1.24.2.0 configure --with-ghc=/home/userXYZ/.stack/programs/x86_64-linux/ghc-8.0.2/bin/ghc --with-ghc-pkg=/home/userXYZ/.stack/programs/x86_64-linux/ghc-8.0.2/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/home/userXYZ/.stack/snapshots/x86_64-linux/lts-8.2/8.0.2/pkgdb --libdir=/home/userXYZ/.stack/snapshots/x86_64-linux/lts-8.2/8.0.2/lib --bindir=/home/userXYZ/.stack/snapshots/x86_64-linux/lts-8.2/8.0.2/bin --datadir=/home/userXYZ/.stack/snapshots/x86_64-linux/lts-8.2/8.0.2/share --libexecdir=/home/userXYZ/.stack/snapshots/x86_64-linux/lts-8.2/8.0.2/libexec --sysconfdir=/home/userXYZ/.stack/snapshots/x86_64-linux/lts-8.2/8.0.2/etc --docdir=/home/userXYZ/.stack/snapshots/x86_64-linux/lts-8.2/8.0.2/doc/X11-1.8 --htmldir=/home/userXYZ/.stack/snapshots/x86_64-linux/lts-8.2/8.0.2/doc/X11-1.8 --haddockdir=/home/userXYZ/.stack/snapshots/x86_64-linux/lts-8.2/8.0.2/doc/X11-1.8 --dependency=base=base-4.9.1.0 --dependency=data-default=data-default-0.7.1.1-7EGYJX2YWqWJRbPFUHNoCr
Process exited with code: ExitFailure 1
Logs have been written to: /home/userXYZ/Documents/programming/haskell/projects/MyStack/screen-linux/.stack-work/logs/X11-1.8.log
[1 of 1] Compiling Main ( /tmp/stack7885/X11-1.8/Setup.hs, /tmp/stack7885/X11-1.8/.stack-work/dist/x86_64-linux/Cabal-1.24.2.0/setup/Main.o )
/tmp/stack7885/X11-1.8/Setup.hs:6:29: warning: [-Wdeprecations]
In the use of ‘defaultUserHooks’
(imported from Distribution.Simple):
Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless you need Cabal-1.2
compatibility in which case you must stick with defaultUserHooks"
Linking /tmp/stack7885/X11-1.8/.stack-work/dist/x86_64-linux/Cabal-1.24.2.0/setup/setup ...
Warning: defaultUserHooks in Setup script is deprecated.
Configuring X11-1.8...
configure: WARNING: unrecognized options: --with-hc
checking for gcc... /usr/bin/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/gcc accepts -g... yes
checking for /usr/bin/gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... /usr/bin/gcc -E
checking for X... no
configure: error: in `/tmp/stack7885/X11-1.8':
configure: error: X11 libraries not found, so X11 package cannot be built
See `config.log' for more details
I am running on LinuxMint 17.2 64bits.
I found a similar issue here, but unfortunately that did not help me to solve my issue.
I am looking for any help to fix the issue. I am not entirely sure where to start with.
===============================
EDIT: following the suggestion of duplode, I loaded libx11-dev, and then got the following set of other messages after running stack build :
X11-1.8: configure
Progress: 1/2
-- While building package X11-1.8 using:
/tmp/stack12282/X11-1.8/.stack-work/dist/x86_64-linux/Cabal-1.24.2.0/setup/setup --builddir=.stack-work/dist/x86_64-linux/Cabal-1.24.2.0 configure --with-ghc=/home/userXYZ/.stack/programs/x86_64-linux/ghc-8.0.2/bin/ghc --with-ghc-pkg=/home/userXYZ/.stack/programs/x86_64-linux/ghc-8.0.2/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/home/userXYZ/.stack/snapshots/x86_64-linux/lts-8.2/8.0.2/pkgdb --libdir=/home/userXYZ/.stack/snapshots/x86_64-linux/lts-8.2/8.0.2/lib --bindir=/home/userXYZ/.stack/snapshots/x86_64-linux/lts-8.2/8.0.2/bin --datadir=/home/userXYZ/.stack/snapshots/x86_64-linux/lts-8.2/8.0.2/share --libexecdir=/home/userXYZ/.stack/snapshots/x86_64-linux/lts-8.2/8.0.2/libexec --sysconfdir=/home/userXYZ/.stack/snapshots/x86_64-linux/lts-8.2/8.0.2/etc --docdir=/home/userXYZ/.stack/snapshots/x86_64-linux/lts-8.2/8.0.2/doc/X11-1.8 --htmldir=/home/userXYZ/.stack/snapshots/x86_64-linux/lts-8.2/8.0.2/doc/X11-1.8 --haddockdir=/home/userXYZ/.stack/snapshots/x86_64-linux/lts-8.2/8.0.2/doc/X11-1.8 --dependency=base=base-4.9.1.0 --dependency=data-default=data-default-0.7.1.1-7EGYJX2YWqWJRbPFUHNoCr
Process exited with code: ExitFailure 1
Logs have been written to: /home/userXYZ/Documents/programming/haskell/projects/MyStack/screen-linux/.stack-work/logs/X11-1.8.log
[1 of 1] Compiling Main ( /tmp/stack12282/X11-1.8/Setup.hs, /tmp/stack12282/X11-1.8/.stack-work/dist/x86_64-linux/Cabal-1.24.2.0/setup/Main.o )
/tmp/stack12282/X11-1.8/Setup.hs:6:29: warning: [-Wdeprecations]
In the use of ‘defaultUserHooks’
(imported from Distribution.Simple):
Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless you need Cabal-1.2
compatibility in which case you must stick with defaultUserHooks"
Linking /tmp/stack12282/X11-1.8/.stack-work/dist/x86_64-linux/Cabal-1.24.2.0/setup/setup ...
Warning: defaultUserHooks in Setup script is deprecated.
Configuring X11-1.8...
configure: WARNING: unrecognized options: --with-hc
checking for gcc... /usr/bin/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/gcc accepts -g... yes
checking for /usr/bin/gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... /usr/bin/gcc -E
checking for X... libraries , headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... no
checking whether to build Xinerama... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking X11/extensions/Xinerama.h usability... no
checking X11/extensions/Xinerama.h presence... no
checking for X11/extensions/Xinerama.h... no
WARNING: Xinerama headers not found. Building without Xinerama support
checking X11/extensions/Xrandr.h usability... no
checking X11/extensions/Xrandr.h presence... no
checking for X11/extensions/Xrandr.h... no
configure: error: X11/extensions/Xrandr.h (from libXrandr) is required

Errors about missing libraries when installing packages with stack or cabal-install are typically about non-Haskell dependencies that must be installed separately, as the Haskell-specific tools aren't meant to pull them on their own. In this case, to quote the readme of the X11 Haskell package...
You will need development versions of at least the X11, xrandr, and Xinerama libraries installed for the build to succeed [...]
The development versions of these libraries can be installed through the package manager of your Linux distribution; in the case of Mint they amount to the libx11-dev, libxrandr-dev and libxinerama-dev packages respectively.

Related

Build Pulseaudio-11.1 and intltool >= 0.35.0 bug

Im trying to build pulseaudio-11.1 because firefox asks for it to play audio on video.
Im using knoppix 8.1, 64 bit installation, but it runs in 32bits.
When I configure the pulseaudio source, I get a message stating that intltool is too old. Despite having met their version requirement at 0.35.0. I installed from source version 0.51.0 and 0.50.2 but neither installation satisfied the demand. I get the same message at the end when I run bootstrap.sh
root#kami:/Downloads/pulseaudio-11.1# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... //bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '0' is supported by ustar format... yes
checking whether GID '0' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for stow... no
checking whether make supports nested variables... (cached) yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether g++ supports C++11 features by default... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... //bin/grep
checking for egrep... //bin/grep -E
checking whether gcc needs -traditional... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gm4... no
checking for m4... m4
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking whether NLS is requested... yes
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^(.*)\${ <-- HERE ?([A-Z_]+)}?(.*)$/ at /usr/local/bin/intltool-update line 1064.
checking for intltool >= 0.35.0... found
configure: error: Your intltool is too old. You need intltool 0.35.0 or later.
This was before and after I removed version 0.35.0 of intltool that was pre-installed and then installed the newer versions, 0.51.0, then 0.50.2 to try a slightly older version if there was something wrong with the newest release, which is ironically quite old dating back to 2015.
Also bizarrly to top it off as you can see in the output before stating that the version is too old that it had found exactly what it is saying it does not have.
So in conclusion pulseaudio asks for intltool >= 0.35.0 which it finds and says right afterwards that it has not, which remained true across 3 seperate instances that satisfied their request on version 0.35.0, 0.51.0 and 0.50.2
Any help is appreciated.
At installation 'NetworkManager-l2tp-master' i stumbled upon an error:
configure: error: Your intltool is too old. You need intltool 0.35 or later.
I used intermediate commands:
./configure
sudo apt update
sudo apt install intltool imagemagick libmagickcore-dev pstoedit libpstoedit-dev
git clone https://github.com/autotrace/autotrace.git
cd autotrace
#unnecessary command for clarification should bugs be introduced later
git rev-parse HEAD
#t86c9c80c4h669302cb2571c0cab0rer7a102731
./autogen.sh
cd .. # necessarily exit from 'autotrace' directory
autoreconf -i
./configure # again
after that, the error is resolved and indicates to:
configure: error: Package requirements (gtk+-3.0 >= 3.4) were not met:
No package 'gtk+-3.0' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables GTK_CFLAGS
and GTK_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
This alert indicates that possible it is not installed pkg-config (corresponding version of Linux).

Readline dependencie error with stack

I have this error when I add this dependencie to my project.cabal file.
Warning: defaultUserHooks in Setup script is deprecated.
Configuring readline-1.0.3.0...
checking for gcc... /usr/bin/gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/gcc accepts -g... yes
checking for /usr/bin/gcc option to accept ISO C89... none needed
checking for GNUreadline.framework... checking for readline... no
checking for tputs in -lncurses... yes
checking for readline in -lreadline... no
checking for rl_readline_version... no
configure: error: readline not found, so this package cannot be built
See `config.log' for more details.
what I have to do to solve this?
Say your are on OSX
$ brew install readline
[...]
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/readline/lib
CPPFLAGS: -I/usr/local/opt/readline/include
Now you know where the library got installed you can set some environmental variables that ./configure will pick up
LDFLAGS=-L/usr/local/opt/readline/lib \
CFLAGS=-I/usr/local/opt/readline/include \
stack install readline --extra-include-dirs=/usr/local/opt/readline/include --extra-lib-dirs=/usr/local/opt/readline/lib

Configure options for building MinGW-64 on linux-64 for linux-64 (ultimately targetting windows-64)

I want to build MinGW-w64 where:
A: I want to compile MinGW itself on Linux (64-bit).
B: I want the MinGW tools (compiler, etc) to run on Linux (64-bit).
C: I want the MinGW tools (compiler, etc) to produce code that runs on Windows 64-bit (Win7 & Win8).
I'm having trouble at the configure stage. I've googled around a bit but I can't find out what options I need to pass to configure.
I have downloaded the source for MinGW-w64 SVN from (https://svn.code.sf.net/p/mingw-w64/code/trunk/).
(AFAICT this is the current official repo).
The source has a text help (mingw-w64-doc/howto-build/mingw-w64-howto-build.txt). However, this is primarily intended for those wanting to run MinGW tools on Windows.
The example options (for a non-multilib w64 target) are: --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --disable-multilib
But I think I want the host option to refer to linux (right?). I've tried --host=x86_64-linux-gnuand --host=x86_64-pc-linux-gnu but no luck.
I get the error:
configure: error: Please check if the mingw-w64 header set and the build/host option are set properly.
configure: error: ../../../svn/mingw-w64-v6615-2014-05-07/mingw-w64-crt/configure failed for mingw-w64-crt
The full log is
checking whether to enable maintainer-specific portions of Makefiles... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/make/tool/MinGW/svn/mingw-w64-v6615-2014-05-07/build-aux/missing: Unknown `--is-lightweight' option
Try `/make/tool/MinGW/svn/mingw-w64-v6615-2014-05-07/build-aux/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for x86_64-linux-gnu-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking whether to build the headers... yes
checking whether to build the crt... yes
checking whether to build the optional libraries... no
checking whether to build the optional tools... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
=== configuring in mingw-w64-headers (/make/tool/MinGW/build/v6615-2014-05-07/mingw-w64-headers)
configure: running /bin/bash ../../../svn/mingw-w64-v6615-2014-05-07/mingw-w64-headers/configure --disable-option-checking '--prefix=/make/tool/MinGW/use/v6615/x86_64-w64-mingw32' '--target=x86_64-w64-mingw32' '--host=x86_64-linux-gnu' '--disable-multilib' '--with-sysroot=/make/tool/MinGW/use/v6615/x86_64-w64-mingw32' 'host_alias=x86_64-linux-gnu' 'target_alias=x86_64-w64-mingw32' --cache-file=/dev/null --srcdir=../../../svn/mingw-w64-v6615-2014-05-07/mingw-w64-headers
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/make/tool/MinGW/svn/mingw-w64-v6615-2014-05-07/mingw-w64-headers/build-aux/missing: Unknown `--is-lightweight' option
Try `/make/tool/MinGW/svn/mingw-w64-v6615-2014-05-07/mingw-w64-headers/build-aux/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for x86_64-linux-gnu-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking whether to rebuild headers with widl... no
checking whether to build a w32api package for Cygwin... no
checking for c-runtime headers... yes
checking for optional sdk headers... ddk,directx
checking if installing idl files is enabled... no
checking whether to enable the secure API... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating crt/_mingw.h
config.status: creating config.h
config.status: config.h is unchanged
=== configuring in mingw-w64-crt (/make/tool/MinGW/build/v6615-2014-05-07/mingw-w64-crt)
configure: running /bin/bash ../../../svn/mingw-w64-v6615-2014-05-07/mingw-w64-crt/configure --disable-option-checking '--prefix=/make/tool/MinGW/use/v6615/x86_64-w64-mingw32' '--target=x86_64-w64-mingw32' '--host=x86_64-linux-gnu' '--disable-multilib' '--with-sysroot=/make/tool/MinGW/use/v6615/x86_64-w64-mingw32' 'host_alias=x86_64-linux-gnu' 'target_alias=x86_64-w64-mingw32' --cache-file=/dev/null --srcdir=../../../svn/mingw-w64-v6615-2014-05-07/mingw-w64-crt
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-linux-gnu-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for sysroot... /make/tool/MinGW/use/v6615/x86_64-w64-mingw32
checking for a sed that does not truncate output... /bin/sed
checking for gawk... (cached) gawk
checking for x86_64-linux-gnu-gcc... x86_64-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-linux-gnu-gcc accepts -g... yes
checking for x86_64-linux-gnu-gcc option to accept ISO C89... none needed
checking whether x86_64-linux-gnu-gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of x86_64-linux-gnu-gcc... gcc3
checking for x86_64-linux-gnu-g++... x86_64-linux-gnu-g++
checking whether we are using the GNU C++ compiler... yes
checking whether x86_64-linux-gnu-g++ accepts -g... yes
checking dependency style of x86_64-linux-gnu-g++... gcc3
checking how to run the C preprocessor... x86_64-linux-gnu-gcc -E
checking for x86_64-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for x86_64-linux-gnu-dlltool... no
checking for dlltool... no
checking for x86_64-linux-gnu-ar... no
checking for x86_64-linux-gnu-lib... no
checking for x86_64-linux-gnu-link... no
checking for ar... ar
checking the archiver (ar) interface... ar
checking dependency style of x86_64-linux-gnu-gcc... gcc3
checking for x86_64-linux-gnu-as... no
checking for as... as
checking whether to build a w32api package for Cygwin... no
checking whether to build the Win32 libraries... no
checking whether to build the Win64 libraries... yes
checking whether to build the WinCE libraries... no
checking whether to enable globbing... no
checking whether to enable private exports... no
checking whether to enable delay import libs... no
checking whether to enable experimental features... no
checking whether the compiler supports -municode... no
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking _mingw_mac.h usability... no
checking _mingw_mac.h presence... no
checking for _mingw_mac.h... no
configure: error: Please check if the mingw-w64 header set and the build/host option are set properly.
configure: error: ../../../svn/mingw-w64-v6615-2014-05-07/mingw-w64-crt/configure failed for mingw-w64-crt
NOTE: I can successfully compile native GCC & Clang from source.
Purpose:
My ultimate goal is to use the latest Clang to produce C++14 code for Windows 7/8 64-bit (including D3D11 & OpenGL).
I want to build trunk MinGW because the latest Clang produces assembly code that the default MinGW cannot assemble (mainly "junk at end of line" errors).
As of 2014-05-07 (today), only Clang offers full C++14 support, and I am making use of features only available in Clang (eg: variable templates).
Yet, Clang relies on GCC / MinGW for assembling and linking.
Info:
OS: Linux Mint 16 64-bit (XFCE).
Thanks for all assistance.
Old question, but an answer might be helpful to those coming from google.
The host and build flags are a bit misleading. The info from the help page at mingw-w64-crt/configure --help shows:
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
So we want to leave --build alone, and specify the windows system we wish to cross-compile for with --host.
So, the way to build for 64bit windows, and include both 32bit and 64bit libraries and std::experimental features is with:
./configure --enable-lib32 --enable-lib64 --enable-experimental --host=x86_64-w64-mingw32
It's very similar if you want to build for 32bit windows, but of course you can't enable 64bit mode:
./configure --enable-lib32 --enable-experimental --host=i686-w64-mingw32
https://github.com/Zeranoe/mingw-w64-build
I think your answer is here:
./mingw-w64-build x86_64 for 64bit;
or
./mingw-w64-build x86_64 i686 for 32bit.
I met the same error while configuring. After reading the shell in mingw-w64-build this file, I think you will have to execute:
./configure in folder ../x86_64-w64-v8.0.0/mingw-w64-headers,
then
./configure in folder ../x86_64-w64-v8.0.0/mingw-w64-crt,
and finally
./configure in folder ../x86_64-w64-v8.0.0/mingw-w64-libraries/winpthreads.
I did not verify the whole process manually, because this shell file just did the job.
Maybe you could try this - its the latest version of mingw and you dont have to compile it by yourself:
https://github.com/Zeranoe/mingw-w64-build
it supports almost all distros...

Trying to install HGL, X11 error

I've been trying to install HGL (Haskell Graphics Library), I used command cabal install HGL-3.2.0.5. That's what I'm getting:
Resolving dependencies...
Configuring X11-1.6.1.1...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for X... libraries , headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking whether to build Xinerama... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking X11/extensions/Xinerama.h usability... no
checking X11/extensions/Xinerama.h presence... no
checking for X11/extensions/Xinerama.h... no
WARNING: Xinerama headers not found. Building without Xinerama support
checking X11/extensions/Xrandr.h usability... no
checking X11/extensions/Xrandr.h presence... no
checking for X11/extensions/Xrandr.h... no
configure: error: X11/extensions/Xrandr.h (from libXrandr) is required
cabal: Error: some packages failed to install:
HGL-3.2.0.5 depends on X11-1.6.1.1 which failed to install.
X11-1.6.1.1 failed during the configure step. The exception was:
ExitFailure 1
I googled a lot, however it didn't help me enough. Could someone help me fixing this? Thanks!
The relevant bit of the error message is
configure: error: X11/extensions/Xrandr.h (from libXrandr) is required
cabal does not install C dependencies, so you need to install libXrandr separately (e.g. through the package manager of your distro).

Cross Compiling Expect for ARM

I have downloaded expect5.4 . I'm trying to cross compile it for ARM(PandaBoard) running stripped down version of linux.
In the initial setup of configuring , I try
Shell$ ./configure --host=ARM
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking for correct TEA configuration... ok (TEA 3.9)
configure: configuring expect 5.45
checking for Tcl configuration... found /home/user1/scripts/tcl8.6.0/unix/tclConfig.sh
checking for existence of /home/user1/scripts/tcl8.6.0/unix/tclConfig.sh... loading
configure: --prefix defaulting to TCL_PREFIX /usr/local
configure: --exec-prefix defaulting to TCL_EXEC_PREFIX /usr/local
checking for ARM-gcc... /home/user1/toolchain/toolchain/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /home/user1/toolchain/toolchain/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc accepts -g... yes
checking for /home/user1/toolchain/toolchain/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... /home/user1/toolchain/toolchain/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking for ARM-ranlib... no
checking for ranlib... ranlib
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
..
..
..
..
..
checking for openpty... no
checking for openpty in -lutil... yes
checking if running Sequent running SVR4... no
checking build system type... i686-pc-linux-gnu
checking host system type... Invalid configuration `ARM': machine `ARM' not recognized
configure: error: /bin/bash tclconfig/config.sub ARM failed
UPDATE:
On compiling with ./configure --host=arm , It goes further the error i'm getting now is
checking for sysconf... yes
checking for strftime... yes
checking for strchr... yes
checking for timezone... yes
checking for siglongjmp... yes
checking for memcpy... yes
checking if WNOHANG requires _POSIX_SOURCE... configure: error: Expect can't be cross compiled
Its able to pick arm-gcc but it fails for some reason.
You will get a bit further with --host=arm (lowercase), but not
much: expect just doesn't want to be cross-compiled. Overcoming this
would require non-trivial modifications in configure.in. It could be
rational to work on them if expect is the only thing you want to
cross-compile, but if there are many others, you'd better setup some
environment where you can run compiled binaries (scratchbox or
something like that).
Expect (Version = 5.45.4) is available in buildroot 2019.11 and it has support for the PandaBoard.
You could
download `buildroot 2019.11' from the project .
Extract it
run make pandaboard_defconfig inside the buildroot-folder
run make menuconfig and enable TCL(-> Target packages
-> Interpreter languages and scripting) and then expect (-> Target packages
-> Interpreter languages and scripting) because of the dependency
run make to build the whole thing and get the executable from the
output/build/expect folder

Resources