undefined reference to `crypt' : apache2 manually install error on imx8mqevk - linux

I am using an iMX8MQ EVK board with Linux. I want to install the apache2 server and MySQL database from the source. Started installing apache2 using this
Here is the Linux version:
root#imx8mqevk:~# cat /etc/os-release
ID=fsl-imx-wayland
NAME="NXP i.MX Release Distro"
VERSION="5.10-hardknott (hardknott)"
VERSION_ID=5.10-hardknott
PRETTY_NAME="NXP i.MX Release Distro 5.10-hardknott (hardknott)"
Here is the output of configure
Facing issue with make as crypto is not found. I am not able to resolve the issue.
I have tried installing glibc but the issue is not resolved.
make error
Making all in support
make[1]: Entering directory '/home/root/httpd-2.4.53/support'
make[2]: Entering directory '/home/root/httpd-2.4.53/support'
/usr/local/apr/build-1/libtool --silent --mode=link gcc -g -O2 -pthread -o htpasswd htpasswd.lo passwd_common.lo /usr/local/apr/lib/libaprutil-1.la -lexpat /usr/local/apr/lib/libapr-1.la -lrt -lpthread -ldl
/usr/lib/gcc/aarch64-poky-linux/10.2.0/../../../../aarch64-poky-linux/bin/ld: passwd_common.o: in function `mkhash':
/home/root/httpd-2.4.53/support/passwd_common.c:228: undefined reference to `crypt'
/usr/lib/gcc/aarch64-poky-linux/10.2.0/../../../../aarch64-poky-linux/bin/ld: /home/root/httpd-2.4.53/support/passwd_common.c:240: undefined reference to `crypt'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:48: htpasswd] Error 1
make[2]: Leaving directory '/home/root/httpd-2.4.53/support'
make[1]: *** [/home/root/httpd-2.4.53/build/rules.mk:75: all-recursive] Error 1
make[1]: Leaving directory '/home/root/httpd-2.4.53/support'
make: *** [/home/root/httpd-2.4.53/build/rules.mk:75: all-recursive] Error 1

Related

Building Debian with Buildroot: libDeviceIo.so: file format not recognized

Im trying to compile for a project debian for this device: https://www.engicam.com/vis-prod/PX30-Core/PX30-Core-EDIMM-SOM-based-on-RockChip--PX30 which has an aarch64 architecture. I'm using a VM provided by them which should already have all the tools and configurations ready, but I'm running into some issues. If I've understood correctly I have to build buildroot to build Debian, after adding a couple packages with make menuconfig and running make I get this error:
PATH="/home/user/px30/buildroot/output/host/bin:/home/user/px30/buildroot/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" /usr/bin/make -j9 CXXFLAGS+="-DRKDEVICEIO -I/home/user/px30/buildroot/../external/deviceio_release/DeviceIO/include" LFLAGS+=" -lDeviceIo -lasound" -C /home/user/px30/buildroot/output/build/qsetting-1.0
make[1]: Entering directory '/home/user/px30/buildroot/output/build/qsetting-1.0'
/home/user/px30/buildroot/output/host/bin/aarch64-buildroot-linux-gnu-g++ -lDeviceIo -lasound -o qsetting main.o mainwindow.o qtaudio.o qtbt.o qtfactory.o qtinputdialog.o qtkeyboard.o qtupdate.o qtwifi.o qrc_res.o moc_mainwindow.o moc_qtaudio.o moc_qtbt.o moc_qtfactory.o moc_qtinputdialog.o moc_qtkeyboard.o moc_qtupdate.o moc_qtwifi.o -lQt5Widgets -lQt5Multimedia -lQt5Gui -lQt5Network -lQt5Core -latomic -lrt -ldl /home/user/px30/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libGLESv2.so -lpthread -lrt -lpthread -ldl
/home/user/px30/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-gnu/6.5.0/../../../../aarch64-buildroot-linux-gnu/bin/ld:/home/user/px30/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/../lib64/libDeviceIo.so: file format not recognized; treating as linker script
/home/user/px30/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-gnu/6.5.0/../../../../aarch64-buildroot-linux-gnu/bin/ld:/home/user/px30/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/../lib64/libDeviceIo.so:0: syntax error
collect2: error: ld returned 1 exit status
Makefile:214: recipe for target 'qsetting' failed
make[1]: *** [qsetting] Error 1
make[1]: Leaving directory '/home/user/px30/buildroot/output/build/qsetting-1.0'
package/pkg-generic.mk:254: recipe for target '/home/user/px30/buildroot/output/build/qsetting-1.0/.stamp_built' failed
make: *** [/home/user/px30/buildroot/output/build/qsetting-1.0/.stamp_built] Error 2
I tried to open /px30/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libDeviceIo.so and it's an ASCII file
user#ubuntu:~/px30/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib$ cat libDeviceIo.so
fake
user#ubuntu:~/px30/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib$ file libDeviceIo.so
libDeviceIo.so: ASCII text
EDIT: I did not find a solution, I solved it by removing the package qsetting from the target packages

