View Issue Details

IDProjectCategoryView StatusLast Update
0002634unrealinstallingpublic2006-05-30 06:15
Reportermixx941 Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionnot fixable 
Product Version3.2.3 
Summary0002634: Allow Proper Selection of OpenSSL Version
DescriptionI've ran into this issue on a few of my servers. They are running the FreeBSD operating system with two versions of OpenSSL installed. Since the FreeBSD base system comes with OpenSSL, the way to upgrade OpenSSL is through the ports system. That leaves the original one in /usr/ and the newer version via ports in /usr/local/.

When trying to install Unreal 3.2.3 on one of these servers, I get OpenSSL version mismatch errors when booting the IRCd even after telling it to use the /usr/local/bin/openssl one in ./Config. However, for some reason it tries to use the libraries from the older version installed:

----------
[!!!] OpenSSL version mismatch: compiled for 'OpenSSL 0.9.7g 11 Apr 2005', library is 'OpenSSL 0.9.7e 25 Oct 2004'
[!!!] Header<->library mismatches can make UnrealIRCd *CRASH*! Make sure you don't have multiple versions of openssl or zlib installed (eg: one in /usr and one in /usr/local). And, if you recently upgraded them, be sure to recompile Unreal.
----------

I'm hoping there is a fix for this since I'd like to have my entire network equipped with SSL, but if a few servers cannot run it properly then it isn't a fully secure network.

Thanks.
Additional Information$ /usr/bin/openssl version
OpenSSL 0.9.7e 25 Oct 2004

$ /usr/local/bin/openssl version
OpenSSL 0.9.7g 11 Apr 2005
Attached Files
makelog (60,768 bytes)
config.log (39,819 bytes)
3rd party modules

Activities

syzop

2005-09-04 14:45

administrator   ~0010433

I'm not sure Unreal can do something about that. Sounds like it indeed compiled for the newest version, but when you run it, it loads the old .so, you can doublecheck this by doing: 'ldd src/ircd'.

In such a case... 'LIBRARY_PATH=/usr/local/lib ./unreal start' might work, but.. *cough*.

You sure this is the recommended way to do things btw? I'm not familiar with freebsd sysadministration, but it doesn't sound like a good idea to have multiple of the same .so's on the system.

mixx941

2005-09-04 15:28

reporter   ~0010434

$ ldd src/ircd
src/ircd:
        libcrypt.so.2 => /lib/libcrypt.so.2 (0x280d3000)
        libz.so.2 => /lib/libz.so.2 (0x280ec000)
        libc.so.5 => /lib/libc.so.5 (0x280fc000)
---------------------

That LIBRARY_PATH didn't seem to work. Same mismatch message.

Personally, I don't do it the described way. Since OpenSSL is included with the FreeBSD base system, I usually leave it be and when there is a FreeBSD update they may update OpenSSL in the base system. However, I have a couple donated machines and they are done like this (upgraded via the ports so there are two), so this is why I filed the report.

I might add though that upgrading via the ports method (and having two) is not uncommon, and I do know other people that do it that way as well.

syzop

2005-09-04 15:32

administrator   ~0010435

hm ic.. seems openssl gets linked in statically then (instead of a dynamic library). Then the order of libraries can be changed I think.

What does your full XCFLAGS line look like from the Makefile from Unreal?
(grep XCFLAGS Makefile)

mixx941

2005-09-04 15:56

reporter   ~0010436

This is from one of the servers. Before filing the bug report I tried the CVS version just in case it was a known issue and not fixed in 3.2.3:

---------------------------
# Change XCFLAGS if you don't like what Config puts there. Same with
# If you are configuring by hand, try "-O -g" for XCFLAGS, and leave
#XCFLAGS=-O -g -export-dynamic
XCFLAGS=-I/home/mixx/CVS/Unreal/extras/regexp/include -pipe -g -O2 -funsigned-char -fno-strict-aliasing -I/usr/local/include -DZIP_LINKS -export-dynamic
CFLAGS=-I$(INCLUDEDIR) $(XCFLAGS) -L/usr/local/lib $(FD_SETSIZE)

syzop

2005-09-04 16:19

administrator   ~0010437

Last edited: 2005-09-04 16:20

Oh, my fault, I meant 'IRCDLIBS' actually.
Your XCFLAGS looks fine though :)

mixx941

2005-09-04 17:09

reporter   ~0010438

Sure, no problem:
--------------------

