LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-08-2015, 03:52 AM   #1
sumanthlinux
LQ Newbie
 
Registered: May 2015
Posts: 4

Rep: Reputation: Disabled
regarding cross compilation of ntp


hi all,
I am new to cross compilation .I am trying to cross compile ntp for arm based zync soc board. so i have downloaded ntp source code version ntp-4.2.8-p2

i gave options for confiure file like this ./configure --host=arm-xilinix-linux-gnueabi --build=x86_64-pc-linux-gnu --prefix=/home/sntp CC=arm-xilinx-linux-gnueabi-gcc -with-yeilding-select=yes
configuration is succesful but when i am going for make it is throwing an error like this

cd ./html && \
../scripts/build/checkHtmlFileDates
cd . && \
./scripts/build/checkChangeLog
make all-recursive
make[1]: Entering directory `/home/SNTP/ntp-4.2.8p2'
Making all in sntp
make[2]: Entering directory `/home/SNTP/ntp-4.2.8p2/sntp'
[ ! -r ./../COPYRIGHT ] \
|| [ check-COPYRIGHT-submake -nt ./../COPYRIGHT ] \
|| make check-COPYRIGHT-submake
cd ../libntp && make libntp.a
make[3]: Entering directory `/home/sumanth/SNTP/ntp-4.2.8p2/libntp'
CC systime.o
In file included from ../include/ntp.h:14:0,
from systime.c:9:
../include/ntp_crypto.h:27:25: fatal error: openssl/evp.h: No such file or directory
#include "openssl/evp.h"
^
compilation terminated.
make[3]: *** [systime.o] Error 1
make[3]: Leaving directory `/home/sumanth/SNTP/ntp-4.2.8p2/libntp'
make[2]: *** [../libntp/libntp.a] Error 2
make[2]: Leaving directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sumanth/SNTP/ntp-4.2.8p2'
make: *** [all] Error 2

suggest me how to fix this?

Regards
sumanth
 
Old 05-08-2015, 08:18 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,602

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Have you already cross compiled openssl?

The libraries and header include files need to be specified too (using a -I option to include the path to the cross compiled result for program development).

What frequently happens in a .configure is that it looks for the library (which may exist), but not always look for the development include files. Without the direction to the include file it will attempt to use the systems /usr/include directory instead - and possibly get the wrong definitions. In this case, the missing include file.

You will have to check with the .configure help reference (normally included...) to see what you have to add for this. Usually something like "SSLLIB=...." or just "LIBS=...", and "INCLUDES=...".
 
1 members found this post helpful.
Old 05-08-2015, 10:25 AM   #3
sumanthlinux
LQ Newbie
 
Registered: May 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
i have downloaded openssl-10.2.a source file , i have cross compiled it libcrypto.so,libssl.so files are not generated only .a files generated .
when i am going for cross compilation of ntp it is showing like this

cd ./html && \
../scripts/build/checkHtmlFileDates
cd . && \
./scripts/build/checkChangeLog
make all-recursive
make[1]: Entering directory `/home/sumanth/SNTP/ntp-4.2.8p2'
Making all in sntp
make[2]: Entering directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp'
[ ! -r ./../COPYRIGHT ] \
|| [ check-COPYRIGHT-submake -nt ./../COPYRIGHT ] \
|| make check-COPYRIGHT-submake
make all-recursive
make[3]: Entering directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp'
Making all in include
make[4]: Entering directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp/include'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp/include'
Making all in scripts
make[4]: Entering directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp/scripts'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp/scripts'
Making all in libevent
make[4]: Entering directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp/libevent'
make all-am
make[5]: Entering directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp/libevent'
make[5]: Leaving directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp/libevent'
make[4]: Leaving directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp/libevent'
Making all in libopts
make[4]: Entering directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp/libopts'
make all-am
make[5]: Entering directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp/libopts'
make[5]: Nothing to be done for `all-am'.
make[5]: Leaving directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp/libopts'
make[4]: Leaving directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp/libopts'
make[4]: Entering directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp'
env CSET=`cat ./scm-rev` ./../scripts/build/mkver sntp
Version <sntp 4.2.8p2@1.3265-o Fri May 8 10:55:32 UTC 2015 (3)>
env CCACHE_DISABLE=1 arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I./../include -I./../lib/isc/include -I./../lib/isc/pthreads/include -I./../lib/isc/unix/include -I./libopts -I./libevent/include -I./libevent/include -Wall -Wcast-align -Wcast-qual -Wmissing-prototypes -Wpointer-arith -Wshadow -Winit-self -Wstrict-overflow -Wno-strict-prototypes -g -O2 -c version.c -o version.o
CCLD sntp
/home/zynq/peta_linux/2014.4/installation/petalinux-v2014.4-final/tools/linux-i386/arm-xilinx-linux-gnueabi/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.8.3/../../../../arm-xilinx-linux-gnueabi/bin/ld: cannot find -lssl
/home/zynq/peta_linux/2014.4/installation/petalinux-v2014.4-final/tools/linux-i386/arm-xilinx-linux-gnueabi/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.8.3/../../../../arm-xilinx-linux-gnueabi/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
make[4]: *** [sntp] Error 1
make[4]: Leaving directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/sumanth/SNTP/ntp-4.2.8p2/sntp'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sumanth/SNTP/ntp-4.2.8p2'
make: *** [all] Error 2

Last edited by sumanthlinux; 05-08-2015 at 10:27 AM.
 
Old 05-08-2015, 04:31 PM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,602

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
The .a file should be ok. The problem is still that the compiler isn't being pointed to the libraries.
 
Old 05-08-2015, 04:59 PM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
You need to tell the configure script where to look for your cross-compiled ssl.

It'll often look something like:
./configure --with-openssl=/path/to/your/openssl/directory

You can run "./configure --help" to get a list of options

Last edited by suicidaleggroll; 05-08-2015 at 05:01 PM.
 
Old 05-14-2015, 05:28 AM   #6
sumanthlinux
LQ Newbie
 
Registered: May 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
regarding cross compilation of ntp Reply to Thread

i have cross compiled ntp for my target ,it has generated bin files for ntp like ntpdate,ntpd .now i will place these files in my board bin folder .after that i need to configure my board as ntp client how i can i do that?
i have found ntp.conf file in /etc but it is readonly .if i adding my server to it is showing readonly file
whether we have to change the permissions for that ?

Last edited by sumanthlinux; 05-15-2015 at 06:20 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross synchronization NTP not working Vikonder Linux - Newbie 1 11-16-2011 02:18 PM
cross compilation shariefbe Linux - Software 5 02-15-2010 06:23 AM
cross compilation shaiva Linux - Newbie 2 10-06-2009 04:43 AM
all about cross compilation swift2008 Programming 3 08-27-2008 06:49 AM
cross compilation Kocil Slackware 6 12-18-2003 02:53 PM


All times are GMT -5. The time now is 10:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration