Skip to contentSkip to conversation

gcc-target.inc: Add RPROVIDES to resolve gcc-symlinks & lib32-gcc-symlinks file conflicts

PATCH In review [email protected] 3 participants 3 messages Sep 19, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gcc-target.inc: Add RPROVIDES to resolve gcc-symlinks & lib32-gcc-symlinks file conflicts

From: Deepthi Hemraj <[email protected]>

Enabling multilib support and adding both lib32-gcc-symlinks and gcc-symlinks
to the image installation results in a conflict between
gcc-symlinks-13.3.0-r0.corei7_64 and lib32-gcc-symlinks-13.3.0-r0.corei7_32.
Following error occurs because of the conflict:
"file /usr/bin/gcc conflicts between attempted installs of gcc-symlinks-13.3.0-r0.corei7_64 and lib32-gcc-symlinks-13.3.0-r0.corei7_32"

The conflict occurs because both packages try to install files in the same location, causing installation errors during the build process.

By using the RPROVIDES, gcc package can satisfy the dependencies for both gcc-symlinks and lib32-gcc-symlinks. This prevents the conflict, while ensuring that both 32-bit and 64-bit symlink packages can co-exist.

---
 meta/recipes-devtools/gcc/gcc-target.inc | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-devtools/gcc/gcc-target.inc +1 -0
index 7dac3ef422..f31ea15740 100644
@@ -27,6 +27,7 @@ EXTRA_OECONF:append:x86-64:class-target = " ${@get_gcc_x86_64_arch_setting(bb, d
 export gcc_cv_objdump = "${TARGET_PREFIX}objdump"
 
 EXTRA_OECONF_GCC_FLOAT = "${@get_gcc_float_setting(bb, d)}"
+RPROVIDES:${PN} += "gcc-symlinks lib32-gcc-symlinks"
 
 PACKAGES = "\
     ${PN} ${PN}-plugins ${PN}-symlinks \
Signature · 1 line
2.43.0
#1 lore raw
Quoted 24 lines · Deepthi via lists.openembedded.org

From: Deepthi Hemraj <[email protected]>

Enabling multilib support and adding both lib32-gcc-symlinks and gcc-symlinks
to the image installation results in a conflict between
gcc-symlinks-13.3.0-r0.corei7_64 and lib32-gcc-symlinks-13.3.0-r0.corei7_32.
Following error occurs because of the conflict:
"file /usr/bin/gcc conflicts between attempted installs of gcc-symlinks-13.3.0-r0.corei7_64 and lib32-gcc-symlinks-13.3.0-r0.corei7_32"

The conflict occurs because both packages try to install files in the same location, causing installation errors during the build process.

By using the RPROVIDES, gcc package can satisfy the dependencies for both gcc-symlinks and lib32-gcc-symlinks. This prevents the conflict, while ensuring that both 32-bit and 64-bit symlink packages can co-exist.

---
 meta/recipes-devtools/gcc/gcc-target.inc | 1 +

 1 file changed, 1 insertion(+)
meta/recipes-devtools/gcc/gcc-target.inc +0 -0
index 7dac3ef422..f31ea15740 100644
@@ -27,6 +27,7 @@ EXTRA_OECONF:append:x86-64:class-target = " ${@get_gcc_x86_64_arch_setting(bb, d
Quoted 8 lines

 export gcc_cv_objdump = "${TARGET_PREFIX}objdump"
 EXTRA_OECONF_GCC_FLOAT = "${@get_gcc_float_setting(bb, d)}" +RPROVIDES:${PN} += "gcc-symlinks lib32-gcc-symlinks"
 PACKAGES = "\
     ${PN} ${PN}-plugins ${PN}-symlinks \

This isn't correct. What if my multilib was "lib64" or something else? This definitely can't be hardcoded like that.

Cheers,

Richard

#2 lore raw
Quoted 27 lines · Richard Purdie
Quoted 26 lines · Deepthi via lists.openembedded.org

From: Deepthi Hemraj<[email protected]>

Enabling multilib support and adding both lib32-gcc-symlinks and gcc-symlinks
to the image installation results in a conflict between
gcc-symlinks-13.3.0-r0.corei7_64 and lib32-gcc-symlinks-13.3.0-r0.corei7_32.
Following error occurs because of the conflict:
"file /usr/bin/gcc conflicts between attempted installs of gcc-symlinks-13.3.0-r0.corei7_64 and lib32-gcc-symlinks-13.3.0-r0.corei7_32"

The conflict occurs because both packages try to install files in the same location, causing installation errors during the build process.

By using the RPROVIDES, gcc package can satisfy the dependencies for both gcc-symlinks and lib32-gcc-symlinks. This prevents the conflict, while ensuring that both 32-bit and 64-bit symlink packages can co-exist.

---
  meta/recipes-devtools/gcc/gcc-target.inc | 1 +
  1 file changed, 1 insertion(+)
meta/recipes-devtools/gcc/gcc-target.inc +0 -0
index 7dac3ef422..f31ea15740 100644
@@ -27,6 +27,7 @@ EXTRA_OECONF:append:x86-64:class-target = " ${@get_gcc_x86_64_arch_setting(bb, d
  export gcc_cv_objdump = "${TARGET_PREFIX}objdump"
 
Quoted 8 lines

meta/recipes-devtools/gcc/gcc-target.inc EXTRA_OECONF:append:x86-64:class-target = " ${@get_gcc_x86_64_arch_setting(bb, d · line 33

Quoted 6 lines
meta/recipes-devtools/gcc/gcc-target.inc +1 -0
  EXTRA_OECONF_GCC_FLOAT = "${@get_gcc_float_setting(bb, d)}"
+RPROVIDES:${PN} += "gcc-symlinks lib32-gcc-symlinks"
 
  PACKAGES = "\
      ${PN} ${PN}-plugins ${PN}-symlinks \

This isn't correct. What if my multilib was "lib64" or something else? This definitely can't be hardcoded like that.

I should have caught that when Deepthi showed me the draft.

Also, please submit to the master branch first, then backport to scarthgap if the commit is merged to master.

../Randy

Quoted 4 lines

Cheers,

Richard

Signature · 2 lines
# Randy MacLeod
# Wind River Linux