Home/Support/Support Forum/cross compiling for cc9p9215
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

cross compiling for cc9p9215

0 votes
When trying to cross compile Precision Time Protocol (PTP) for the 9p9215 I receive several error messages on make,
dep/ntpengine/ntp_isc_md5.c: In function 'isc_md5_invalidate':
dep/ntpengine/ntp_isc_md5.c:70: warning: implicit declaration of function 'bzero'
dep/ntpengine/ntp_isc_md5.c:70: warning: incompatible implicit declaration of built-in function 'bzero'
dep/ntpengine/ntp_isc_md5.c: In function 'isc_md5_update':
dep/ntpengine/ntp_isc_md5.c:191: warning: implicit declaration of function 'bcopy'
dep/ntpengine/ntp_isc_md5.c:191: warning: incompatible implicit declaration of built-in function 'bcopy'
dep/ntpengine/ntp_isc_md5.c:195: warning: incompatible implicit declaration of built-in function 'bcopy'
dep/ntpengine/ntp_isc_md5.c: In function 'isc_md5_final':
dep/ntpengine/ntp_isc_md5.c:230: warning: incompatible implicit declaration of built-in function 'bzero'
dep/ntpengine/ntp_isc_md5.c:236: warning: incompatible implicit declaration of built-in function 'bzero'
dep/ntpengine/ntp_isc_md5.c:245: warning: incompatible implicit declaration of built-in function 'bcopy'
dep/ntpengine/ntp_isc_md5.c: In function 'MD5authencrypt':
dep/ntpengine/ntp_isc_md5.c:271: warning: incompatible implicit declaration of built-in function 'bcopy'


and further down:

dep/daemonconfig.o: In function `loadCommandLineKeys':
/home/dsb/ptp/ptpd-2.3.1-rc4/src/dep/daemonconfig.c:2590: undefined reference to `index'
dep/ntpengine/ntp_isc_md5.o: In function `isc_md5_update':
/home/dsb/ptp/ptpd-2.3.1-rc4/src/dep/ntpengine/ntp_isc_md5.c:195: undefined reference to `bcopy'
/home/dsb/ptp/ptpd-2.3.1-rc4/src/dep/ntpengine/ntp_isc_md5.c:203: undefined reference to `bcopy'
/home/dsb/ptp/ptpd-2.3.1-rc4/src/dep/ntpengine/ntp_isc_md5.c:211: undefined reference to `bcopy'
/home/dsb/ptp/ptpd-2.3.1-rc4/src/dep/ntpengine/ntp_isc_md5.c:191: undefined reference to `bcopy'
dep/ntpengine/ntp_isc_md5.o: In function `isc_md5_final':
dep/ntpengine/ntp_isc_md5.o:/home/dsb/ptp/ptpd-2.3.1-rc4/src/dep/ntpengine/ntp_isc_md5.c:271: more undefined references to `bcopy' follow
collect2: ld returned 1 exit status
make[2]: *** [ptpd2] Error 1
make[2]: Leaving directory `/home/dsb/ptp/ptpd-2.3.1-rc4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/dsb/ptp/ptpd-2.3.1-rc4'
make: *** [all] Error 2

I think I must need to "include" something, but not sure what.
asked Jul 21, 2015 in Linux by digiDave New to the Community (20 points)

Please log in or register to answer this question.

3 Answers

0 votes
is strings.h included?
https://www.linuxquestions.org/questions/linux-software-2/warning-incompatible-implicit-declaration-of-built-in-function-%91bzero%92-635670/
answered Jul 21, 2015 by LeonidM Veteran of the Digi Community (3,622 points)
0 votes
string.h was included in the iniparser.h file. I added strings.h but made no difference. Also, can compile complete program on the Linux machine, just not cross compile for the cc9p9215 module (make CC=arm-linux-gcc)
Info I am providing is:
export PATH=/usr/local/DigiEL-5.7/x-tools/arm-unknown-linux-uclibcgnueabi/bin:$PATH
export TOOLCHAIN_DIR==/usr/local/DigiEL-5.7/x-tools/arm-unknown-linux-uclibcgnueabi/
export ac_cv_func_malloc_0_nonnull=yes
CC=arm-Linux-gcc ./configure --host=arm-Linux --target=arm-Linux --disable-snmp --prefix==/usr/local/DigiEL-5.7/x-tools/arm-unknown-linux-uclibcgnueabi
then:
make CC=arm-linux-gcc
answered Jul 22, 2015 by digiDave New to the Community (20 points)
you have "==" in 2 places where it should be
"="
also --target=arm-Linux - has a typo too "L" should be lower case
for example:
export PATH=/usr/local/DigiEL-5.7/x-tools/arm-unknown-linux-uclibcgnueabi/bin:$PATH
export TOOLCHAIN_DIR=/usr/local/DigiEL-5.7/x-tools/arm-unknown-linux-uclibcgnueabi/
CC=arm-linux-gcc ./configure  --host=arm-linux --target=arm-linux --prefix=/usr/local/DigiEL-5.7/x-tools/arm-unknown-linux-uclibcgnueabi
make CC=arm-linux-gcc
0 votes
In further checking, both the string.h and strings.h files are "included" within the ptpd.h file, which lists all includes. I do not understand why the compiler is not seeing the index, bzero, and bcopy functions, as these are declared in the string.h file.
Any ideas suggestions would be VERY welcome. THANKS !
answered Jul 29, 2015 by digiDave New to the Community (20 points)
...