Tag command not found when running make on crosstool-ng

For some reason on my ubuntu system, running make on crosstool-ng throws this error. I tried seeing if I could find a package that has the tag command but I dont think that this exists.
/usr/bin/make all-recursive
make[1]: Entering directory '/home/rahul/crosstool-ng'
Making all in kconfig
make[2]: Entering directory '/home/rahul/crosstool-ng/kconfig'
/usr/bin/make all-am
make[3]: Entering directory '/home/rahul/crosstool-ng/kconfig'
tag CC --mode=link gcc -g -O2 -o conf conf.o zconf.o
/bin/bash: tag: command not found
Makefile:497: recipe for target 'conf' failed
make[3]: [conf] Error 127 (ignored)
tag CC --mode=link gcc -D_GNU_SOURCE -I/usr/include/ncursesw -g -O2 -o nconf nconf-nconf.o nconf-nconf.gui.o nconf-zconf.o -lmenuw -lpanelw -lncursesw -ltinfo
/bin/bash: tag: command not found
Makefile:523: recipe for target 'nconf' failed
make[3]: [nconf] Error 127 (ignored)
tag CC --mode=link gcc -g -O2 -o mconf mconf.o zconf.o lxdialog/checklist.o lxdialog/inputbox.o lxdialog/menubox.o lxdialog/textbox.o lxdialog/util.o lxdialog/yesno.o -lncursesw -ltinfo
/bin/bash: tag: command not found
Makefile:519: recipe for target 'mconf' failed
make[3]: [mconf] Error 127 (ignored)
make[3]: Leaving directory '/home/rahul/crosstool-ng/kconfig'
make[2]: Leaving directory '/home/rahul/crosstool-ng/kconfig'
make[2]: Entering directory '/home/rahul/crosstool-ng'
make[2]: Leaving directory '/home/rahul/crosstool-ng'
make[1]: Leaving directory '/home/rahul/crosstool-ng'
If you are still looking for the answer you can find it here: https://github.com/crosstool-ng/crosstool-ng/issues/944#issuecomment-381447332
You just need to run apt install libtool-bin.

How to enable apache-http/2 in centos 7?

I have followed the below link for enabling http/2 in centos-7 apache.
https://www.tunetheweb.com/performance/http2/
My openssl version :
# openssl version
OpenSSL 1.1.0f 25 May 2017
While installing latest apr-util and apache(httpd-2.4.27)
below errors occurred on make command
Inside the apr-util folder :
# make
make[1]: Entering directory `/usr/local/src/apr-util-1.6.0'
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.0/incl
ude -I/usr/local/src/apr-util-1.6.0/include/private -I/usr/local/apr/include/apr-1 -o xml/apr_xml.lo -c xml/apr_xml.c && touch xml/apr_xml.lo
xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory
#include <expat.h>
^
compilation terminated.
make[1]: *** [xml/apr_xml.lo] Error 1
make[1]: Leaving directory `/usr/local/src/apr-util-1.6.0'
make: *** [all-recursive] Error 1
Inside the httpd folder :
#make
Making all in srclib
make[1]: Entering directory `/usr/local/src/httpd-2.4.27/srclib'
Making all in apr
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/srclib/apr'
make[3]: Entering directory `/usr/local/src/httpd-2.4.27/srclib/apr'
make[3]: Nothing to be done for `local-all'.
make[3]: Leaving directory `/usr/local/src/httpd-2.4.27/srclib/apr'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/srclib/apr'
Making all in apr-util
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/srclib/apr-util'
make[3]: Entering directory `/usr/local/src/httpd-2.4.27/srclib/apr-util'
/bin/sh /usr/local/src/httpd-2.4.27/srclib/apr/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/htt
pd-2.4.27/srclib/apr-util/include -I/usr/local/src/httpd-2.4.27/srclib/apr-util/include/private -I/usr/local/src/httpd-2.4.27/srclib/apr/include -o xml/apr_xml.lo -c xml/a
pr_xml.c && touch xml/apr_xml.lo
xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory
#include <expat.h>
^
compilation terminated.
make[3]: *** [xml/apr_xml.lo] Error 1
make[3]: Leaving directory `/usr/local/src/httpd-2.4.27/srclib/apr-util'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/srclib/apr-util'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/httpd-2.4.27/srclib'
make: *** [all-recursive] Error 1
I would suggest to install ready to use package from https://codeit.guru/en_US/2017/10/apache-httpd-2-4-28-built-against-openssl-1-0-2l-with-http2-for-red-hat-enterprise-linux-and-centos/
Alternatively, you can recompile it from SRPM provided by Fedora or CodeIT (the same one with changed defaults and openssl paths):
rpmbuild -ba ~/rpmbuild/SPECS/httpd.spec
#nos was correct and this needed yum install expat-devel and a few other dependencies I already had installed.
I've updated the blog post now to reflect this. Feel free to reach out to me if you've any other issues on this.
Now is available repo from codeit.guru for CentOS 7, it can be enabled:
cd /etc/yum.repos.d && wget https://repo.codeit.guru/codeit.el`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo
If apache is already installed, yum update will update apache, it even enables mod_http2.
Otherwise, fresh installation of apache can be done.
Put Protocols h2 http/1.1 within ssl.conf as Mozilla suggests
Restart apache, http/2 is ready.

