Skip to contentSkip to conversation

ucarp: fix build error with gcc-10

PATCH Superseded Chen Qi 2 participants 4 messages Sep 23, 2020

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH 1/1 ucarp: fix build error with gcc-10

gcc-10 uses '-fno-common' by default, causing multiple definition error. Use '-fcommon' to fix this problem.

---
 meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb | 3 +++
 1 file changed, 3 insertions(+)
meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb +3 -0
index d17baa0..87e5ada 100644
@@ -37,6 +37,9 @@ SYSTEMD_AUTO_ENABLE = "disable"
 export FETCHCMD_wget = "/usr/bin/env wget --secure-protocol=TLSv1_2 -t 2 -T 30 --passive-ftp --no-check-certificate"
 EXTRA_OECONF += "--sysconfdir=${sysconfdir}/${BPN}"
 
+# Fix build error with gcc-10
+CFLAGS_append = " -fcommon"
+
 # fix the perms for config.rpath
 do_configure_prepend() {
     chmod 755 ${S}/config.rpath
Signature · 1 line
2.17.1
#1 lore raw
Quoted 14 lines · Chen Qi

gcc-10 uses '-fno-common' by default, causing multiple definition error. Use '-fcommon' to fix this problem.

---
 meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb | 3 +++
 1 file changed, 3 insertions(+)
meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb +0 -0
index d17baa0..87e5ada 100644

meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb SYSTEMD_AUTO_ENABLE = "disable" · line 42

Quoted 7 lines
meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb +3 -1
@@ -37,6 +37,9 @@ SYSTEMD_AUTO_ENABLE = "disable"
 export FETCHCMD_wget = "/usr/bin/env wget --secure-protocol=TLSv1_2
-t 2 -T 30 --passive-ftp --no-check-certificate"
 EXTRA_OECONF += "--sysconfdir=${sysconfdir}/${BPN}"
 
+# Fix build error with gcc-10
+CFLAGS_append = " -fcommon"
+

Why are you not patching the source to use "extern" where it is needed, like in pacemaker? How many errors does ucarp give? Then it might also a patch that upstream will take, solving the issue forever in a proper way.

Quoted 5 lines
meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb +0 -0
 # fix the perms for config.rpath
 do_configure_prepend() {
     chmod 755 ${S}/config.rpath
author
#2 lore raw
Quoted 19 lines · Bas Mevissen
Quoted 18 lines · Chen Qi

gcc-10 uses '-fno-common' by default, causing multiple definition error. Use '-fcommon' to fix this problem.

---
 meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb | 3 +++
 1 file changed, 3 insertions(+)
meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb +0 -1
index d17baa0..87e5ada 100644
@@ -37,6 +37,9 @@ SYSTEMD_AUTO_ENABLE = "disable"
 export FETCHCMD_wget = "/usr/bin/env wget --secure-protocol=TLSv1_2
-t 2 -T 30 --passive-ftp --no-check-certificate"
 EXTRA_OECONF += "--sysconfdir=${sysconfdir}/${BPN}"
 
Quoted 7 lines

meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb SYSTEMD_AUTO_ENABLE = "disable" · line 42

Quoted 3 lines
meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb +3 -0
+# Fix build error with gcc-10
+CFLAGS_append = " -fcommon"
+

Why are you not patching the source to use "extern" where it is needed, like in pacemaker? How many errors does ucarp give? Then it might also a patch that upstream will take, solving the issue forever in a proper way.

Could you please send out one?

Quoted 7 lines
Quoted 5 lines
meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb +0 -0
 # fix the perms for config.rpath
 do_configure_prepend() {
     chmod 755 ${S}/config.rpath
#3 lore raw
Quoted 28 lines · ChenQi
Quoted 19 lines · Bas Mevissen
Quoted 18 lines · Chen Qi

gcc-10 uses '-fno-common' by default, causing multiple definition error. Use '-fcommon' to fix this problem.

---
 meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb | 3 +++
 1 file changed, 3 insertions(+)
meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb +0 -1
index d17baa0..87e5ada 100644
@@ -37,6 +37,9 @@ SYSTEMD_AUTO_ENABLE = "disable"
 export FETCHCMD_wget = "/usr/bin/env wget --secure-protocol=TLSv1_2
-t 2 -T 30 --passive-ftp --no-check-certificate"
 EXTRA_OECONF += "--sysconfdir=${sysconfdir}/${BPN}"
 
Quoted 7 lines

meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb SYSTEMD_AUTO_ENABLE = "disable" · line 42

Quoted 3 lines
meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb +3 -0
+# Fix build error with gcc-10
+CFLAGS_append = " -fcommon"
+

Why are you not patching the source to use "extern" where it is needed, like in pacemaker? How many errors does ucarp give? Then it might also a patch that upstream will take, solving the issue forever in a proper way.

Quoted 2 lines

Could you please send out one?

I don't have a tree with this layer in front of me. I just reviewed your proposed fix by setting the compiler flag, while you demonstrated in the pacemaker patch that the issue is easily solved by adding some "exern"s where they need to be. So I wondered why you didn't do that for ucarp.

Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb +0 -0
 # fix the perms for config.rpath
 do_configure_prepend() {
     chmod 755 ${S}/config.rpath