multiple definitions of 'operator|='

ppisljar
Posts: 18
Joined: Wed Feb 22, 2017 4:36 pm

multiple definitions of 'operator|='

Postby ppisljar » Sun Sep 15, 2019 1:50 pm

Recently i installed esp idf on new machine, thus upgraded to latest version with cmake and gcc 8.2.0
however my project now no longer builds. it compiled ok, but when linking i get the following errors:

Code: Select all

/home/user/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/user/esp/esp32ctrl/build/main/libmain.a(c004_timers.o): in function `operator|=':
/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: multiple definition of `operator|='; /home/user/esp/esp32ctrl/build/main/libmain.a(main.o):/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: first defined here
/home/user/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/user/esp/esp32ctrl/build/main/libmain.a(c004_timers.o): in function `operator&=':
/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: multiple definition of `operator&='; /home/user/esp/esp32ctrl/build/main/libmain.a(main.o):/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: first defined here
/home/user/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/user/esp/esp32ctrl/build/main/libmain.a(c004_timers.o): in function `operator^=':
/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: multiple definition of `operator^='; /home/user/esp/esp32ctrl/build/main/libmain.a(main.o):/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: first defined here
/home/user/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/user/esp/esp32ctrl/build/main/libmain.a(c004_timers.o): in function `operator>>=':
/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: multiple definition of `operator>>='; /home/user/esp/esp32ctrl/build/main/libmain.a(main.o):/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: first defined here
/home/user/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/user/esp/esp32ctrl/build/main/libmain.a(c004_timers.o): in function `operator<<=':
/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: multiple definition of `operator<<='; /home/user/esp/esp32ctrl/build/main/libmain.a(main.o):/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: first defined here
/home/user/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/user/esp/esp32ctrl/build/main/libmain.a(p015_dimmer.o): in function `operator|=':
/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: multiple definition of `operator|='; /home/user/esp/esp32ctrl/build/main/libmain.a(main.o):/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: first defined here
/home/user/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/user/esp/esp32ctrl/build/main/libmain.a(p015_dimmer.o): in function `operator&=':
/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: multiple definition of `operator&='; /home/user/esp/esp32ctrl/build/main/libmain.a(main.o):/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: first defined here
/home/user/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/user/esp/esp32ctrl/build/main/libmain.a(p015_dimmer.o): in function `operator^=':
/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: multiple definition of `operator^='; /home/user/esp/esp32ctrl/build/main/libmain.a(main.o):/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: first defined here
/home/user/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/user/esp/esp32ctrl/build/main/libmain.a(p015_dimmer.o): in function `operator>>=':
/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: multiple definition of `operator>>='; /home/user/esp/esp32ctrl/build/main/libmain.a(main.o):/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: first defined here
/home/user/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/user/esp/esp32ctrl/build/main/libmain.a(p015_dimmer.o): in function `operator<<=':
/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: multiple definition of `operator<<='; /home/user/esp/esp32ctrl/build/main/libmain.a(main.o):/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: first defined here
/home/user/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/user/esp/esp32ctrl/build/main/libmain.a(rule_engine.o): in function `operator|=':
/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: multiple definition of `operator|='; /home/user/esp/esp32ctrl/build/main/libmain.a(main.o):/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: first defined here
/home/user/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/user/esp/esp32ctrl/build/main/libmain.a(rule_engine.o): in function `operator&=':
/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: multiple definition of `operator&='; /home/user/esp/esp32ctrl/build/main/libmain.a(main.o):/home/user/esp/esp-idf/components/soc/include/hal/timer_types.h:52: first defined here

i tried googling but couldnt find any relevant information. any idea whats going on ?

ppisljar
Posts: 18
Joined: Wed Feb 22, 2017 4:36 pm

Re: multiple definitions of 'operator|='

Postby ppisljar » Sun Sep 15, 2019 6:22 pm

the code was working with esp-idf 4.0 (with gcc 4.2.0) .... latest version is 4.1 with gcc 8.2.0

ppisljar
Posts: 18
Joined: Wed Feb 22, 2017 4:36 pm

Re: multiple definitions of 'operator|='

Postby ppisljar » Sun Sep 15, 2019 6:23 pm

the code can be seen here https://github.com/ppisljar/esp32ctrl

Who is online

Users browsing this forum: MSN [Bot], programatt and 22 guests