Erlang Build Fails: Can not link the wx driver, wx will NOT be useable - erlang

./configure returns an error message when run:
wx:Can not link the wx driver, wx will NOT be useable
When I run .\configure | grep wx, the logs are as follows:
configure: configuring in wx/.
configure: running /bin/bash '/home/nihal/Downloads/otp_src_17.1/lib/wx/./configure' --prefix=/usr/local '--prefix=/usr/local' 'ERL_TOP=/home/nihal/Downloads/otp_src_17.1' '--cache-file=/dev/null' '--srcdir=/home/nihal/Downloads/otp_src_17.1/lib' --cache-file=/dev/null --srcdir=/home/nihal/Downloads/otp_src_17.1/lib/wx/.
rm: remove write-protected regular file './CONF_INFO'?
checking for debug build of wxWidgets... checking for wx-config... /usr/bin/wx-config
checking for wxWidgets version >= 2.8.4 (--unicode --debug=yes)... yes (version 2.8.12)
checking for wxWidgets static library... no
checking for standard build of wxWidgets... checking for wx-config... (cached) /usr/bin/wx-config
checking for wxWidgets version >= 2.8.4 (--unicode --debug=no)... yes (version 2.8.12)
checking for wxWidgets static library... no
checking if wxwidgets have opengl support... yes
checking for wx/stc/stc.h... yes
checking if we can link wxwidgets programs... yes
wx : Can not link the wx driver, wx will NOT be useable
How do I successfully build it?

If you don't need wx, you can build Erlang without it with:
./configure --without-wx
If you need wx support, see instructions at Building with wxErlang section.

Check the contents of the $ERL_TOP/lib/wx/config.log file for a possible cause.
In my case, I was missing the c++ compiler. After installing g++ I was able to compile and install OTP with no further problems.

I got the same error while building erlang on CentOS 7.
I too was missing the C++ compiler.
After doing yum install gcc-c++, I was able to build erlang successfully.

Related

How to pass a custom script to ./configure to be run after the compiling?

I'm trying to build the Tor project in my jailbroken iOS device. I cloned the Git repository, and ran autogen.sh. Next, I ran ./configure, and a C compiler was not found. So I ran this instead (after installing Clang, Theos Dependencies, etc. from the repos):
./configure CC="clang --isysroot /var/mobile/theos/sdks/iPhoneOS11.2.sdk"
Now it says that it can't run the C compiled program:
PoisonImy:~/tor mobile$ ./configure CC="clang -isysroot /var/mobile/theos/sdks/iPhoneOS11.2.sdk"
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... no
checking for mawk... no
checking for nawk... no
checking for awk... no
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... clang -isysroot /var/mobile/theos/sdks/iPhoneOS11.2.sdk
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... configure: error: in `/var/mobile/tor':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
This is because of the "Killed: 9" error I got earlier when I compiled a hello world program using Clang and attempted to run it. I fixed it by using 'ldid -SEntitlements.plist a.out', with the Entitlements.plist file in here.
Is there any way to instruct the configure script (or clang) to do the same?
EDIT: Maybe making a shell script that runs clang and ldid, and then passing that to the configure script? I'll try this one. I'm new to shell scripting so I have no idea how to approach this problem.
Done. Here's the script I used:
#!/bin/bash
ALL="$*"
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-o)
OUTPUT="$2"
shift
shift
;;
*)
shift
;;
esac
done
clang -isysroot /var/mobile/theos/sdks/iPhoneOS11.2.sdk ${ALL}
ldid -S/var/mobile/Entitlements.plist ${OUTPUT}
I saved it as 'compiler.sh', made it executable, and put it in my PATH. And then I used that for my compiler in the configure script. You may need to adjust the SDK directory and Entitlements.plist directory on your own.

Home-brew OpenMPI installation issue

I am having an issue installing OpenMPI using Home-brew, having searched around I have not been able to find any answers for this. I am doing this because when installing an R package from GitHub I am receiving this error:
clang: error: unsupported option '-fopenmp'
The advice seems to be that in this case one should reinstall openmpi using homebrew. When I do that I get the following response:
brew reinstall openmpi --build-from-source
==> Reinstalling open-mpi
==> Downloading https://download.open-mpi.org/release/open-mpi/v3.1/openmpi-3.1.2.tar.bz2
Already downloaded: /Users/Dom/Library/Caches/Homebrew/open-mpi--3.1.2.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/open-mpi/3.1.2 --disable-silent-rules --enable-ipv6 --with-libevent=/usr/local/opt/libevent --with-sge
Last 15 lines from /Users/Dom/Library/Logs/Homebrew/open-mpi/01.configure:
checking to see if Fortran compilers need additional linker flags... -Wl,-flat_namespace
checking external symbol convention... single underscore
checking if C and Fortran are link compatible... yes
checking to see if Fortran compiler likes the C++ exception flags... skipped (no C++ exceptions flags)
checking to see if mpifort compiler needs additional linker flags... -Wl,-commons,use_dylibs
checking if Fortran compiler supports CHARACTER... yes
checking size of Fortran CHARACTER... 1
checking for C type corresponding to CHARACTER... char
checking alignment of Fortran CHARACTER... 1
checking for corresponding KIND value of CHARACTER... C_SIGNED_CHAR
checking KIND value of Fortran C_SIGNED_CHAR... no ISO_C_BINDING -- fallback
checking Fortran value of selected_int_kind(4)... no
configure: WARNING: Could not determine KIND value of C_SIGNED_CHAR
configure: WARNING: See config.log for more details
configure: error: Cannot continue
I seem to be going further down a rabbit hole I don't really understand, I have run brew doctor and it advises me that there are a bunch of .config files etc which could confound it but I'm not keen on deleting/moving those files as I don't know if they are dependencies for other things. Could anyone set me straight here?
Many Thanks for any responses

How can I install ImageMagick in Fedora 26 / Lampp?

I am using Fedora 26 with Lampp(Xampp) version (PhP)5.6.31 and I 'm trying to install ImageMagick through a terminal command like this:
sudo /opt/lampp/bin/pecl install imagick
I am getting this result:
Downloading imagick-3.4.3.tgz ...
Starting to download imagick-3.4.3.tgz (245,410 bytes)
...................................................done: 245,410 bytes
19 source files, building
running: phpize
grep: /opt/lampp/include/php/main/php.h: No such file or directory
grep: /opt/lampp/include/php/Zend/zend_modules.h: No such file or directory
grep: /opt/lampp/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
Please provide the prefix of Imagemagick installation [autodetect] :
building in /tmp/pear/temp/pear-build-margaritisyJF8eL/imagick-3.4.3
running: /tmp/pear/temp/imagick/configure --with-php-config=/opt/lampp/bin/php-config --with-imagick
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
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 cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /opt/lampp
checking for PHP includes... -I/opt/lampp/include/php -I/opt/lampp/include/php/main -I/opt/lampp/include/php/TSRM -I/opt/lampp/include/php/Zend -I/opt/lampp/include/php/ext -I/opt/lampp/include/php/ext/date/lib
checking for PHP extension directory... /opt/lampp/lib/php/extensions/no-debug-non-zts-20131226
checking for PHP installed headers prefix... /opt/lampp/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable the imagick extension... yes, shared
checking for pkg-config... /bin/pkg-config
checking ImageMagick MagickWand API configuration program... checking Testing /usr/local/bin/MagickWand-config... Doesn't exist
checking Testing /usr/bin/MagickWand-config... Doesn't exist
checking Testing /usr/sbin/bin/MagickWand-config... Doesn't exist
checking Testing /opt/bin/MagickWand-config... Doesn't exist
checking Testing /opt/local/bin/MagickWand-config... Doesn't exist
configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.
ERROR: `/tmp/pear/temp/imagick/configure --with-php-config=/opt/lampp/bin/php-config --with-imagick' failed
As those are my first steps in Linux world, could anyone help me by giving me step-by-step instructions on how I can make ImageMagick extension work under my lampp ??
Thanks in advance for your help
Looks like you are building your own PHP rather than using the system one, but want to use the system PHP. Like so many other answers here, the problem is that you need to have the corresponding devel packages installed. In your case, that's ImageMagick-devel. You can look for lines like:
checking Testing /usr/bin/MagickWand-config... Doesn't exist
and then run sudo dnf install /usr/bin/MagickWand-config to pull in the needed packages. (And it looks from the earlier warning before the error that you also want sudo dnf install re2c.)

Failed to link to module 'rlm_python': rlm_python.so

I was trying to create a python authentication for freeradius 3.0.8. I followed this example. But when I'm trying to start freeradius in debug mode using command radiusd -X It shows following error.
/usr/local/etc/raddb/mods-enabled/python[9]: Failed to link to module 'rlm_python': rlm_python.so: cannot open shared object file: No such file or directory
I looked /usr/local/lib/ folder and found that rlm_python module is not there. How can I add that module? My python module inside /raddb/mods-available/ is as follows.
python {
module = example
mod_authorize = ${.module}
func_authorize = authorize
}
Appreciate any help.
rlm_python isn't always packaged depending on the distribution.
Basic build instructions can be found here: http://wiki.freeradius.org/building/Home
You will also need to have installed the python-dev/python-devel package on your system. If python still doesn't work you may need to specify the path to the python binary manually by passing it to configure e.g. ./configure --with-rlm-python-bin=/usr/bin/python2.7.
If you just wan to verify the configure scripts have picked up python cd src/modules/rlm_python; ./configure
On my system (macOS 10.11.6) the output when python is found is:
checking for gcc... /usr/local/opt/llvm/bin/clang
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/local/opt/llvm/bin/clang accepts -g... yes
checking for /usr/local/opt/llvm/bin/clang option to accept ISO C89... none needed
checking how to run the C preprocessor... /usr/local/opt/llvm/bin/clang -E
checking for python2.7... python2.7
configure: Python sys.prefix "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7"
configure: Python sys.exec_prefix "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7"
configure: Python sys.version "2.7"
configure: Python local_mod_libs ""
configure: Python base_mod_libs ""
configure: Python other_libs "-u _PyMac_Error $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) -ldl -framework CoreFoundation"
checking for Python.h in /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/include/python2.7/... yes
checking for Py_Initialize in -lpython2.7 in /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config... yes
configure: creating ./config.status
config.status: creating all.mk
Once the configure script find the python binary, it'll generally all "just work", as it can then get compilation and linking flags from python itself.

