List Info

Thread: ntpd and ssl




ntpd and ssl
user name
2006-08-06 21:03:21
Hello,
    Yesterday I tried to compile ntpd. The compile failed
with errors 
about functions missing from libcrypto.a. I don't have them
on my screen 
any more because my scroll buffer is too small. At any rate
as I 
remember there was a message about installing SSL. Well, I
don't 
remember when or why but I already installed SSL. I used nm
on 
libcrypto.a and found that in fact the functions that were
being 
complained about (dlerror, dlopen, dlclose) were in fact
unresolved. I 
just pulled down the SSL package again and re-compiled with
patch and 
before I did the install I used nm on the new libcrypto.a
and again the 
dlxxxx functions are unresolved. Back when I built my LFS
6.0 system on 
an i586 platform I had no problems building and running
ntpd. This time 
I'm working on a CLFS pure64 on AMD64 X2. Is this a 64 bit
issue? Is 
there a switch I need to turn on to get the dlxxxx functions
to build in 
this environment? Has anyone seen this before?

Arnie
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-suppo
rt
FAQ: http://
www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
ntpd and ssl
user name
2006-08-06 21:13:09
On 8/6/06, Arnie Stender <astenderaagstender.org> wrote:

> just pulled down the SSL package again and re-compiled
with patch and
> before I did the install I used nm on the new
libcrypto.a and again the
> dlxxxx functions are unresolved. Back when I built my
LFS 6.0 system on
> an i586 platform I had no problems building and running
ntpd. This time
> I'm working on a CLFS pure64 on AMD64 X2. Is this a 64
bit issue? Is
> there a switch I need to turn on to get the dlxxxx
functions to build in
> this environment? Has anyone seen this before?

Did you try using the patches on the User Notes page?

ht
tp://wiki.linuxfromscratch.org/blfs/wiki/OpenSSL

The user notes links are on the pages for the BLFS
development book.

--
Dan
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-suppo
rt
FAQ: http://
www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
ntpd and ssl
user name
2006-08-07 10:58:15
On Sun, 2006-08-06 at 16:03 -0500, Arnie Stender wrote:
> Hello,
>     Yesterday I tried to compile ntpd. The compile
failed with errors 
> about functions missing from libcrypto.a. I don't have
them on my screen 
> any more because my scroll buffer is too small. At any
rate as I 
> remember there was a message about installing SSL.
Well, I don't 
> remember when or why but I already installed SSL. I
used nm on 
> libcrypto.a and found that in fact the functions that
were being 
> complained about (dlerror, dlopen, dlclose) were in
fact unresolved. I 
> just pulled down the SSL package again and re-compiled
with patch and 
> before I did the install I used nm on the new
libcrypto.a and again the 
> dlxxxx functions are unresolved. Back when I built my
LFS 6.0 system on 
> an i586 platform I had no problems building and running
ntpd. This time 
> I'm working on a CLFS pure64 on AMD64 X2. Is this a 64
bit issue? Is 
> there a switch I need to turn on to get the dlxxxx
functions to build in 
> this environment? Has anyone seen this before?

I can't help you with 64-bit issues or CLFS, since I don't
own a 64-bit
system. But I can tell you you're heading down completely
the wrong
track looking for dlopen and friends as part of OpenSSL.
They're
standard functions provided by glibc, so you certainly
should have them
on the system.

In any case, try providing us the actual messages, and
someone might be
able to help.

Simon.
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-suppo
rt
FAQ: http://
www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
ntpd and ssl
user name
2006-08-07 14:40:39
Simon Geard wrote:

>I can't help you with 64-bit issues or CLFS, since I
don't own a 64-bit
>system. But I can tell you you're heading down
completely the wrong
>track looking for dlopen and friends as part of OpenSSL.
They're
>standard functions provided by glibc, so you certainly
should have them
>on the system.
>
>In any case, try providing us the actual messages, and
someone might be
>able to help.
>
>Simon.
>  
>
Hi Simon,
    Well, I couldn't verify that glibc contains those
functions but the 
way I read the output from make for ntpd it is looking in
libcrypto for 
them and in fact nm on libcrypto.a shows the names but says
they are 
unresolved. Here is the final output from make in the
ntp--4.2.2p3-RC2 
source directory.

