Apache httpd compile (make) error. How to fix it? - apache

I get an error when compiling (configure) Apache httpd. Please tell me how to solve it.
Error message
$ git clone -b 2.2.3 --single-branch https://github.com/apache/httpd.git
$ cd httpd
$ autoconf
$ ./configure
configure: error: cannot find required auxiliary files: config.guess config.sub
My environment
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
$ autoconf -V
autoconf (GNU Autoconf) 2.71
Update 1
The "configure" problem has probably been solved. (I stopped using github). However, an error occurs during make.
"make" error message
$ wget https://archive.apache.org/dist/httpd/httpd-2.2.3.tar.gz
$ gzip -d httpd-2.2.3.tar.gz
$ tar xvf httpd-2.2.3.tar
$ cd httpd-2.2.3
$ ./configure --prefix /home/ubuntu/local
$ make
/usr/bin/ld: .libs/htpasswd.o: undefined reference to symbol 'crypt##XCRYPT_2.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libcrypt.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:39: htpasswd] Error 1
make[2]: Leaving directory '/home/ubuntu/httpd-2.2.3/support'
make[1]: *** [/home/ubuntu/httpd-2.2.3/build/rules.mk:72: all-recursive] Error 1
make[1]: Leaving directory '/home/ubuntu/httpd-2.2.3/support'
make: *** [/home/ubuntu/httpd-2.2.3/build/rules.mk:72: all-recursive] Error 1
Installed modules
sudo apt-get install libapr1-dev libaprutil1-dev
sudo apt-get install build-essential
sudo apt-get install libpcre3-dev

Try this:
wget http://archive.apache.org/dist/httpd/httpd-2.2.3.tar.gz
tar -xf httpd-2.2.3.tar.gz
sudo ./configure --prefix=/opt/httpd --with-included-apr --with-ssl=/opt/openssl-1.0.1i --enable-ssl-staticlib-deps --enable-mods-static=ssl
sudo make
sudo make install

Related

Issue while installing Redis on a Pi

I'm trying to install Redis on my Pi. Sames steps as explained in next link: https://redis.io/download
$ wget http://download.redis.io/releases/redis-5.0.5.tar.gz
$ tar xzf redis-5.0.5.tar.gz
$ cd redis-5.0.5
$ make
After a while next messages gets returned-->
/usr/bin/ld: networking.o: in function `createClient':
/home/pi/redis-stable/src/networking.c:109: undefined reference to `__atomic_fetch_add_8'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:219: redis-server] Error 1
make[1]: Leaving directory '/home/pi/redis-stable/src'
make: *** [Makefile:6: all] Error 2
Other approaches:
#!/bin/bash
# Installing redis from tar, we need the newest for Redis Stream
rm -rf /etc/redis
mkdir -p /etc/redis
cd /etc/redis
wget http://download.redis.io/releases/redis-5.0.3.tar.gz
tar xzf redis-5.0.3.tar.gz
cd redis-5.0.3
make cleandist
make
make install
I haven't run into this issue myself, but it seems that libatomic.so provides the symbol on my Raspberry Pi. So try adding -latomic to the linker flags (LDFLAGS='-latomic' to configure if the project uses GNU Autoconf, -DCMAKE_SHARED_LINKER_FLAGS='-latomic' if it uses cmake, etc).
You may also have to install the package libatomic-ops-dev as well (if not already installed)
EDIT: Seems other people have run into this. See for example this redis bug: https://github.com/antirez/redis/issues/6275
Also redis seems to have it's own obscure build system. It may work to do: make FINAL_LIBS=-latomic or you may have to patch src/Makefile to add -latomic to the FINAL_LIBS variable

configure: error: libopenvswitch.a was not found. Try --with-ovs-libpath

When i use this command:
./configure --with-ovs-srcdir=/home/mx/SDN/openvswitch-2.10.1 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
I had got the error result:
configure: error: libopenvswitch.a was not found. Try --with-ovs-libpath
But in my computer, i can find libopenvswitch.a file:
/lib/libopenvswitch.a
/usr/local/lib/libopenvswitch.a
/home/mx/SDN/openvswitch-2.10.1/lib/.libs/libopenvswitch.a
But i use the command:
./configure --with-ovs-srcdir=/home/mx/SDN/openvswitch-2.10.1 --with-ovs-libpath=/lib/ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
or command:
./configure --with-ovs-srcdir=/home/mx/SDN/openvswitch-2.10.1 --with-ovs-libpath=/usr/local/lib/ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
or command:
./configure --with-ovs-srcdir=/home/mx/SDN/openvswitch-2.10.1 --with-ovs-libpath=/home/mx/SDN/openvswitch-2.10.1/lib/.libs/ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
all get same error result:
configure: error: libopenvswitch.a was not found. Try --with-ovs-libpath
Please help me, thanks!
You need version 2.3.1 of Open vSwitch to build OF-CONFIG.
I can reproduce your issue if I try to install OF-CONFIG with the last version of Open vSwitch:
$ ./configure --with-ovs-srcdir=/ovs PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
...
configure: error: libopenvswitch.a was not found. Try --with-ovs-libpath
If I install Open vSwitch 2.3.1, however, everything works as expected:
$ wget http://openvswitch.org/releases/openvswitch-2.3.1.tar.gz
$ tar -xf openvswitch-2.3.1.tar.gz
$ cd openvswitch-2.3.1/
$ ./configure --prefix=/ --datarootdir=/usr/share
...
$ make -j && sudo make install -j
...
$ cd /of-config
$ ./configure --with-ovs-srcdir=/openvswitch-2.3.1 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
...
$ echo $?
0

How to setup crosstool-ng with wxwidgets

