Compiling Ceph on CentOS 5: `doc_DATA' is used but `docdir' is undefined? - centos5

Has anyone sucessfully compiled Ceph on the CentOS 5?
[user#host ceph-0.56.4]# make
...
checking boost/spirit.hpp usability...
src/Makefile.am:1115: `doc_DATA' is used but `docdir' is undefined
make: *** [Makefile.in] Error 1
make: *** Waiting for unfinished jobs....
yes
Line 1115 in the src/Makefile.am:
# work around old versions of automake that don't define $docdir
# NOTE: this won't work on suse, where docdir is /usr/share/doc/packages/$package.
docdir ?= ${datadir}/doc/ceph
doc_DATA = $(srcdir)/sample.ceph.conf sample.fetch_config
I have tried to change the docdir to the absolute path:
docdir = /usr/share/doc/ceph
but it doesn't help.
# rpm -qa | grep automake
automake16-1.6.3-8.el5.1
automake15-1.5-16.el5.2
automake-1.9.6-2.3.el5
automake17-1.7.9-7.el5.2
automake14-1.4p6-13.el5.1
What surprised me is in the ceph.spec, I see:
%{configure} CPPFLAGS="$java_inc" \
--prefix=/usr \
--sbindir=/sbin \
--localstatedir=/var \
--sysconfdir=/etc \
--docdir=%{_docdir}/ceph \
--without-hadoop \
--with-nss \
--without-cryptopp \
--with-rest-bench \
--with-debug \
--enable-cephfs-java \
$MY_CONF_OPT \
%{?_with_ocf} \
%{?with_tcmalloc:--with-tcmalloc} %{!?with_tcmalloc:--without-tcmalloc} \
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
but there is no --docdir configure option when searching through the ./configure --help.
I know CentOS 5 is quite old but is there any workaround in this situation?
UPDATE Thu Apr 4 23:05:53 ICT 2013
Ceph 0.46 was compiled successfully, but now I get:
# ceph-fuse --no-fuse-big-writes -m 192.168.2.15:6789 /mnt/ceph/
ceph-fuse[7528]: starting ceph client
ceph-fuse[7528]: starting fuse
fuse: unknown option `atomic_o_trunc'
2013-04-04 13:51:21.128506 2b82d6e9e8f0 -1 fuse_lowlevel_new failed
ceph-fuse[7528]: fuse finished with error 33
ceph-fuse[7526]: mount failed: (33) Numerical argument out of domain
http://tracker.ceph.com/issues/4286

While none of the kernel clients will work, ceph used to run on CentOS 5. There is, of course, a chance that some nasty build issues have been introduced though. I know we test packages for RHEL/CentOS 6 ( http://ceph.com/rpm/el6/ ), but I don't think anyone has looked at 5 in a while.
When it was being built on 5 I know there were a bunch of dependencies if you get that far:
autotools-dev
autoconf
automake
cdbs
g++
gcc
git
libatomic-ops-dev
libboost-dev
libcrypto++-dev
libcrypto++
libedit-dev
libexpat1-dev
libfcgi-dev
libfuse-dev
libgoogle-perftools-dev
libgtkmm-2.4-dev
libtool
pkg-config
Sorry I can't answer your question specifically, but it has been quite a while since anyone around here looked at Ceph on Cent5. If you stop by irc://irc.oftc.net/ceph someone might be able to give you a better historical perspective than I can.
Good luck.
[EDIT]: Just talked to someone who went through and made it work. He had this to say: "It took compiling GCC, all of the GNU libs, autoconf, automake, probably about 10-20 other libraries and of course ceph itself." So, it's possible...just not recommended. Hope that helps.

Related

mod_ssl.so failing to load after upgrade to Apache 2.4.27 - undefined symbol: SSL_get_srp_userinfo

I'm trying to upgrade to Apache 2.4.27, from 2.4.26. The configure, make & make install all complete, but when I try to bounce Apache, I get the following:
httpd: Syntax error on line 145 of /usr/local/apache2/conf/httpd.conf: Cannot load modules/mod_ssl.so into server: /usr/local/apache2/modules/mod_ssl.so: undefined symbol: SSL_get_srp_userinfo
OpenSSL version is openssl-1.0.2l, installed by running:
./config --prefix=/usr/local/ --openssldir=/usr/local/openssl enable-tlsext shared
make && make install
Apache 2.4.27 was installed by running:
./configure --enable-modules=all --enable-ssl --with-included-apr --enable-mod-proxy --with-included-apr-util
make && make install
I've had the same problem several times before, and the answer was to make sure LD_LIBRARY_PATH was set to /usr/local/lib64:/usr/local/lib however that isn't helping this time. I've tried configuring & compiling with this set, and with no LD_LIBRARY_PATH, neither helped.
mod_ssl.so looks like it's getting compiled against the yum installed version of OpenSSL:
[root#localhost httpd-2.4.27]# yum list installed |grep -i ssl
openssl.i686 1.0.1e-57.el6 #ol6_latest
openssl.x86_64 1.0.1e-57.el6 #ol6_latest
openssl-devel.x86_64 1.0.1e-57.el6 #ol6_latest
pyOpenSSL.x86_64 0.13.1-2.el6 #ol6_latest
ldd /usr/local/apache2/modules/mod_ssl.so
linux-vdso.so.1 => (0x00007ffd012ba000)
libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f3258fb7000)
libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f3258bd1000)
I've tried plenty of different options (way too many to list here), such as --with-ssl=/usr/local/openssl, --enable-ssl=shared as well as setting LDFLAGS="-L/usr/local/lib64" in config.nice but still no joy.
Any ideas?
Finally managed to solve this from a comment at https://serverfault.com/questions/587267/upgrade-to-apache-2-4-9-opensssl-error-ssl-get-srp-userinfo. Turns out setting LDFLAGS was the answer:
LDFLAGS="-L/usr/local/lib64"; export LDFLAGS
"./configure" \
"--enable-so" \
"--with-included-apr" \
"--enable-ssl" \
"--with-ssl=/usr/local/openssl" \
"LDFLAGS=-L/usr/local/lib64" \
"$#"

Apache 2.4.12 & CentOS 7 (x86_64): DSO shared modules not being built during compile

I have a general question. I am attempting to compile Apache 2.4.12 on CentOS 7 (x86_64) from source. I have read the 2.4 documentation, poured over configure -h, and searched the web, but no one seems to be having the same issue as me. Trust me, I've tried many --enable-XXX=shared and other ./configure peculiarities and they all result in no DSOs being created! I am getting no configure or make errors at all. Any ideas?
(From my install script)
General answer: Either The order of the configure options matters, or Apache does not like getting its --options on separate lines. Lead with enable-mods-shared like so (although, you may wany "few" or "reallyall", etc..)
cd httpd-2.4.12/
mkdir -v srclib/apr/ srclib/apr-util/
mv -v ../apr-1.5.2/* srclib/apr/
mv -v ../apr-util-1.5.4/* srclib/apr-util/
./configure --enable-mods-shared=all \ <---Perhaps the most important position of all.
--prefix=/usr/local/apache2 \
--with-mpm=prefork \
--with-pcre=/usr/local/bin/pcre-config \
--with-included-apr \
--with-z=/usr/local/lib \
--with-ssl=/usr/local/ssl/lib \
--with-sslport=443 \
--with-port=80 \
&& make && make install && ./httpd -l && ./httpd -M
cd ~/downloads/
sleep 5
This fails when done as one option per line, but works like this.
./configure --enable-mods-shared=all --prefix=/usr/local/apache2 --with-mpm=prefork --with-pcre=/usr/local/bin/pcre-config --with-included-apr --with-z=/usr/local/lib --with-ssl=/usr/local/ssl/lib --with-sslport=443 --with-port=80 && make && make install && ./httpd -l && ./httpd -M

string.h:29:8: error: expected identifier

I'm trying to compile nginx with custom openssl »libressl« using this script: https://gist.github.com/Belphemur/3c022598919e6a1788fc
Everything works fine using libressl 2.1.1.
Problem is that libressl 2.1.1 has some security issues, which have been resolved by newer releases.
However I can't get the build to work with libressl 2.1.2 or libressl 2.1.3 (latest version).
The issue I get:
..
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I /tmp/build/pcre-8.36 -I /tmp/build/libressl-2.1.2/.openssl/include -I objs \
-o objs/src/core/nginx.o \
src/core/nginx.c
In file included from /usr/include/string.h:635:0,
from /tmp/build/libressl-2.1.2/.openssl/include/string.h:6,
from src/os/unix/ngx_linux_config.h:27,
from src/core/ngx_config.h:26,
from src/core/nginx.c:8:
/tmp/build/libressl-2.1.2/.openssl/include/string.h:29:8: error: expected identifier or ‘(’ before ‘__extension__’
char * strndup(const char *str, size_t maxlen);
^
make[1]: *** [objs/src/core/nginx.o] Error 1
make[1]: Leaving directory `/tmp/build/nginx-1.7.9'
make: *** [build] Error 2
All done.
..
What's the problem & how to resolve it?
Thanks for helping.
I'm the creator of the script you use to build Nginx with LibreSSL.
It is now corrected, the previous way to build and use libressl doesn't work with previous version of the script. (Simply copying all the include and stripping the lib)
The script now install libressl in a set directory and give it to nginx, this way, all the include not needed to use the library (like this string.h) is not part of the building process of nginx.
strndup is provided in string.h. You don't need to provide it here:
/tmp/build/libressl-2.1.2/.openssl/include/string.h:29:8: error: expected identifier or ‘(’ before ‘__extension__’
char * strndup(const char *str, size_t maxlen);
I would delete the copy of string.h from the sources, and use the platform's supplied string.h for strndup.
As a matter of fact, I don't know where that string.h is coming from because its not present on my system (and I regularly build and use the latest OpenSSL):
$ find /usr/local/ssl/ -name string.h
$ find /usr/local/ssl/ -name *.h
/usr/local/ssl/include/openssl/rc4.h
/usr/local/ssl/include/openssl/crypto.h
/usr/local/ssl/include/openssl/ts.h
/usr/local/ssl/include/openssl/ecdsa.h
/usr/local/ssl/include/openssl/opensslconf.h
...
I'm trying to compile nginx with custom openssl »libressl« using this script: https://gist.github.com/Belphemur/3c022598919e6a1788fc
OK, this can be a pain as I've had to do similar with nginx (FIPS validated OpenSSL).
The easiest way to handle it is build OpenSSL from sources and install it into /usr/local/ssl. Then, grep nginx's files for -lcrypto and -lssl. When you find them, replace them with the static archive of OpenSSL:
change -lcrypto to /usr/local/ssl/lib/libcrypto.a
change -lssl to /usr/local/ssl/lib/libssl.a
And drop the -L related to OpenSSL.
This will ensure you use your version of OpenSSL at compile time and run time without the need for LD_PRELOAD and DYLD_LIBRARY_PATH tricks. It will just always work.

jscv : Cannot locate JVM library file

When I try to start a demo jsvc implementation I get the following error output of jsvc:
jsvc -cp ApacheDeamonDemo.jar -pidfile /mypath/pid.txt -outfile /mypath/log.txt -errfile /mypath/err.log net.example.deamon.DemoDeamon
I get the following error ouput:
Cannot find any VM in Java Home /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home
Cannot locate JVM library file
Service exit with a return value of 1
Actually the path is correct. Therefore I do not understand why jsvc is telling me this. I'm using a mac.
Almost five years later, so probably too late to help the original asker, but I had the same problem today trying to run jsvc with open-jdk-11 for AMD64, so this might help someone later.
To diagnose the problem, I ran jsvc with the --debug flag, and that told me that it was choking on trying to find libjvm.so. I ran find /usr/lib/jvm/java-11-openjdk-amd64 -name libjvm.so and found it at /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so, but jsvc was looking for it at /usr/lib/jvm/java-11-openjdk-amd64//lib/amd64/server/libjvm.so. So, I did this, and then jscv worked:
sudo mkdir /usr/lib/jvm/java-11-openjdk-amd64/lib/amd64
sudo ln -s /usr/lib/jvm/java-11-openjdk-amd64/lib/server /usr/lib/jvm/java-11-openjdk-amd64/lib/amd64/
It turns out the problem is fixed in later versions of jsvc. I experienced the issue with jsvc version 1.0.6, which is the one you get if you run apt install jsvc on Ubuntu 18.04. After I downloaded the 1.2.0 version commons-daemon src from Apache and compiled jsvc myself, the issue is fixed and I didn't need the symlink anymore.
Don't know why jsvc would try to locate all the dylib files and load them with dlopen, but apparently, this doesn't work well with Apple's Java release. While fixing jsvc might not be too hard, I just went firing up the JVM myself like so,
export JAVA_HOME=$(/usr/libexec/java_home)
export CATALINA_HOME=/Users/rong/Projects/apache-tomcat-8.0.12
export CATALINA_BASE=$CATALINA_HOME
java \
-server \
-classpath $CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/tomcat-juli.jar \
-Dcatalina.home=$CATALINA_HOME \
-Dcatalina.base=$CATALINA_BASE \
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties \
org.apache.catalina.startup.Bootstrap \
> $CATALINA_BASE/logs/catalina.out \
2> $CATALINA_BASE/logs/catalina.err
By wrapping this in a bash script and adding a bit of forking, changing UID stuff, you can forget about jsvc completely.

Big problems while compiling FFMPEG for iOS5

I'm trying to compile the ffmpeg library for iOS5. I tried different options but none works.
I downloaded this: https://github.com/ciphor/ffmpeg4ios .
I tried the original build_armv7 but it didn't work. I edited the build_arm7 file and now it looks like this:
#!/bin/tcsh -f
if (! -d armv7) mkdir armv7
if (! -d lib) mkdir lib
rm armv7/*.a
make clean
./configure --disable-network --disable-mpegaudio-hp --disable-lpc --disable-vaapi
--disable-vdpau --disable-hwaccels --disable-mmx --disable-mmx2 --disable-sse
--disable-ssse3 --disable-avx --disable-amd3dnow --disable-amd3dnowext --disable-vis
--disable-mmi --disable-doc --disable-yasm --disable-ffmpeg --disable-ffplay
--disable-ffprobe --disable-ffserver --disable-rdft --disable-dxva2 --disable-encoders
--disable-decoders --enable-decoder=h264 --disable-bsfs --disable-protocols
--disable-indevs --disable-outdevs --disable-devices --disable-filters --disable-demuxers --enable-demuxer=h264
--disable-muxers --disable-parsers --enable-parser=h264 --enable-cross-compile --arch=arm
--target-os=darwin
--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 --as='gas-preprocessor/gas-preprocessor.pl /Aplications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2'
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk --cpu=cortex-a8
--extra-cflags='-pipe -Os -gdwarf-2 -issysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -m${thumb_opt:-no-thumb}
-mthumb-interwork' --extra-ldflags='-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk' --enable-pic
make
mv libavcodec/libavcodec.a armv7/
mv libavdevice/libavdevice.a armv7/
mv libavformat/libavformat.a armv7/
mv libavutil/libavutil.a armv7/
mv libswscale/libswscale.a armv7/
rm lib/*.a
cp armv7/*.a lib/
But i get this error:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 is unable to create an executable file.
C compiler test failed.
I looked all over the Internet. I have read all the posts on stackoverflow about this but none helped me. Please tell me what i'm doing wrong and please don't post me links: trust me, i saw them all!
That worked for me with iOS 5.0 and Snow Leopard.
You have to change ldflags, sysroot and cc to provide valid paths to files in Mountain Lion
for Xcode was moved to antoher folder.
./configure \
--extra-ldflags=-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/system \
--disable-muxers \
--disable-demuxers \
--disable-devices \
--disable-parsers \
--disable-protocols \
--disable-filters \
--disable-bsfs \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-avfilter \
--disable-avformat \
--disable-ffserver \
--disable-decoders \
--disable-encoders \
--disable-network \
--enable-decoder=h261 \
--enable-decoder=h263 \
--enable-decoder=h263p \
--enable-encoder=h261 \
--enable-encoder=h263 \
--enable-encoder=h263p \
--enable-cross-compile \
--enable-hardcoded-tables \
--enable-memalign-hack \
--enable-neon \
--arch=arm \
--target-os=darwin \
--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk \
--cpu=cortex-a8 \
--extra-cflags='-arch armv7 -mno-thumb -mfpu=neon -mfloat-abi=softfp' \
--extra-ldflags='-arch armv7 -mno-thumb -mfpu=neon -mfloat-abi=softfp' 2>&1 | tee configure.log
make clean
make
Inspect config.log file in your root compilation directory and search for "C compiler test failed.`' You will find right there the command that was tried and the exact reason why it failed (i.e., the compiler output).
It could be that the compiler installation directory is not /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/, or that some library cannot be found, etc...
Actually, what I see is that you are specifying on the configure command line a few paths. Have you checked that they are correct for your Xcode version?
If you require ffmpeg 11
You may need to use snow leopard or lion, Mountain lion seems to be missing critical gcc compiler components. We are looking into fixing our build scripts for this
If version isn't all that important to you, we have a pre-built framework for ffmpeg 8, really
we don't find any great difference between using the two and find that ffmpeg 8 has less performance issues.
https://github.com/mooncatventures-group/ffmpegDecoder
If you have a build box with lion or snow leopard you can probably modify our build script and build ffmpeg 11 , others have done this.