Libspotify on Raspbian - compiling the examples

I'm trying to compile the examples provided with Libspotify on my Raspberry Pi B. Had a load of errors about alsa to start with, but managed to fix them by installing libasound2-dev.
Now I'm getting the following error when I try to compile - does anyone have any suggestions, please?
The problem seems to be stemming from
/usr/bin/ld: alsa-audio.o: undefined reference to symbol
'pthread_create##GLIBC_2.4' //lib/arm-linux-gnueabihf/libpthread.so.0:
error adding symbols: DSO missing from command line
Terminal output:
for a in jukebox spshell localfiles; do make -C $a all; done
make[1]: Entering directory '/home/username/Downloads/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/share/doc/libspotify/examples/jukebox'
cc -I/usr/include/alsa -I/usr/local/include -Wall -L/usr/local/lib jukebox.o appkey.o alsa-audio.o audio.o -o jukebox -lasound -lspotify
/usr/bin/ld: alsa-audio.o: undefined reference to symbol 'pthread_create##GLIBC_2.4'
//lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:21: recipe for target 'jukebox' failed
make[1]: *** [jukebox] Error 1
make[1]: Leaving directory '/home/username/Downloads/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/share/doc/libspotify/examples/jukebox'
make[1]: Entering directory '/home/username/Downloads/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/share/doc/libspotify/examples/spshell'
cc -I/usr/local/include -Wall -L/usr/local/lib spshell.o spshell_posix.o appkey.o cmd.o browse.o search.o toplist.o inbox.o star.o playlist.o test.o -lreadline -lspotify -o spshell
/usr/bin/ld: spshell_posix.o: undefined reference to symbol 'pthread_create##GLIBC_2.4'
//lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:18: recipe for target 'spshell' failed
make[1]: *** [spshell] Error 1
make[1]: Leaving directory '/home/username/Downloads/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/share/doc/libspotify/examples/spshell'
make[1]: Entering directory '/home/username/Downloads/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/share/doc/libspotify/examples/localfiles'
make[1]: Leaving directory '/home/username/Downloads/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/share/doc/libspotify/examples/localfiles'

Error when compiling sphinxbase in cygwin

I tried to install sphinxbase on my Windows 7 using Cygwin for running pocketsphinx android demo.
But I got the following error after executing make:
gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin-1.7.11-i686-2.6/sphinxbase.o -L../src/libsphinxbase/.libs -L/usr/lib/python2.6/config -lsphinxbase -liconv -lpython2.6 -o build/lib.cygwin-1.7.11-i686-2.6/sphinxbase.dll
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -liconv
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
Makefile:471: recipe for target `pymod-build-stamp' failed
make[1]: *** [pymod-build-stamp] Error 1
make[1]: Leaving directory `/cygdrive/c/psph/sphinxbase/python'
Makefile:330: recipe for target `all-recursive' failed
make: *** [all-recursive] Error 1.
I visited the link http://www.cs.columbia.edu/~ecooper/CS4706/ps-cygwin.html and followed the steps, but to the same result.
I have used pocketsphinx-0.7 and sphinxbase-0.7 in above situation.
The error:
ld: cannot find -liconv
means, that you don't have iconv installed. Look for the package with the name libiconv-dev or similar in your package manager.

Resources