image::magick not installing with cpan in perl v5.14.2 from dwimperl

I am attempting to rebuild my development/test environment on a new laptop running windows7 32 bit. imageMagick is one of the modules I had installed in an (ancient) version on my old laptop. I have downloaded and installed perl from dwimperl, which is v5.14.2 and had a couple modules install, and several did not.
cpanm Image::Magick - failed
cpanm DB_File - failed
cpanm Time::HiRes - failed
I searched around and found a discussion on magick failing to install on v5.12, but couldn't tell if that was supposed to have been fixed, or if I need to attempt to recreate the fix discussed for 5.12
should I try installing perl from Strawberry? looks like it is a little newer v5.18 ?
is there something I can tweak and re-run cpan installs?
I installed the binaries from imagemagick, from Link first, then cpan again, and cpan still fails....
This is the top part of the build log down to where it really goes south and starts kicking out errors:
cpanm (App::cpanminus) 1.6941 on perl 5.014002 built for MSWin32-x86-multi-thread
Work directory is C:\Users\dtbaker/.cpanm/work/1377281741.8420
You have make C:\Dwimperl\c\bin\dmake.exe
You have LWP 6.03
Falling back to Archive::Tar 1.80
Searching Image::Magick on cpanmetadb ...
--> Working on Image::Magick
Fetching http://www.cpan.org/authors/id/J/JC/JCRISTY/PerlMagick-6.86.tar.gz
-> OK
Unpacking PerlMagick-6.86.tar.gz
Entering PerlMagick-6.86
META.yml/json not found. Creating skelton for it.
Configuring PerlMagick-6.86
Running Makefile.PL
################################### WARNING! ###################################
# It seems that you are trying to install Perl::Magick on a MS Windows box with
# perl + gcc compiler (e.g. strawberry perl), however we cannot find ImageMagick
# binaries installed on your system.
#
# Please check the following prerequisites:
#
# 1) You need to have installed ImageMagick Windows binaries from
# http://www.imagemagick.org/script/binary-releases.php#windows
#
# 2) We only support dynamic (DLL) ImageMagick binaries
# note: it is not possible to mix 32/64-bit binaries of perl and ImageMagick
#
# 3) During installation select that you want to install ImageMagick's
# development files (libraries+headers)
#
# 4) You also need to have ImageMagick's directory in your PATH
# note: we are checking the presence of convert.exe and/or identify.exe tools
#
# 5) You might need Visual C++ Redistributable Package installed on your system
# see instructions on ImageMagick's Binary Release webpage
#
# We are gonna continue, but chances for successful build are very low!
################################################################################
Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -lMagickCore-6.Q16
Writing Makefile for Image::Magick
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.62)
Building and testing Image-Magick-6.86
cp Magick.pm blib\lib\Image\Magick.pm
AutoSplitting blib\lib\Image\Magick.pm (blib\lib\auto\Image\Magick)
C:\Dwimperl\perl\bin\perl.exe C:\Dwimperl\perl\lib\ExtUtils\xsubpp -typemap C:\Dwimperl\perl\lib\ExtUtils\typemap -typemap typemap Magick.xs > Magick.xsc && C:\Dwimperl\perl\bin\perl.exe -MExtUtils::Command -e mv -- Magick.xsc Magick.c
gcc -c -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"6.86\" -DXS_VERSION=\"6.86\" "-IC:\Dwimperl\perl\lib\CORE" -D_LARGE_FILES=1 -DHAVE_CONFIG_H Magick.c
Magick.xs:60:31: error: magick/MagickCore.h: No such file or directory
Magick.xs:167: error: expected specifier-qualifier-list before 'MagickRealType'
Magick.xs:188: error: expected specifier-qualifier-list before 'ImageInfo'
Magick.xs:210: error: 'MagickNoiseOptions' undeclared here (not in a function)
however we cannot find ImageMagick binaries installed on your system.
Is ImageMagick is in your path, as recommanded in the 4) point? Open cmd.exe and type convert -v or convert.exe -v. If you don't see informations about Image Magick (Windows have a built-in convert command), it is very likely you have to add it to your path.
You also have to check points 1), 3), and 5). After that try again to run installation process through cpanm.
Trying to install for Citrus Perl, I discovered on debugging through the Perl part of the install that the mingw64 install had not included 'pexports.exe'. Downloading that from https://sourceforge.net/projects/mingw/files/MinGW/Extension/pexports/
and placing it in the mingw64 directory was necessary to solve the problem of a long list of library export symbols not found.
Prior to that I had also set the environment variables CPATH, C_INCLUDE_PATH, and CPLUS_INCLUDE_PATH to point to the "include" directory of the ImageMagick install include directory in C:\Program Files (x86). (When you install ImageMagick you should check the box to install also for Strawberry Perl.)

Resources