Multiple definition of 'time' in lwip.a and libcirom.a

bzhang222
Posts: 3
Joined: Tue May 23, 2017 11:33 am

Multiple definition of 'time' in lwip.a and libcirom.a

Postby bzhang222 » Sat Jun 17, 2017 2:46 am

when I link in LWIP, I got this build error, looks like the libcirom.a is not built correctly or is there another libcirom.a that works with LWIP?
Thanks
Bill


xtensa-lx106-elf-gcc -L/mnt/Share/espiot2/ESP8266_RTOS_SDK//lib -Wl,--gc-sections -nostdlib -T/mnt/Share/espiot2/ESP8266_RTOS_SDK//ld/eagle.app.v6.ld -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--start-group -lcirom -lmirom -lgcc -lhal -lphy -lpp -lnet80211 -lcrypto -lwpa -lmain -lfreertos -llwip -lssl -ljson -lsmartconfig -lpwm -L./libesphttpd -lesphttpd -lairkiss -lsmartconfig -lespconn -lwebpages-espfs user/.output/eagle/debug/lib/libuser.a driver/.output/eagle/debug/lib/libdriver.a upgrade/.output/eagle/debug/lib/libupgrade.a -Wl,--end-group -o .output/eagle/debug/image/eagle.app.v6.out
/mnt/Share/espiot2/ESP8266_RTOS_SDK//lib/liblwip.a(time.o): In function `time':
(.text.time+0x20): multiple definition of `time'
/mnt/Share/espiot2/ESP8266_RTOS_SDK//lib/libcirom.a(lib_a-time.o):/home/wjg/Repo/esp-open-sdk/crosstool-NG/.build/src/newlib-2.0.0/newlib/libc/time/time.c:43: first defined here

RoySprowl
Posts: 1
Joined: Wed Jul 26, 2017 3:20 am

Re: Multiple definition of 'time' in lwip.a and libcirom.a

Postby RoySprowl » Wed Jul 26, 2017 3:23 am

I ran into the same problem and ended up having to strip the time symbol out of libcirom, which let me link:

echo "Create 'libcirom_stripped' by stripping the duplicate "time()" definition from libcirom.a"
xtensa-lx106-elf-objcopy --strip-symbol=time $ESP8266_RTOS_SDK/lib/libcirom.a $ESP8266_RTOS_SDK/lib/libcirom_stripped.a

Who is online

Users browsing this forum: No registered users and 8 guests