Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 Apr 2004 08:44:40 +0100
From:      Mark Murray <mark@grondar.org>
To:        Kaarthik Sivakumar <kaarthik@comcast.net>
Cc:        current@FreeBSD.ORG
Subject:   Re: libmp and libcrypto 
Message-ID:  <200404080744.i387ie0w047939@grimreaper.grondar.org>
In-Reply-To: Your message of "Wed, 07 Apr 2004 21:17:24 EDT." <86vfkb2rq3.fsf@comcast.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
Kaarthik Sivakumar writes:
> I am trying to compile a program that requires libmp for bignum and
> other large numbers. The configure test for libmp fails though. The
> output from config.log is at the end of the mail. It seems like
> linking with libmp requires linking with libcrypto also, libmp has
> undefined reference to BN_mul, etc. Is this how it is intended? I have
> been led to believe that neither Solaris' libmp or libgmp require it
> like this and usually it is the other way around, ie libcrypto would
> require libmp. So can anyone confirm that libcrypto is indeed needed
> for libmp?

Confirmed. Our libmp is a wrapper round the BIGNUM functions in libcrypto.

> libmp also defines a function called min() that takes one argument.
> The prototype for this function is in mp.h and this function takes one
> argument. This causes redefinition errors when compiling, since most
> programs seem to define a min() macro that takes 2 args and returns
> the minimum value. Would it possible to work around this in some way?
> Even better would be if the libmp functions had a mp_ prefix, like
> Solaris does. Is that something being considered? 

The mp.h header documents an ancient and sacred interface to the Berkeley
BIGNUM library. It ain't changing in a hurry. :-)

M
--
Mark Murray
iumop ap!sdn w,I idlaH



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404080744.i387ie0w047939>