Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to deploy ntp to a very space-critical pxe-imaging-system. (Yes, each KB matters.) Footprint needs to be as small as possible, so I want to compile ntp without linking openssl. According to the manual this is should be possible:

If available, the OpenSSL library from http://www.openssl.org is used to support public key cryptography. The library must be built and installed prior to building NTP. The procedures for doing that are included in the OpenSSL documentation. The library is found during the normal NTP configure phase and the interface routines compiled automatically. Only the libcrypto.a library file and openssl header files are needed. If the library is not available or disabled, this step is not required.

I already tried out

./configure --without-openssl

however, this didn't help. This is my ldd output:

ldd ntpd/ntpd
        linux-gate.so.1 =>  (0xb7706000)
        libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb76d5000)
        libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8 (0xb7582000)
        librt.so.1 => /lib/i686/cmov/librt.so.1 (0xb7578000)
        libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb741d000)
        /lib/ld-linux.so.2 (0xb7707000)
        libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7419000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7404000)
        libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb73eb000)

The system I am compiling on is 32-bit debian lenny using openssl 0.9.8g-15+lenny16.

What is the correct configure option to compile ntp without openssl?

share|improve this question
    
This seems like way too much work to save 3 MB of disk space. –  Michael Hampton Jun 24 '13 at 23:21
    
The setup I am using it in are very performance-critical. The whole imaging system incl. kernel and everything only is about 12mb big, 3mb being a very big addition ;-) Hope you understand that. Nonetheless, my question was not if it makes sense, but how to achieve it. There must be a very easy way I suppose, I don't think that it should be too much work. :-) –  Zulakis Jun 25 '13 at 5:44

2 Answers 2

Works for me:

[me@risby ntp-4.2.6p5]$ ./configure --without-openssl && make

[me@risby ntp-4.2.6p5]$ ldd ntpd/ntpd
    linux-vdso.so.1 =>  (0x00007fffd516c000)
    libm.so.6 => /lib64/libm.so.6 (0x0000003838a00000)
    librt.so.1 => /lib64/librt.so.1 (0x0000003838600000)
    libc.so.6 => /lib64/libc.so.6 (0x0000003837a00000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003837e00000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003837600000)

Can you show us it not working for you? (Don't forget to do a make distclean first.)

Edit: yes, I do have it installed:

[me@risby ntp-4.2.6p5]$ rpm -qa|grep openssl
openssl-1.0.0k-1.fc17.x86_64
openssl-devel-1.0.0k-1.fc17.x86_64

You have told us nothing about your distro (nor even OS, though we know it's Linux from your ldd output). Maybe this is a good time to get a bit more specific?

share|improve this answer
    
Hi, thanks for your answer. I did a fresh compililation of ntp (completely new files from .tar, not only distclean) but still got the very same problem. I added the ldd output to my question post. Can you check if you even have openssl installed on your system? If it's not there it will automatically not link to it I think. However, I need to compile on a system which has it installed. –  Zulakis Jun 24 '13 at 11:06
    
I also added a quote from the ntp manual explaining that to my opening post. –  Zulakis Jun 24 '13 at 11:09
    
Sorry for providing this so lately. It is a 32-bit debian lenny system using openssl 0.9.8g-15+lenny16. openssl-devel is not installed. –  Zulakis Jun 25 '13 at 5:46
    
I don't understand why my question got closed. I could still accept your answer if you find a solution though. That would be great!! –  Zulakis Jun 25 '13 at 13:49
    
I don't see that I'm likely to find a solution, since I can't reproduce the problem. Given that you don't have openssl-devel installed, it's a mystery to me how it's finding any openssl libraries to link against; but I'm no debian expert. Still, I agree that I think it's a reasonable question, so I've voted to reopen it in case anyone else can find out more. –  MadHatter Jun 25 '13 at 14:25
up vote 0 down vote accepted

Got it!

By researching the configure script I found out you actually got to use

./configure --without-crypto

instead of

./configure --without-openssl
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.