Compiling error
Posted: Tue Dec 29, 2015 3:08 pm
I am trying to compile an application where I am using time functions but I am receiving the following error:
xtensa-esp108-elf-gcc -L/home/catalin/Workspace/ESP32_RTOS_SDK/lib -nostdlib -T/home/catalin/Workspace/ESP32_RTOS_SDK/ld/eagle.pro.v7.ld -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--start-group -lc -lgcc -lhal -lm -lcrypto -lfreertos -llwip -lmain -lnet80211 -lphy -lpp -lrtc -lssl -lwpa user/.output/eagle/debug/lib/libuser.a -Wl,--end-group -o .output/eagle/debug/image/eagle.app.v7.out
/home/catalin/Workspace/ESP32_RTOS_SDK/lib/libc.a(lib_a-time.o):(.literal+0x0): undefined reference to `_gettimeofday_r'
/home/catalin/Workspace/ESP32_RTOS_SDK/lib/libc.a(lib_a-time.o): In function `time':
/home/wjg/Repo/crosstool-NG/.build/src/newlib-2.0.0/newlib/libc/time/time.c:46: undefined reference to `_gettimeofday_r'
/home/catalin/Workspace/ESP32_RTOS_SDK/lib/libc.a(lib_a-signal.o):(.literal+0x0): undefined reference to `_getpid_r'
/home/catalin/Workspace/ESP32_RTOS_SDK/lib/libc.a(lib_a-signal.o):(.literal+0x4): undefined reference to `_kill_r'
/home/catalin/Workspace/ESP32_RTOS_SDK/lib/libc.a(lib_a-signal.o): In function `_raise_r':
/home/wjg/Repo/crosstool-NG/.build/src/newlib-2.0.0/newlib/libc/signal/signal.c:163: undefined reference to `_getpid_r'
/home/wjg/Repo/crosstool-NG/.build/src/newlib-2.0.0/newlib/libc/signal/signal.c:163: undefined reference to `_kill_r'
collect2: error: ld returned 1 exit status
/home/catalin/Workspace/ESP32_RTOS_SDK/Makefile:221: recipe for target '.output/eagle/debug/image/eagle.app.v7.out' failed
make: *** [.output/eagle/debug/image/eagle.app.v7.out] Error 1
there are some undefined references in libc ? Compiling just my libuser.a is fine.
xtensa-esp108-elf-gcc -L/home/catalin/Workspace/ESP32_RTOS_SDK/lib -nostdlib -T/home/catalin/Workspace/ESP32_RTOS_SDK/ld/eagle.pro.v7.ld -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--start-group -lc -lgcc -lhal -lm -lcrypto -lfreertos -llwip -lmain -lnet80211 -lphy -lpp -lrtc -lssl -lwpa user/.output/eagle/debug/lib/libuser.a -Wl,--end-group -o .output/eagle/debug/image/eagle.app.v7.out
/home/catalin/Workspace/ESP32_RTOS_SDK/lib/libc.a(lib_a-time.o):(.literal+0x0): undefined reference to `_gettimeofday_r'
/home/catalin/Workspace/ESP32_RTOS_SDK/lib/libc.a(lib_a-time.o): In function `time':
/home/wjg/Repo/crosstool-NG/.build/src/newlib-2.0.0/newlib/libc/time/time.c:46: undefined reference to `_gettimeofday_r'
/home/catalin/Workspace/ESP32_RTOS_SDK/lib/libc.a(lib_a-signal.o):(.literal+0x0): undefined reference to `_getpid_r'
/home/catalin/Workspace/ESP32_RTOS_SDK/lib/libc.a(lib_a-signal.o):(.literal+0x4): undefined reference to `_kill_r'
/home/catalin/Workspace/ESP32_RTOS_SDK/lib/libc.a(lib_a-signal.o): In function `_raise_r':
/home/wjg/Repo/crosstool-NG/.build/src/newlib-2.0.0/newlib/libc/signal/signal.c:163: undefined reference to `_getpid_r'
/home/wjg/Repo/crosstool-NG/.build/src/newlib-2.0.0/newlib/libc/signal/signal.c:163: undefined reference to `_kill_r'
collect2: error: ld returned 1 exit status
/home/catalin/Workspace/ESP32_RTOS_SDK/Makefile:221: recipe for target '.output/eagle/debug/image/eagle.app.v7.out' failed
make: *** [.output/eagle/debug/image/eagle.app.v7.out] Error 1
there are some undefined references in libc ? Compiling just my libuser.a is fine.