[osiris] Re: static compile of osirisd
John
bubb0214 at yahoo.com
Thu Apr 5 02:37:29 EDT 2007
Through much trial and error I have figured out how to
compile static binaries. I post the procedure here to
form a permanent record.
Distribution: Debian 4.0 Etch(almost released as
stable)
My Debian installation was minimal so I also needed to
download the SSL headers:
aptitude install libssl-dev
After untarring osiris-4.2.3.tar.gz, I went into the
directory and opened the configure file in an editor.
1. In the configure file find the following line in
two different places:
LIBS="$saved_LIBS -lssl -lcrypto"
2. Replace the line in both places with:
LIBS="$saved_LIBS -lssl -lcrypto -ldl -lz"
In other words, replace -lcrypto with -lcrypto -ldl
-lz. Order is important.
3. Save, and exit the editor, then from the command
line type the following:
export CFLAGS="-static $CFLAGS"
4. From the command line type the following:
./configure
make all
make install
5. The agent install file can be found in src/install
and can be transferred and run on another machine.
Notes:
1. See below for the error messages I was getting
while compiling with the "-static" flag enabled
without modifying the configuration file.
2. The libcrypto.a(dso_dlfcn.o) undefined reference
error(below) is fixed by -ldl
3. The libcrypto.a(c_zlib.o) undefined reference
error(below) is fixed by -lz
Original error messages:
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libcrypto.a(c_zlib.o):
In function `zlib_stateful_expand_block':
(.text+0x7c): undefined reference to `inflate'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libcrypto.a(c_zlib.o):
In function `zlib_stateful_compress_block':
(.text+0xfc): undefined reference to `deflate'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libcrypto.a(c_zlib.o):
In function `zlib_stateful_init':
(.text+0x1ce): undefined reference to `inflateInit_'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libcrypto.a(c_zlib.o):
In function `zlib_stateful_init':
(.text+0x243): undefined reference to `deflateInit_'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libcrypto.a(c_zlib.o):
In function `zlib_stateful_free_ex_data':
(.text+0x33e): undefined reference to `inflateEnd'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libcrypto.a(c_zlib.o):
In function `zlib_stateful_free_ex_data':
(.text+0x349): undefined reference to `deflateEnd'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libcrypto.a(dso_dlfcn.o):
In function `dlfcn_bind_func':
(.text+0x2f4): undefined reference to `dlsym'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libcrypto.a(dso_dlfcn.o):
In function `dlfcn_bind_func':
(.text+0x3cd): undefined reference to `dlerror'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libcrypto.a(dso_dlfcn.o):
In function `dlfcn_bind_var':
(.text+0x450): undefined reference to `dlsym'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libcrypto.a(dso_dlfcn.o):
In function `dlfcn_bind_var':
(.text+0x524): undefined reference to `dlerror'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libcrypto.a(dso_dlfcn.o):
In function `dlfcn_unload':
(.text+0x595): undefined reference to `dlclose'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libcrypto.a(dso_dlfcn.o):
In function `dlfcn_load':
(.text+0x677): undefined reference to `dlopen'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libcrypto.a(dso_dlfcn.o):
In function `dlfcn_load':
(.text+0x6ec): undefined reference to `dlclose'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libcrypto.a(dso_dlfcn.o):
In function `dlfcn_load':
(.text+0x72a): undefined reference to `dlerror'
collect2: ld returned 1 exit status
make[2]: *** [osirisd] Error 1
____________________________________________________________________________________
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front
More information about the osiris
mailing list