[CMake] arm-none-eabi (Relic-0.3.1) Cmake error

Mohammed Said Albahri malbahri at hotmail.com
Sat Jul 6 13:27:29 EDT 2013


Dear All, 

I am in process of building relic-toolkits (relic-0.3.1) for Arduino DUE which contain arm-cortex m3. Attached is the cmake file for making the library. The library been built successfully but reporting the following errors after applying make command

Linking C static library ../lib/librelic_s.a
[ 87%] Built target relic_s
Scanning dependencies of target test_bn
[ 88%] Building C object test/CMakeFiles/test_bn.dir/test_bn.c.obj
Linking C executable ../bin/test_bn
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: warning: cannot find entry symbol _start; defaulting to 00008000
../lib/librelic_s.a(relic_rand.c.obj): In function `rand_init':
relic_rand.c:(.text+0x18): undefined reference to `memset'
relic_rand.c:(.text+0x20): undefined reference to `srand'
relic_rand.c:(.text+0x30): undefined reference to `rand'
../lib/librelic_s.a(relic_rand.c.obj): In function `rand_clean':
relic_rand.c:(.text+0xa0): undefined reference to `memset'
../lib/librelic_s.a(relic_util.c.obj): In function `util_bits_dig':
relic_util.c:(.text+0x120): undefined reference to `__clzsi2'
../lib/librelic_s.a(relic_util.c.obj): In function `util_printf':
relic_util.c:(.text+0x15c): undefined reference to `vprintf'
relic_util.c:(.text+0x170): undefined reference to `fflush'
relic_util.c:(.text+0x184): undefined reference to `_impure_ptr'
../lib/librelic_s.a(relic_bn_gcd.c.obj): In function `bn_gcd_dig':
relic_bn_gcd.c:(.text+0xd80): undefined reference to `__aeabi_uidivmod'
../lib/librelic_s.a(relic_bn_gcd.c.obj): In function `bn_gcd_ext_dig':
relic_bn_gcd.c:(.text+0x1070): undefined reference to `__aeabi_uidiv'
relic_bn_gcd.c:(.text+0x1088): undefined reference to `__aeabi_uidivmod'
../lib/librelic_s.a(relic_bn_util.c.obj): In function `bn_read_bin':
relic_bn_util.c:(.text+0x10b8): undefined reference to `__aeabi_uidivmod'
relic_bn_util.c:(.text+0x10d4): undefined reference to `__aeabi_uidiv'
relic_bn_util.c:(.text+0x10ec): undefined reference to `__aeabi_uidiv'
../lib/librelic_s.a(relic_fb_util.c.obj): In function `fb_write':
relic_fb_util.c:(.text+0xa5c): undefined reference to `__aeabi_uidivmod'
../lib/librelic_s.a(relic_bn_div_low.c.obj): In function `bn_divn_low':
relic_bn_div_low.c:(.text+0x2f4): undefined reference to `__aeabi_uldivmod'
../lib/librelic_s.a(relic_bn_div_low.c.obj): In function `bn_div1_low':
relic_bn_div_low.c:(.text+0x7a8): undefined reference to `__aeabi_uldivmod'
../lib/librelic_s.a(sha1.c.obj): In function `SHA1FinalBits':
sha1.c:(.text+0x2d0): undefined reference to `memcpy'
sha1.c:(.text+0x2f0): undefined reference to `memcpy'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/test_bn] Error 1
make[1]: *** [test/CMakeFiles/test_bn.dir/all] Error 2
make: *** [all] Error 2

for your information the following cmake command been used to build the library 

cmake "Lunix Makefiles" -DCMAKE_TOOLCHAIN_FILE=relic-arm3.cmake -DCOMP=" -nostartfiles -nostdlib" -DTESTS=1 -DARCH=ARM -DWORD=32 -DOPSYS=NONE -DSEED=LIBC -DSHLIB=OFF -DSTBIN=ON -DTIMER=NONE -DWITH="DV;BN;FB;EB;EC;CP;MD" -DBENCH=20 -DTESTS=20 -DCHECK=off -DVERBS=off -DSTRIP=on -DQUIET=off -DARITH=easy -DFB_POLYN=163 -DBN_METHD="COMBA;COMBA;MONTY;SLIDE;STEIN;BASIC" -DFB_METHD="INTEG;INTEG;QUICK;BASIC;BASIC;BASIC;EXGCD;BASIC;BASIC" -DFB_PRECO=off -DFB_TRINO=off -DBN_PRECI=160 -DBN_MAGNI=DOUBLE -DEB_PRECO=on -DEB_METHD="PROJC;RWNAF;LWNAF;INTER" -DEB_MIXED=on -DEB_KBLTZ=on -DEB_ORDIN=off -DEB_SUPER=off -DEC_METHD="CHAR2" -DMD_METHD=SHONE ./CMakeLists.txt

I hope I can get your kind help and support as I am struggling with this issue for more than two weeks 


BR//

Albahri
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130706/c58e3182/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: relic-arm3.cmake
Type: application/octet-stream
Size: 488 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130706/c58e3182/attachment.obj>


More information about the CMake mailing list