View Issue Details

IDProjectCategoryView StatusLast Update
0000451easycwmpBugpublic2022-12-14 20:15
Reportervishnu Assigned To 
PriorityhighSeverityminorReproducibilityalways
Status newResolutionopen 
Summary0000451: Error while building easycwmp on OpenWRT
DescriptionI tried building easycwmp on openwrt but I couldn't compile it.

I followed each steps from https://easycwmp.org/tutorial/

after giving make, I got error at
make[3] -C package/easycwmp compile
ERROR: package/easycwmp failed to build.

make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on

make: *** [/home/vishnu/openwrt/include/toplevel.mk:231: world] Error 1


Kindly help me to resolve.
 
Additional InformationAfter giving make -j1 V=s

home/vishnu/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.3.0_musl/lib/gcc/aarch64-openwrt-linux-musl/11.3.0/../../../../aarch64-openwrt-linux-musl/bin/ld: ../src/easycwmpd-ubus.o:(.bss+0x58): multiple definition of `event_code_array'; ../src/easycwmpd-backup.o:(.bss+0x8): first defined here

/home/vishnu/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.3.0_musl/lib/gcc/aarch64-openwrt-linux-musl/11.3.0/../../../../aarch64-openwrt-linux-musl/bin/ld: ../src/easycwmpd-xml.o:(.bss+0x80): multiple definition of `event_code_array'; ../src/easycwmpd-backup.o:(.bss+0x8): first defined here

collect2: error: ld returned 1 exit status

make[5]: *** [Makefile:458: easycwmpd] Error 1

make[5]: Leaving directory '/home/vishnu/openwrt/build_dir/target-aarch64_cortex-a53_musl/easycwmp/easycwmp-1.8.6/bin'

make[4]: *** [Makefile:353: all-recursive] Error 1

make[4]: Leaving directory '/home/vishnu/openwrt/build_dir/target-aarch64_cortex-a53_musl/easycwmp/easycwmp-1.8.6'

make[3]: *** [Makefile:110: /home/vishnu/openwrt/build_dir/target-aarch64_cortex-a53_musl/easycwmp/easycwmp-1.8.6/.built] Error 2

make[3]: Leaving directory '/home/vishnu/openwrt/package/easycwmp'

time: package/easycwmp/compile#1.77#0.14#1.98

    ERROR: package/easycwmp failed to build.

make[2]: *** [package/Makefile:116: package/easycwmp/compile] Error 1

make[2]: Leaving directory '/home/vishnu/openwrt'

make[1]: *** [package/Makefile:110: /home/vishnu/openwrt/staging_dir/target-aarch64_cortex-a53_musl/stamp/.package_compile] Error 2

make[1]: Leaving directory '/home/vishnu/openwrt'

make: *** [/home/vishnu/openwrt/include/toplevel.mk:231: world] Error 2
TagsOpenwrt, patch-available, ubuntu
e-mail notification

Activities

hmh

2022-12-14 20:11

reporter   ~0001051

Patch is simple:

--- a/src/cwmp.h
+++ b/src/cwmp.h
@@ -142,7 +142,7 @@ struct cwmp_internal {
};

extern struct cwmp_internal *cwmp;
-struct event_code event_code_array[__EVENT_MAX];
+extern struct event_code event_code_array[__EVENT_MAX];

static void cwmp_periodic_inform(struct uloop_timeout *timeout);
static void cwmp_do_inform(struct uloop_timeout *timeout);

hmh

2022-12-14 20:13

reporter   ~0001052

Note: easycwmp build is actually broken on gcc10+ and likely non-ancient clang because of this issue, really. It is not specific to OpenWRT at all.

And I wish I could attach proper patches as I could before. Oh well.

I looked, and there is a PR pending with this very same fix in github as well.

Issue History

Date Modified Username Field Change
2022-12-06 19:11 vishnu New Issue
2022-12-06 19:11 vishnu Tag Attached: Openwrt
2022-12-06 19:11 vishnu Tag Attached: ubuntu
2022-12-14 20:11 hmh Note Added: 0001051
2022-12-14 20:13 hmh Note Added: 0001052
2022-12-14 20:15 hmh Tag Attached: patch-available