Compiling error

bcatalin
Posts: 2
Joined: Sun Nov 22, 2015 9:21 am

Compiling error

Postby bcatalin » 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.

User avatar
rudi ;-)
Posts: 1731
Joined: Fri Nov 13, 2015 3:25 pm

Re: Compiling error

Postby rudi ;-) » Thu Dec 31, 2015 1:12 am

bcatalin wrote: ..
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

there are some undefined references in libc ? Compiling just my libuser.a is fine.
hi
not sure, but a try..
btw, have you add your libuser.a?
think you have a little mistake in 'user' there is missing -l
try again edit your makefile with -luser
and let know, how you get on in this.

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

Who is online

Users browsing this forum: Google [Bot] and 109 guests