pivasoftware / easycwmp

EasyCwmp:
http://www.easycwmp.org/
GNU General Public License v2.0
73 stars 59 forks source link

make error: multiple definition of event_code_array #45

Closed peterbabic closed 3 years ago

peterbabic commented 3 years ago

When building 1.8.6 the build halts with the following error:

Making all in bin
make[1]: Entering directory '/home/peterbabic/Downloads/makepkgs/easycwmp/src/easycwmp-EasyCwmp-1.8.6/bin'
gcc     -D_THREAD_SAFE -D_REENTRANT   -march=x86-64 -mtune=generic -O2 -pipe -fno-plt       -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o easycwmpd ../src/easycwmpd-backup.o ../src/easycwmpd-config.o ../src/easycwmpd-cwmp.o ../src/easycwmpd-digestauth.o ../src/easycwmpd-external.o ../src/easycwmpd-easycwmp.o ../src/easycwmpd-http.o ../src/easycwmpd-json.o ../src/easycwmpd-log.o ../src/easycwmpd-md5.o ../src/easycwmpd-time.o ../src/easycwmpd-ubus.o ../src/easycwmpd-xml.o ../src/easycwmpd-base64.o ../src/easycwmpd-basicauth.o  -luci -lubox -lubus -lmicroxml -lpthread  -lcurl  -ljson-c 
/usr/bin/ld: ../src/easycwmpd-config.o:(.bss+0x20): multiple definition of `event_code_array'; ../src/easycwmpd-backup.o:(.bss+0x20): first defined here
/usr/bin/ld: ../src/easycwmpd-cwmp.o:(.data.rel.local+0xc0): multiple definition of `event_code_array'; ../src/easycwmpd-backup.o:(.bss+0x20): first defined here
/usr/bin/ld: ../src/easycwmpd-easycwmp.o:(.bss+0x0): multiple definition of `event_code_array'; ../src/easycwmpd-backup.o:(.bss+0x20): first defined here
/usr/bin/ld: ../src/easycwmpd-http.o:(.bss+0x20): multiple definition of `event_code_array'; ../src/easycwmpd-backup.o:(.bss+0x20): first defined here
/usr/bin/ld: ../src/easycwmpd-json.o:(.bss+0x0): multiple definition of `event_code_array'; ../src/easycwmpd-backup.o:(.bss+0x20): first defined here
/usr/bin/ld: ../src/easycwmpd-ubus.o:(.bss+0x0): multiple definition of `event_code_array'; ../src/easycwmpd-backup.o:(.bss+0x20): first defined here
/usr/bin/ld: ../src/easycwmpd-xml.o:(.bss+0x0): multiple definition of `event_code_array'; ../src/easycwmpd-backup.o:(.bss+0x20): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:471: easycwmpd] Error 1
make[1]: Leaving directory '/home/peterbabic/Downloads/makepkgs/easycwmp/src/easycwmp-EasyCwmp-1.8.6/bin'
make: *** [Makefile:350: all-recursive] Error 1

I could not find anything about in by searching the web. What steps could be done towards resolving?

vbashkirtsev commented 3 years ago

You just using latest gcc to compile. It did change default to no -fno-common from -fcommon recently. So you need to add: CFLAGS="-fcommon" to your ./configure command line

peterbabic commented 3 years ago

Hello @vbashkirtsev, thank you for the reply.

Frankly, I do not even remember by now what I needed this software for (something about trying to send commands to the TP-link router remotely), but it is most probably solved by some other means. Closing.