akheron / jansson

C library for encoding, decoding and manipulating JSON data
http://www.digip.org/jansson/
Other
3.05k stars 809 forks source link

jansson for Cortex M7 #551

Closed celiajoseph closed 3 years ago

celiajoseph commented 3 years ago

hi ,

i am trying to use jansson for cortex M7 and i have used the following Cflags for installing it.

CFLAGS="-mthumb -mthumb-interwork -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -fomit-frame-pointer -fno-dwarf2-cfi-asm -fno-common -fdata-sections -ffunction-sections -Wall -Wno-strict-aliasing -Wno-unused-parameter -lm"

./configure --prefix="$INSTALL" --build=x86_64-linux --host=arm-none-eabi CC="$CC" --target=arm-none-eabi CFLAGS="$CFLAGS"

This works without any error. But when i run make check i get the following errrors:

make[3]: Entering directory '/home/vagrant/mercury/m7-deps/build/jansson/test/bin' /bin/arm-none-eabi-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src -I../../src -mthumb -mthumb-interwork -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -fomit-frame-pointer -fno-dwarf2-cfi-asm -fno-common -fdata-sections -ffunction-sections -Wall -Wno-strict-aliasing -Wno-unused-parameter -specs=nosys.specs -lm -Wall -Wextra -Wdeclaration-after-statement -Wshadow -Wno-format-truncation -mthumb -mthumb-interwork -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -fomit-frame-pointer -fno-dwarf2-cfi-asm -fno-common -fdata-sections -ffunction-sections -Wall -Wno-strict-aliasing -Wno-unused-parameter -lm -MT json_process.o -MD -MP -MF .deps/json_process.Tpo -c -o json_process.o json_process.c mv -f .deps/json_process.Tpo .deps/json_process.Po /bin/bash ../../libtool --tag=CC --mode=link /bin/arm-none-eabi-gcc -Wall -Wextra -Wdeclaration-after-statement -Wshadow -Wno-format-truncation -mthumb -mthumb-interwork -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -fomit-frame-pointer -fno-dwarf2-cfi-asm -fno-common -fdata-sections -ffunction-sections -Wall -Wno-strict-aliasing -Wno-unused-parameter -lm -static -o json_process json_process.o ../../src/libjansson.la libtool: link: /bin/arm-none-eabi-gcc -Wall -Wextra -Wdeclaration-after-statement -Wshadow -Wno-format-truncation -mthumb -mthumb-interwork -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -fomit-frame-pointer -fno-dwarf2-cfi-asm -fno-common -fdata-sections -ffunction-sections -Wall -Wno-strict-aliasing -Wno-unused-parameter -o json_process json_process.o ../../src/.libs/libjansson.a -lm /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard/libc.a(lib_a-exit.o): in function exit': /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m+dp/hard/newlib/libc/stdlib/../../../../../../../../newlib/libc/stdlib/exit.c:64: undefined reference to_exit' /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard/libc.a(lib_a-fstatr.o): in function _fstat_r': /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m+dp/hard/newlib/libc/reent/../../../../../../../../newlib/libc/reent/fstatr.c:55: undefined reference to_fstat' /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard/libc.a(lib_a-openr.o): in function _open_r': /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m+dp/hard/newlib/libc/reent/../../../../../../../../newlib/libc/reent/openr.c:50: undefined reference to_open' /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard/libc.a(lib_a-sbrkr.o): in function _sbrk_r': /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m+dp/hard/newlib/libc/reent/../../../../../../../../newlib/libc/reent/sbrkr.c:51: undefined reference to_sbrk' /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard/libc.a(lib_a-writer.o): in function _write_r': /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m+dp/hard/newlib/libc/reent/../../../../../../../../newlib/libc/reent/writer.c:49: undefined reference to_write' /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard/libc.a(lib_a-abort.o): in function abort': /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m+dp/hard/newlib/libc/stdlib/../../../../../../../../newlib/libc/stdlib/abort.c:59: undefined reference to_exit' /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard/libc.a(lib_a-closer.o): in function _close_r': /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m+dp/hard/newlib/libc/reent/../../../../../../../../newlib/libc/reent/closer.c:47: undefined reference to_close' /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard/libc.a(lib_a-gettimeofdayr.o): in function _gettimeofday_r': /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m+dp/hard/newlib/libc/reent/../../../../../../../../newlib/libc/reent/gettimeofdayr.c:62: undefined reference to_gettimeofday' /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard/libc.a(lib_a-isattyr.o): in function _isatty_r': /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m+dp/hard/newlib/libc/reent/../../../../../../../../newlib/libc/reent/isattyr.c:52: undefined reference to_isatty' /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard/libc.a(lib_a-lseekr.o): in function _lseek_r': /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m+dp/hard/newlib/libc/reent/../../../../../../../../newlib/libc/reent/lseekr.c:49: undefined reference to_lseek' /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard/libc.a(lib_a-readr.o): in function _read_r': /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m+dp/hard/newlib/libc/reent/../../../../../../../../newlib/libc/reent/readr.c:49: undefined reference to_read' /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard/libc.a(lib_a-signalr.o): in function _kill_r': /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m+dp/hard/newlib/libc/reent/../../../../../../../../newlib/libc/reent/signalr.c:53: undefined reference to_kill' /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard/libc.a(lib_a-signalr.o): in function _getpid_r': /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m+dp/hard/newlib/libc/reent/../../../../../../../../newlib/libc/reent/signalr.c:83: undefined reference to_getpid' collect2: error: ld returned 1 exit status make[3]: [Makefile:347: json_process] Error 1 make[3]: Leaving directory '/home/vagrant/mercury/m7-deps/build/jansson/test/bin' make[2]: [Makefile:476: check-am] Error 2 make[2]: Leaving directory '/home/vagrant/mercury/m7-deps/build/jansson/test/bin' make[1]: [Makefile:567: check-recursive] Error 1 make[1]: Leaving directory '/home/vagrant/mercury/m7-deps/build/jansson/test' make: [Makefile:638: check-recursive] Error 1

Any help on this is appreciated.

celiajoseph commented 3 years ago

i was able to close this issue by using the -specs=nosys.specs flag.