Readline dependencie error with stack - haskell

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

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).

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

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.

Mit Scheme Installation Error in Ubuntu (Environment Variable Settings)

I'm trying to install MIT-Scheme in Ubuntu on Windows 10.
I downloaded the tar-file from the Mit-Scheme website.
I run the command tar -xzf mit-scheme-9.2.tar.gz. Then cd mit-scheme-9.2/. Then cd src. Then ./configure.
However, I get the error logs below. Appreciate some advise. Thanks.
mingerz#DESKTOP-BMERQIM:~/mit-scheme-9.2/src$ ./configure
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
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 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 for native-code support... yes, for x86-64
checking for an existing MIT/GNU Scheme installation... configure: error:
This script needs an existing MIT/GNU Scheme installation to function,
but the following programs do not run it:
mit-scheme-x86-64
mit-scheme
If you have installed MIT/GNU Scheme in an unusual location, set the
environment variable MIT_SCHEME_EXE to the name or pathname of the
MIT/GNU Scheme executable, which is usually `mit-scheme' or
`/usr/local/bin/mit-scheme', and set the environment variable
MITSCHEME_LIBRARY_PATH to the pathname of the MIT/GNU Scheme library
directory, which is usually `/usr/local/lib/mit-scheme-x86-64'.
I dont understand how to implement the suggestion it is asking me to in regards to the environment variable.
This script needs an existing MIT/GNU Scheme installation to function
$ sudo apt-get install mit-scheme : http://packages.ubuntu.com/search?keywords=mit-scheme&searchon=names
Facing same issue on mac.
Instead of building from source, installing package helped in my case.
A. Installing Binary :
Get MIT-scheme (package) for Ubunto from MIT site http://www.gnu.org/software/mit-scheme/
Install it
Alias mit_scheme in ~/.bash_profile -->
alias mit-scheme=" path to MIT_scheme on your machine"
eg. alias mit-scheme="/Applications/MIT-Scheme.app/Contents/Resources/mit-scheme"
So that you can access it from bash.
B. If building from source, this link might be helpful.
https://groups.csail.mit.edu/mac/users/gjs/6.945/dont-panic/
And they say --> Don't Panic

Wine Cannot build a 32-bit program error

So I've been getting this problem (as seen below) on my CentOS 7 (64-bit) server when I try and configure wine with png with the following code:
./configure --with-png
I need this to run a specific server for a game called Mount & Blade Warband.
Because when I run the server i get this:
err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in.
fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
I have looked at this post:
https://www.centos.org/forums/viewtopic.php?f=13&t=44897
They said that the following code should fix it:
yum install glibc-devel.i686
But it didn't, atleast not for me. I`m still getting the following error over and over:
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking whether make sets $(MAKE)... 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 for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for cpp... cpp
checking for ld... ld
checking whether gcc -m32 works... no
configure: error: Cannot build a 32-bit program, you need to install 32-bit development libraries.
Solved, I had to run this code to install 32-bit devolpment libraries in order to do --with-png. The code came from this post:
https://www.centos.org/forums/viewtopic.php?f=48&t=49542
Code:
yum install glibc-devel.i686 dbus-devel.i686 freetype-devel.i686 pulseaudio- libs-devel.i686 libX11-devel.i686 mesa-libGLU-devel.i686 libICE-devel.i686 libXext-devel.i686 libXcursor-devel.i686 libXi-devel.i686 libXxf86vm-devel.i686 libXrender-devel.i686 libXinerama-devel.i686 libXcomposite-devel.i686 libXrandr-devel.i686 mesa-libGL-devel.i686 mesa-libOSMesa-devel.i686 libxml2-devel.i686 libxslt-devel.i686 zlib-devel.i686 gnutls-devel.i686 ncurses-devel.i686 sane-backends-devel.i686 libv4l-devel.i686 libgphoto2-devel.i686 libexif-devel.i686 lcms2-devel.i686 gettext-devel.i686 isdn4k-utils-devel.i686 cups-devel.i686 fontconfig-devel.i686 gsm-devel.i686 libjpeg-turbo-devel.i686 pkgconfig.i686 libtiff-devel.i686 unixODBC.i686 openldap-devel.i686 alsa-lib-devel.i686 audiofile-devel.i686 freeglut-devel.i686 giflib-devel.i686 gstreamer-devel.i686 gstreamer-plugins-base-devel.i686 libXmu-devel.i686 libXxf86dga-devel.i686 libieee1284-devel.i686 libpng-devel.i686 librsvg2-devel.i686 libstdc++-devel.i686 libusb-devel.i686 unixODBC-devel.i686 qt-devel.i686

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