make[2]: Entering directory
`/usr/src/secondary/ntp-4.2.2p3-RC2/ntpd'
gcc  -fPIC -m64  -Wall -Wcast-qual -Wmissing-prototypes
-Wpointer-arith 
-Wshadow -Wstrict-prototypes  -L/usr/local/ssl/lib -o ntpd 
cmd_args.o 
ntp_config.o ntp_io.o ntpd.o version.o libntpd.a 
../libntp/libntp.a -lm 
-lcrypto
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function
`dlfcn_bind_func':
dso_dlfcn.c:(.text+0x2aa): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x356): undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function
`dlfcn_bind_var':
dso_dlfcn.c:(.text+0x3ca): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x471): undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function
`dlfcn_unload':
dso_dlfcn.c:(.text+0x4cd): undefined reference to `dlclose'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function
`dlfcn_load':
dso_dlfcn.c:(.text+0x582): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x5eb): undefined reference to `dlclose'
dso_dlfcn.c:(.text+0x613): undefined reference to `dlerror'
collect2: ld returned 1 exit status
make[2]: *** [ntpd] Error 1
make[2]: Leaving directory
`/usr/src/secondary/ntp-4.2.2p3-RC2/ntpd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/usr/src/secondary/ntp-4.2.2p3-RC2'
make: *** [all] Error 2

Arnie

-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-suppo
rt
FAQ: http://
www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
ntpd and ssl
user name
2006-08-08 09:41:31
On Mon, 2006-08-07 at 09:40 -0500, Arnie Stender wrote:
> Simon Geard wrote:
> 
> >I can't help you with 64-bit issues or CLFS, since
I don't own a 64-bit
> >system. But I can tell you you're heading down
completely the wrong
> >track looking for dlopen and friends as part of
OpenSSL. They're
> >standard functions provided by glibc, so you
certainly should have them
> >on the system.
> >
> >In any case, try providing us the actual messages,
and someone might be
> >able to help.
> >
> >Simon.
> >  
> >
> Hi Simon,
>     Well, I couldn't verify that glibc contains those
functions but the 
> way I read the output from make for ntpd it is looking
in libcrypto for 
> them and in fact nm on libcrypto.a shows the names but
says they are 
> unresolved. Here is the final output from make in the
ntp--4.2.2p3-RC2 
> source directory.

You're misreading it - it's not that something is looking
in libcrypto
for those functions, but that something in libcrypto is
looking for
those functions. Looks like libcrypto contains some sort of
wrapper for
those functions, I guess for compatibility with non-Linux
systems.

> make[2]: Entering directory
`/usr/src/secondary/ntp-4.2.2p3-RC2/ntpd'
> gcc  -fPIC -m64  -Wall -Wcast-qual -Wmissing-prototypes
-Wpointer-arith 
> -Wshadow -Wstrict-prototypes  -L/usr/local/ssl/lib -o
ntpd  cmd_args.o 
> ntp_config.o ntp_io.o ntpd.o version.o libntpd.a 
../libntp/libntp.a -lm 
> -lcrypto
> /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In
function `dlfcn_bind_func':
> dso_dlfcn.c:(.text+0x2aa): undefined reference to
`dlsym'
> dso_dlfcn.c:(.text+0x356): undefined reference to
`dlerror'

Ok, well on most systems, those functions are in libdl -
part of glibc,
but not in the main library that gets included by default.

Try go to the directory it mentions, and manually run the
gcc command
above with -ldl appended to ensure it gets linked (or edit
the Makefile
to pass it). Does that work?


Not sure why this is failing - possibly it's because it's
using a static
version of libcrypto (a .a)? A shared library would normally
itself be
linked to libdl, so ntpd wouldn't need to worry about it.


Simon.
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-suppo
rt
FAQ: http://
www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
ntpd and ssl
user name
2006-08-09 00:23:38
Simon Geard wrote:

>Ok, well on most systems, those functions are in libdl -
part of glibc,
>but not in the main library that gets included by
default.
>
>Try go to the directory it mentions, and manually run
the gcc command
>above with -ldl appended to ensure it gets linked (or
edit the Makefile
>to pass it). Does that work?
>
>
>Not sure why this is failing - possibly it's because
it's using a static
>version of libcrypto (a .a)? A shared library would
normally itself be
>linked to libdl, so ntpd wouldn't need to worry about
it.
>
>
>Simon.
>  
>
Hi Simon,
    I really need to get back into programming. That is
where I started 
out but quickly moved into system administration. You hit
this one right 
on the head. Your fix worked great. I had to add the -ldl to
the 
Makefile in both ntpd and util sub-directories. Thanks a
bunch for your 
help.

Arnie
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-suppo
rt
FAQ: http://
www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )