Skip to contentSkip to conversation

package/kodi: Link to libiconv when needed

PATCH Applied Bernd Kuhls 3 participants 6 messages May 12, 2024 – Jun 8, 2024 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/kodi: Link to libiconv when needed

Fixes build error

/home/wbx/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-uclibc/12.3.0/../../../../aarch64-buildroot-linux-uclibc/bin/ld:
build/utils/utils.a(CharsetConverter.cpp.o): undefined reference to symbol 'libiconv_open' /home/wbx/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-uclibc/12.3.0/../../../../aarch64-buildroot-linux-uclibc/bin/ld:
/home/wbx/buildroot/output/host/aarch64-buildroot-linux-uclibc/sysroot/usr/lib64/libiconv.so.2:
error adding symbols: DSO missing from command line

reported by Waldemar:
http://lists.busybox.net/pipermail/buildroot/2024-May/690952.html

Reproduced and fixed the build error using this defconfig:

BR2_x86_64=y
BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_PACKAGE_KODI=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_PYTHON3_PY_ONLY=y

---
 package/kodi/kodi.mk | 1 +
 1 file changed, 1 insertion(+)
package/kodi/kodi.mk +1 -0
index 94cab237dc..301330a574 100644
@@ -138,6 +138,7 @@ endif
 KODI_CONF_OPTS += -DCORE_PLATFORM_NAME="$(KODI_CORE_PLATFORM_NAME)"
 
 ifeq ($(BR2_ENABLE_LOCALE),)
+KODI_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-liconv
 KODI_DEPENDENCIES += libiconv
 endif
 
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Bernd, All,

On 2024-05-12 19:51 +0200, Bernd Kuhls spake thusly:

Quoted 37 lines

Fixes build error

/home/wbx/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-uclibc/12.3.0/../../../../aarch64-buildroot-linux-uclibc/bin/ld:
build/utils/utils.a(CharsetConverter.cpp.o): undefined reference to symbol 'libiconv_open' /home/wbx/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-uclibc/12.3.0/../../../../aarch64-buildroot-linux-uclibc/bin/ld:
/home/wbx/buildroot/output/host/aarch64-buildroot-linux-uclibc/sysroot/usr/lib64/libiconv.so.2:
error adding symbols: DSO missing from command line

reported by Waldemar:
http://lists.busybox.net/pipermail/buildroot/2024-May/690952.html

Reproduced and fixed the build error using this defconfig:

BR2_x86_64=y
BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_PACKAGE_KODI=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_PYTHON3_PY_ONLY=y

---
 package/kodi/kodi.mk | 1 +
 1 file changed, 1 insertion(+)
package/kodi/kodi.mk +0 -0
index 94cab237dc..301330a574 100644

package/kodi/kodi.mk endif · line 141

Quoted 4 lines
package/kodi/kodi.mk +1 -0
@@ -138,6 +138,7 @@ endif
 KODI_CONF_OPTS += -DCORE_PLATFORM_NAME="$(KODI_CORE_PLATFORM_NAME)"
 
 ifeq ($(BR2_ENABLE_LOCALE),)
+KODI_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-liconv

I don't understand how this is related: the defconfig you provide in the commit log does _not_ have BR2_ENABLE_LOCALE=y, so it can't exercise this code-path...

Regards,
Yann E. MORIN.

Quoted 10 lines
package/kodi/kodi.mk +0 -0
 KODI_DEPENDENCIES += libiconv
 endif
 
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Bernd, All,

On 2024-05-12 20:07 +0200, Yann E. MORIN spake thusly:

Quoted 1 line

On 2024-05-12 19:51 +0200, Bernd Kuhls spake thusly:

[--SNIP--]

Quoted 7 lines
Quoted 7 lines
package/kodi/kodi.mk +0 -0
index 94cab237dc..301330a574 100644
@@ -138,6 +138,7 @@ endif
 KODI_CONF_OPTS += -DCORE_PLATFORM_NAME="$(KODI_CORE_PLATFORM_NAME)"
 
Quoted 6 lines

package/kodi/kodi.mk endif · line 141

Quoted 2 lines
package/kodi/kodi.mk +1 -0
 ifeq ($(BR2_ENABLE_LOCALE),)
+KODI_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-liconv

I don't understand how this is related: the defconfig you provide in the commit log does _not_ have BR2_ENABLE_LOCALE=y, so it can't exercise this code-path...

Ignore the above, I missed that it is testing agains "empty", i.e. disabled...

Regards,
Yann E. MORIN.

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

A message that is not in the archive (sent off-list or not yet received): ZkEFe-dn3GSQ2bdK__38180.5847677001$1715537302$gmane$org@landeda

#4 lore raw

Am Sun, 12 May 2024 20:07:55 +0200 schrieb Yann E. MORIN:

Quoted 6 lines
Quoted 2 lines

ifeq ($(BR2_ENABLE_LOCALE),)
+KODI_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-liconv

I don't understand how this is related: the defconfig you provide in the commit log does _not_ have BR2_ENABLE_LOCALE=y, so it can't exercise this code-path...

Hi Yann,

the if-clause does not contain the letter "y" ;) Libconv is only needed when locale support is not present.

Regards, bernd

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#5 lore raw
In reply to Bernd Kuhls

Bernd, All,

On 2024-05-12 19:51 +0200, Bernd Kuhls spake thusly:

Quoted 37 lines

Fixes build error

/home/wbx/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-uclibc/12.3.0/../../../../aarch64-buildroot-linux-uclibc/bin/ld:
build/utils/utils.a(CharsetConverter.cpp.o): undefined reference to symbol 'libiconv_open' /home/wbx/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-uclibc/12.3.0/../../../../aarch64-buildroot-linux-uclibc/bin/ld:
/home/wbx/buildroot/output/host/aarch64-buildroot-linux-uclibc/sysroot/usr/lib64/libiconv.so.2:
error adding symbols: DSO missing from command line

reported by Waldemar:
http://lists.busybox.net/pipermail/buildroot/2024-May/690952.html

Reproduced and fixed the build error using this defconfig:

BR2_x86_64=y
BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_PACKAGE_KODI=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_PYTHON3_PY_ONLY=y

---
 package/kodi/kodi.mk | 1 +
 1 file changed, 1 insertion(+)
package/kodi/kodi.mk +0 -0
index 94cab237dc..301330a574 100644

package/kodi/kodi.mk endif · line 141

Quoted 4 lines
package/kodi/kodi.mk +1 -0
@@ -138,6 +138,7 @@ endif
 KODI_CONF_OPTS += -DCORE_PLATFORM_NAME="$(KODI_CORE_PLATFORM_NAME)"
 
 ifeq ($(BR2_ENABLE_LOCALE),)
+KODI_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-liconv

You recently removed an instance of -DCMAKE_EXE_LINKER_FLAG for -latomic, so that would have been OK to re-introduce one here for -liconv.

However, this is not very future-proof, and it would be easy to miss that should we need to introduce other conditional linker flags.

So, instead, I rewrote it like we already did for KODI_C_FLAGS.

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 10 lines
package/kodi/kodi.mk +0 -0
 KODI_DEPENDENCIES += libiconv
 endif
 
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw
In reply to Bernd Kuhls
Quoted 28 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Bernd" == Bernd Kuhls <[email protected]> writes:

Fixes build error /home/wbx/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-uclibc/12.3.0/../../../../aarch64-buildroot-linux-uclibc/bin/ld:
build/utils/utils.a(CharsetConverter.cpp.o): undefined reference to symbol 'libiconv_open' /home/wbx/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-uclibc/12.3.0/../../../../aarch64-buildroot-linux-uclibc/bin/ld:
/home/wbx/buildroot/output/host/aarch64-buildroot-linux-uclibc/sysroot/usr/lib64/libiconv.so.2:
error adding symbols: DSO missing from command line

reported by Waldemar:
http://lists.busybox.net/pipermail/buildroot/2024-May/690952.html

Reproduced and fixed the build error using this defconfig:

BR2_x86_64=y
BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_PACKAGE_KODI=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_PYTHON3_PY_ONLY=y

Quoted 1 line

Committed to 2024.02.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot