compile issue with apache 2.4.33 and openssl 1.1.0h - apache

I am trying to compile Apache 2.4.33 with OpenSSL 1.1.0h. But i keep getting this error message. I have been trying to go pass this issue for last 2 weeks. Can you please advice what i should be doing here ?
`
libapr-1.la -luuid -lrt -lcrypt -lpthread -lm -lssl -lcrypto -luuid -lrt -lcrypt -lthread
ab.c: In function `ssl_print_cert_info’:
ab.c:649 undefined reference to `X509_get_version’
ab.c:651 undefined reference to `X509_getm_notBefore’
ab.c:655 undefined reference to `X509_getm_notAfter’
ab.c:571 undefined reference to `SSL_in_init’
ab.c:571 undefined reference to `SSL_is_server
x509.h:97 undefined reference to `OPENSSL_sk_num’
x509.h:97 undefined reference to `OPENSSL_sk_value’
ab.c:1941 undefined reference to `SSL_in_init`
collect2: ld returned 1 exit status
make[2] *** [ab] Error 1
make[2]: Leaving directory ‘/apps/httpdx64/http-2.4.33/support’
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory ‘/apps/httpdx64/httpd-2.4.33/support’
make: *** [install-recursive] Error 1`

Version of OpenSSL may be too new. Download the source for apr and apr-util from the official website and extract to a folder such as /usr/src. Try compiling Apache with the following to verify if your version of openssl is good or even an issue:
./configure --with-apr=/usr/src/apr-1.6.3 --with-apr-util=/usr/src/apr-util-1.6.1
make
make install

Related

Cannot compile apache with fips

I need to run apache in fips 140-2 mode and I am following the instructions given here: https://wiki.openssl.org/index.php/FIPS_Library_and_Apache
However I am using a newer version of apache, I have these packages instead of the ones listed in the wiki:
openssl-fips-2.0.16.tar.gz
openssl-1.0.2n.tar.gz
httpd-2.4.29.tar.gz
apr-util-1.6.1.tar.gz
apr-1.6.3.tar.gz
pcre-8.41.tar.gz
Everything works fine until I attempt a make on the httpd package and it then fails. If I run a make without the two exports for the fingerprints, it completes without issue:
export CC=/usr/local/ssl/fips-2.0/bin/fipsld
export FIPSLD_CC=/usr/bin/gcc
However as the wiki describes when you enable SSLFIPS in httpd.conf it will fail to start with the fingerprint issue without these variables set. But when I attempt to run a make with these exports I get the following error:
/root/httpd-2.4.29/srclib/apr/libtool --silent --mode=link /usr/local/ssl/fips-2.0/bin/fipsld -g -O2 -pthread -L/usr/local/ssl/lib -lssl -lcrypto -luuid -lrt -lcrypt -lpthread -ldl \
-o ab ab.lo /root/httpd-2.4.29/srclib/apr-util/libaprutil-1.la -lexpat /root/httpd-2.4.29/srclib/apr/libapr-1.la -luuid -lrt -lcrypt -lpthread -ldl -lm
./.libs/ab: error while loading shared libraries: libaprutil-1.so.0: cannot open shared object file: No such file or directory
Makefile:73: recipe for target 'ab' failed
make[2]: *** [ab] Error 127
make[2]: Leaving directory '/root/httpd-2.4.29/support'
/root/httpd-2.4.29/build/rules.mk:75: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/httpd-2.4.29/support'
/root/httpd-2.4.29/build/rules.mk:75: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
I'm no expert in compiling apache, so no idea why it fails when using those exported variables. Can anyone help?
After a lot of testing, the instructions seem to be working for the older versions, but for the newer version of apr and httpd the "--with-included-apr" appeared to be the problem.
Instead of using this, we built apr and apr-util first by its self, then ran the .config with "“-with-apr=/usr/local/apr/ -with-apr-util=/usr/local/apr-util/" instead. This allowed it to compile and I was able to set SSLFIPS on without issue.

Error installing global on Arch linux

I was trying to install global from source. I run
./configure --with-exuberant-ctags=/usr/bin/ctags
and it runs OK. However, when I run
make
it gives the error
/bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -o gtags-cscope gtags-cscope.o alloc.o basename.o
build.o command.o display.o edit.o exec.o find.o help.o history.o input.o logdir.o mouse.o mygetenv.o mypop
en.o ../libparser/libgloparser.a ../libutil/libgloutil.a ../libdb/libglodb.a ../libglibc/libgloglibc.a -llt
dl -lncurses
libtool: link: gcc -g -O2 -o gtags-cscope gtags-cscope.o alloc.o basename.o build.o command.o display.o edi
t.o exec.o find.o help.o history.o input.o logdir.o mouse.o mygetenv.o mypopen.o ../libparser/libgloparser
.a ../libutil/libgloutil.a ../libdb/libglodb.a ../libglibc/libgloglibc.a -lltdl -lncurses
/usr/bin/ld: input.o: undefined reference to symbol 'erasechar'
/usr/lib/libtinfo.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:461: gtags-cscope] Error 1
make[2]: Leaving directory '/home/pspencil/tmp/global-6.5.7/gtags-cscope'
make[1]: *** [Makefile:517: all-recursive] Error 1
make[1]: Leaving directory '/home/pspencil/tmp/global-6.5.7'
make: *** [Makefile:424: all] Error 2
I have installed the package ncurses which apparently should provide the erase char symbol. I cannot find anything useful on Google.
Explicitly link the tinfo library.
NCurses uses tinfo, from what I have read ncurses should include the tinfo functionality in it's own library, maybe this has changed recently.

Failed to compile Apache from source with only Mod_Proxy

I am trying to compile apache from source with only module "proxy and rewrite". Here is what I used as my configure
sudo ./configure --disable-actions --disable-asis --disable-autoindex --disable-cgi --disable-cgid --disable-charset-lite --disable-dir --disable-env --disable-imap --disable-include --disable-negotiation --disable-setenvif --disable-status --disable-userdir --enable-proxy --enable-proxy-connect --enable-proxy-ftp --enable-proxy-http --enable-rewrite
then I was able to run make
sudo make
this is where the problem is, it ends with this error:
Making all in support
make[1]: Entering directory `/home/james/apache2/httpd-2.0.65/support'
make[2]: Entering directory `/home/james/apache2/httpd-2.0.65/support'
/home/james/apache2/httpd-2.0.65/srclib/apr/libtool --silent --mode=link gcc -g -O2 -pthread -D_REENTRANT -D_GNU_SOURCE -DAP_HAVE_DESIGNATED_INITIALIZER -I/home/james/apache2/httpd-2.0.65/srclib/apr/include -I/home/james/apache2/httpd-2.0.65/srclib/apr-util/include -I/home/james/apache2/httpd-2.0.65/srclib/apr-util/xml/expat/lib -I. -I/home/james/apache2/httpd-2.0.65/os/unix -I/home/james/apache2/httpd-2.0.65/server/mpm/prefork -I/home/james/apache2/httpd-2.0.65/modules/http -I/home/james/apache2/httpd-2.0.65/modules/filters -I/home/james/apache2/httpd-2.0.65/modules/proxy -I/home/james/apache2/httpd-2.0.65/include -I/home/james/apache2/httpd-2.0.65/modules/generators -I/home/james/apache2/httpd-2.0.65/modules/dav/main -export-dynamic -L/home/james/apache2/httpd-2.0.65/srclib/apr-util/xml/expat/lib -o htdigest htdigest.lo /home/james/apache2/httpd-2.0.65/srclib/pcre/libpcre.la /home/james/apache2/httpd-2.0.65/srclib/apr-util/libaprutil-0.la /home/james/apache2/httpd-2.0.65/srclib/apr-util/xml/expat/libexpat.la /home/james/apache2/httpd-2.0.65/srclib/apr/libapr-0.la -lrt -lm -lcrypt -lnsl -lpthread -ldl
/home/james/apache2/httpd-2.0.65/srclib/apr-util/.libs/libaprutil-0.so: undefined reference to `crypt_r'
collect2: error: ld returned 1 exit status
make[2]: *** [htdigest] Error 1
make[2]: Leaving directory `/home/james/apache2/httpd-2.0.65/support'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/james/apache2/httpd-2.0.65/support'
make: *** [all-recursive] Error 1
Anybody have an idea on what I am doing wrong?
Thanks for the help!
I am not sure why it would not compile on my Laptop (Mint 16?), but I compiled it on the linux server it worked great! Its running Debian 7

FreeRDP CMAKE Error

Hello I am brand new to linux and i am trying to install FreeRDP. I keep getting this error:
/usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(hmac.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/ssl/lib/libcrypto.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [winpr/libwinpr/utils/libwinpr-utils.so.1.1.0] Error 1
make[1]: *** [winpr/libwinpr/utils/CMakeFiles/winpr-utils.dir/all] Error 2
make: *** [all] Error 2
After I type the "make" command.
Sorry if this question has already been asked but i have thorougly searched stack overflow and havent found it. Thanks in advance:)
It wants you to add a parameter to ld: -fPIC
So if there is a line beignning with ld or gcc, just add it.
Mostly it is gcc and the parameter -shared already exists, so just add -fPIC behind it.

Compile Vala project with CMake

I want to compile a Vala project that relies on libappindicator with CMake.
However, make aborts with this output:
Linking C executable calm
CMakeFiles/calm.dir/src/CalmWindow.c.o: In function `__lambda6_':
CalmWindow.c:(.text+0x5b8): undefined reference to `app_indicator_set_status'
CMakeFiles/calm.dir/src/CalmWindow.c.o: In function `calm_calm_indicator_construct':
CalmWindow.c:(.text+0x6ee): undefined reference to `app_indicator_new'
CalmWindow.c:(.text+0x746): undefined reference to `app_indicator_set_status'
CalmWindow.c:(.text+0x76c): undefined reference to `app_indicator_set_attention_icon'
CalmWindow.c:(.text+0xe87): undefined reference to `app_indicator_set_menu'
collect2: ld gab 1 als Ende-Status zurück
make[2]: *** [calm] Fehler 1
make[1]: *** [CMakeFiles/calm.dir/all] Fehler 2
make: *** [all] Fehler 2
Is something wrong with my CMakeLists.txt?
This command works:
valac -g --pkg gtk+-3.0 --pkg gstreamer-0.10 --pkg gstreamer-audio-0.10 --pkg granite --pkg appindicator3-0.1 CalmApp.vala Calm.vala CalmWindow.vala
That way it works:
[...]
###########
set(COMPILE_OPTIONS_VALA ${COMPILE_OPTIONS_VALA} -D USE_APPINDICATOR)
set(PACKAGES_VALA ${PACKAGES_VALA} "appindicator3-0.1")
###########
include(ValaPrecompile)
vala_precompile(VALA_C
src/Calm.vala
src/CalmApp.vala
src/CalmWindow.vala
PACKAGES
gtk+-3.0
gstreamer-0.10
gstreamer-audio-0.10
appindicator3-0.1
CUSTOM_VAPIS
vapi/config.vapi
OPTIONS
--thread
)
[...]