# IRCDLIBS.
# IRCDLIBS blank. If that fails, try recomendations below.
IRCDLIBS=-lcrypt -lz -L/home/mixx/CVS/Unreal/extras/regexp/lib -ltre
#IRCDLIBS=-lsys_s
#IRCDLIBS=-lbsd
#IRCDLIBS= -lsocket -linet -lnsl -lseq
#IRCDLIBS= -lsocket -linet -lnsl -lseq
#IRCDLIBS=-lresolv
#IRCDLIBS=-lsocket -lnsl -lresolv -L/usr/ucblib -R/usr/ucblib -lgen
#IRCDLIBS=-L/usr/ucblib -L/usr/lib -lsocket -lucb -lns -lnsl
#IRCDLIBS=-lsocket -lnsl -lucb
MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'IRCDLIBS=${IRCDLIBS}' \

syzop

2005-09-04 17:17

administrator   ~0010439

Last edited: 2005-09-04 17:18

Ok, good.

now on CRYPTOLIB.. that would probably look like:
CRYPTOLIB=-lssl -lcrypto
right?
Change it to:
CRYPTOLIB=-L/usr/local/lib -lssl -lcrypto

Let me know if that worked.

(do a 'make clean; make' after that)

mixx941

2005-09-04 17:28

reporter   ~0010440

Okay, tried like you said...unfortunately not:

Starting UnrealIRCd
[!!!] OpenSSL version mismatch: compiled for 'OpenSSL 0.9.7g 11 Apr 2005', library is 'OpenSSL 0.9.7e 25 Oct 2004'
[!!!] Header<->library mismatches can make UnrealIRCd *CRASH*! Make sure you don't have multiple versions of openssl or zlib installed (eg: one in /usr and one in /usr/local). And, if you recently upgraded them, be sure to recompile Unreal.

syzop

2005-09-04 17:30

administrator   ~0010441

Hm odd.
Could you run eh:

make clean; make 1>makelog 2>&1
And then send 'makelog' (and actually, 'config.log' would be nice as well) to [email protected] ? (or attach it here)

mixx941

2005-09-04 17:43

reporter   ~0010442

Sure, both attached here. Thanks.

syzop

2005-09-04 17:55

administrator   ~0010443

Hm, then I've no idea I'm afraid, unreal does all it can when trying to link:
[..]'-L/usr/local/lib -lssl -lcrypto'[..]
(now this occurs twice in the same line, don't know why, but BOTH have the -L/usr/local/lib right in front of it, so that cannot be a problem...).

Don't know then.

pinstrate

2005-09-10 09:42

reporter   ~0010449

rm -f /usr/bin/openssl
ln -s /usr/local/bin/openssl /usr/bin/openssl

mixx941

2005-09-10 19:43

reporter   ~0010461

Uh, I don't think that would work. First off, I don't have root on that box. Secondly, Unreal seems to compile from the 0.9.7g binary (/usr/local) but uses the 0.9.7e (/usr) libraries. I don't think removing the 0.9.7e binary and linking the other binary to /usr/bin/ would resolve the library problems. Please correct me if I'm wrong.

I also don't know how FreeBSD would like that, since that version of OpenSSL is part of the FBSD base system.

syzop

2005-09-11 10:55

administrator   ~0010462

Correct, that won't help.

Issue History

Date Modified Username Field Change
2005-09-03 22:32 mixx941 New Issue
2005-09-04 14:45 syzop Note Added: 0010433
2005-09-04 15:28 mixx941 Note Added: 0010434
2005-09-04 15:32 syzop Note Added: 0010435
2005-09-04 15:56 mixx941 Note Added: 0010436
2005-09-04 16:19 syzop Note Added: 0010437
2005-09-04 16:20 syzop Note Edited: 0010437
2005-09-04 17:09 mixx941 Note Added: 0010438
2005-09-04 17:17 syzop Note Added: 0010439
2005-09-04 17:18 syzop Note Edited: 0010439
2005-09-04 17:28 mixx941 Note Added: 0010440
2005-09-04 17:30 syzop Note Added: 0010441
2005-09-04 17:42 mixx941 File Added: makelog
2005-09-04 17:43 mixx941 File Added: config.log
2005-09-04 17:43 mixx941 Note Added: 0010442
2005-09-04 17:55 syzop Note Added: 0010443
2005-09-10 09:42 pinstrate Note Added: 0010449
2005-09-10 19:43 mixx941 Note Added: 0010461
2005-09-11 10:55 syzop Note Added: 0010462
2006-05-30 06:15 syzop Status new => closed
2006-05-30 06:15 syzop Resolution open => not fixable