Compiling on SuSE 9.2
This topic is a bit our of date. It covers Motion 3.1.X. From Motion 3.2.1 you can ignore the libwww and xmlrpc part since these are no longer used
I've just finished compiling motion on SuSE Linux 9.2 and kept track of the procedure in order to write this guide. Here's how it goes:
You must install all relative RPM packages mentioned in
PrepareInstall, with the following exceptions:
- ffmpeg and libwww do not exist at all on the CDs
- the xmlrpc-c and xmlrpc-c-devel on the CDs are not sufficient
Therefore, one must compile these three on his own. So, in short, here's how I (in the order mentioned):
- Compiled ffmpeg
- Compiled libwww
- Compiled xmlrpc The official packages on the CD did not work for me!
and finally
Compiling ffmpeg
It's best to use ffmpeg 0.4.8 for now. Make sure you use the tar file with the packaged sources as found on the sourceforge site. Don't try to use CVS and the "release_0_4_8" tag. It failed miserably. Configure with:
./configure --enable-shared --prefix=/usr/local \
--extra-cflags=-fno-unit-at-a-time=
make
make install
Make sure you add the -fno-unit-at-a-time otherwise linking will fail dubiously with unresolved symbol errors. (In case you're wondering, it's probably stuff removed due to over-optimization).
Compiling libwww
I used version 5.4.0 which I obtained from
W3C. Configure with:
./configure --prefix=/usr/local --without-expat \
--with-ssl --with-zlib
make
make install
Make sure you have the zlib(-devel) and openssl(-devel) RPMs installed.
Compiling xmlrpc
Though there are xmlrpc-c and xmlrpc-c-devel packages on the SuSE CDs, they are not sufficient. If you use those, compilation of motion will fail because "xmlrpc_client.h" is missing, even though the configure script won't complain about missing XMLRPC. I checked at the official XMLRPC site and they seem to have split the functionality into 3 packages: common, server and client stuff. I am assuming that SuSE only distributes the "common" package for some reason (a bug maybe?). In any case, I grabbed version 1.0 sources from the sourceforge site and used:
./configure --prefix=/usr/local \
--disable-cplusplus --enable-libwww-client \
--with-libwww-ssl --disable-expat
make
make install
Compiling motion
I used the 3.1.17 sources and configured with:
./configure --prefix=/usr/local
Because I had both postgres and mysql packages installed (along with the development versions) I ended up with a report reading:
pthread Support: Yes
jpeg Support: Yes
Curl Support: Yes
V4L included: Yes
FFmpeg Support: Yes
xmlrpc-c Support: Yes
MYSQL Support: Yes
PostgreSQL Support: Yes
The build was smooth except for one last caveat: the final linking of the motion-control binary failed because xmlrpc_libwww could not be located.
This is important and can be easily overcome: _simply run the last command manually without the "-lxmlrpc_libwww" switch.
On my system I used:
gcc -Wl,-rpath,/usr/local/lib -o motion-control motion-control.o -L/usr/local/lib -L/usr/local/lib -lxmlrpc_client -L/usr/local/lib -lwwwzip -lwwwinit -lwwwapp -lwwwhtml-lwwwtelnet -lwwwnews -lwwwhttp -lwwwmime -lwwwgopher -lwwwftp -lwwwfile -lwwwdir -lwwwcache -lwwwstream -lwwwmux -lwwwtrans -lwwwcore -lwwwutils -lmd5 -ldl -lz -L/usr/lib -lssl -lcrypto -lxmlrpc -lxmlrpc_xmlparse -lxmlrpc_xmltok
I am assuming that something has changed in the way XMLRPC 1.0 libraries are packaged which makes this library redundant. Type make again and you'll see that there's nothing left to do.
Now, enjoy!
--
AlexandrosKarypidis - 25 Nov 2004