Subject: 1.6.1 linking issues
To: None <tech-userlevel@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-userlevel
Date: 11/29/2003 03:44:04
I'm trying to link some crypto code static on 1.6.1.  But when I link
-static against -lcrypto, I get babblage like

/usr/lib/libcrypto.a(e_idea.o): In function `EVP_idea_ecb':
e_idea.o(.text+0x138): IDEA is a patented algorithm; link against libcrypto_idea.a
e_idea.o(.text+0x154): IDEA is a patented algorithm; link against libcrypto_idea.a
/usr/lib/libcrypto.a(e_idea.o)(.text+0x5c): IDEA is a patented algorithm; link against libcrypto_idea.a

(and similar noise about RC5 and MDC2).  Leaving aside whether those
claims are actually true for me (something I am not competent to
comment on, and they probably are true in the jurisdiction where NetBSD
is based and thus it must do something of the sort)...there _isn't_ any
libcrypto_idea.a (or _rc5.a or _mdc2.a)!

Furthermore, after building libcrypto_{idea,rc5,mdc2}.a and linking
with -lcrypto_rc5 -lcrypto_idea -lcrypto_mdc2 -lcrypto, I _still_ get
the babblage!  Putting -lcrypto before the other three doesn't change
anything visibly.  And leaving -lcrypto out entirely produces reams and
reams of undefined references.

What's the correct action?  (I can't just link against the .so because
the whole point is to include a built-with-debugging-goop version of
one of the .o files in libcrypto.)

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B