I want to setup the ct-ng for my gui application and now I want to use wxwidgets.
For setting up the crosstool, I have used:
# Install prerequisites:
apt-get -y install gcc gperf bison flex gawk libtool automake libncurses5-dev texinfo
# Setup toolchain
# instructions from https://github.com/crosstool-ng/crosstool-ng
cd toolchain/crosstool-ng
./bootstrap
./configure --prefix=$HOME/.local
make && make install
echo -ne "\n\nif [ -d \"$HOME/.local/bin\" ]; then\n PATH=\"$HOME/.local/bin:$PATH\"\nfi" >> ~/.profile
source ~/.profile
mkdir ../tc/
cd ../tc/
ct-ng list-samples
ct-ng x86_64-w64-mingw32
ct-ng build # lasts 30 minutes...
##################### WxWidgets ######################
cd ../wxWidgets/
sh autogen.sh
./configure --prefix="$HOME/prefix" --enable-static --disable-shared --build=x86_64-w64-mingw32 --enable-unicode --without-libtiff --without-libjpeg --with-expat=builtin --with-libpng=builtin
make
The only way I have found is to clone wxwidgets from github and compile it as above in the script. Then, I included as path -I
WXWIDGET=../toolchain/wxWidgets/include/
$(CXX) -I$(FLEX) -I$(WXWIDGET) $(WXWIDGETSFLAGS) $(CPPFLAGS) $(header) $(src) $(obj3) -o $(OUTPUT)/$(bin)
Hundreds of errors appearing while compiling:
In file included from ../toolchain/wxWidgets/include/wx/platform.h:485:0,
from ../toolchain/wxWidgets/include/wx/defs.h:20,
from ../toolchain/wxWidgets/include/wx/string.h:24,
from ../toolchain/wxWidgets/include/wx/artprov.h:14,
from parser/include/gui.h:17,
from parser/include/customdialogs.h:17:
../toolchain/wxWidgets/include/wx/chkconf.h:282:9: error: #error "wxUSE_SECRETSTORE must be defined, please read comment near the top of this file."
# error "wxUSE_SECRETSTORE must be defined, please read comment near the top of this file."
What should I do?
You need to try "--host" and "--target" configure options.
Just try "../configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --disable-shared --enable-unicode".
BTW, "--enable-unicode" should be turned on by default. So you can drop it.
Also, if you software required C++11, you should compile the library as:
CXXFLAGS="-std=c++11" ../configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --disable-shared --enable-unicode

Error when compiling mono on windows: i686-pc-mingw32/bin/ld: cannot find -ldl

I am trying to compile mono on windows using cygwin, however when I run make it eventually stops with the following error
make[3]: Entering directory '/cygdrive/c/Projects/mono/mono/metadata'
CCLD pedump.exe
/usr/lib/gcc/i686-pc-mingw32/4.7.3/../../../../i686-pc-mingw32/bin/ld: cannot find -ldl
collect2: error: ld returned 1 exit status
Makefile:1303: recipe for target 'pedump.exe' failed
make[3]: *** [pedump.exe] Error 1
make[3]: Leaving directory '/cygdrive/c/Projects/mono/mono/metadata'
Makefile:434: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/cygdrive/c/Projects/mono/mono'
Makefile:518: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/cygdrive/c/Projects/mono'
Makefile:445: recipe for target 'all' failed
make: *** [all] Error 2
I can only assume I am missing something from my cygwin install but I can't determine what that could be other than it is probably a library called libdl.
I have been following this guide on codeproject and also using this yaml file as reference.
The code project article may not be complete, in the end I got the following to work
First I used (interpreted from mono/Appveyor.yml)
setup-x86.exe -qnNdO -R "C:\cygwin" -s "http://cygwin.mirror.constant.com"
-l "C:\cygwin\var\cache\setup" -P autoconf -P automake -P bison -P gcc-core
-P gcc-g++ -P mingw-runtime -P mingw-binutils -P mingw-gcc-core -P mingw-gcc-g++
-P mingw-pthreads -P mingw-w32api -P libtool -P make -P python -P gettext-devel
-P gettext -P intltool -P libiconv -P pkg-config -P git -P wget -P curl
Then from a cygwin prompt (combination of above and code project article "How-to-build-Mono-on-Windows")
NOCONFIGURE=1 ./autogen.sh --prefix="C:\monoinstall" --with-preview=yes
./configure --host=i686-pc-mingw32
make get-monolite-latest
make
mount "C:\monoinstall" /usr/local
make install
cd /cygdrive/c/monoinstall/bin
rm mono
cp /cygdrive/c/Program Files (x86)/Mono-3.2.3/bin/mono.exe /cygdrive/c/monoinstall/bin
rm mcs
cp /cygdrive/c/Program Files (x86)/Mono-3.2.3/bin/mcs.bat /cygdrive/c/monoinstall/bin

using homebrew apxs from homebrew apache httpd24 fails with libtool: compile: unable to infer tagged configuration

using homebrew apxs from homebrew apache httpd24 fails with libtool: compile: unable to infer tagged configuration
$ apxs -i -c -Wc,"-arch x86_64" -Wl,"-arch x86_64 " mod_uwsgi.c
/usr/share/apr-1/build-1/libtool --silent --mode=compile cc -prefer-pic -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/local/Cellar/httpd24/2.4.3/include/apache2 -I/usr/include/apr-1 -I/usr/include/apr-1 -arch x86_64 -c -o mod_uwsgi.lo mod_uwsgi.c && touch mod_uwsgi.slo
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
apxs:Error: Command failed with rc=65536
.
What environment must I export to have libtool not complain about tag?
after digging through the source I found that if LTFLAGS is set to --tag=cc things work.
$ LTFLAGS=--tag=cc apxs -i -c mod_uwsgi.c