Skip to contentSkip to conversation

package/alsa-utils: Link against libintl if needed

PATCH New Bernd Kuhls 3 participants 3 messages Oct 19, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/alsa-utils: Link against libintl if needed

Fixes
alsamixer-cli.o: In function `main':
cli.c:(.text.startup+0x4d): undefined reference to libintl_textdomain' cli.c:(.text.startup+0xc1): undefined reference to libintl_gettext' cli.c:(.text.startup+0xd5): undefined reference to libintl_gettext' cli.c:(.text.startup+0xe9): undefined reference to libintl_gettext' cli.c:(.text.startup+0x1fd): undefined reference to libintl_gettext' cli.c:(.text.startup+0x223): undefined reference to libintl_gettext' alsamixer-card_select.o:card_select.c:(.text+0xb8): more undefined references to `libintl_gettext' follow
collect2: Fehler: ld gab 1 als Ende-Status zur?ck
make[2]: *** [alsamixer] Fehler 1
make[2]: Leaving directory `/home/fli4l/br4/output/build/alsa-utils-1.0.28/alsamixer'

The build error occured using this minimal defconfig:

BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y
BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y
BR2_TOOLCHAIN_BUILDROOT_INET_RPC=y
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
BR2_PACKAGE_ALSA_UTILS=y
BR2_PACKAGE_ALSA_UTILS_ALSACONF=y
BR2_PACKAGE_ALSA_UTILS_AMIDI=y
BR2_PACKAGE_ALSA_UTILS_AMIXER=y
BR2_PACKAGE_ALSA_UTILS_APLAY=y
BR2_PACKAGE_ALSA_UTILS_IECSET=y
BR2_PACKAGE_ALSA_UTILS_ACONNECT=y
BR2_PACKAGE_ALSA_UTILS_APLAYMIDI=y
BR2_PACKAGE_ALSA_UTILS_ARECORDMIDI=y
BR2_PACKAGE_ALSA_UTILS_ASEQDUMP=y
BR2_PACKAGE_ALSA_UTILS_ASEQNET=y
BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST=y
BR2_PACKAGE_GETTEXT=y
BR2_PACKAGE_NCURSES_WCHAR=y

---
 package/alsa-utils/alsa-utils-0001-libintl.patch |   23 ++++++++++++++++++++++
 package/alsa-utils/alsa-utils.mk                 |    2 ++
 2 files changed, 25 insertions(+)
 create mode 100644 package/alsa-utils/alsa-utils-0001-libintl.patch
package/alsa-utils/alsa-utils-0001-libintl.patch new file +23 -0
new file mode 100644
index 0000000..0562ce8
@@ -0,0 +1,23 @@
+Link against libintl if needed
+
+When built against a C library that has locale support, but for which
+intl support is provided by an external libintl library, alsamixer
+forgets to link against this library, even though the configure script
+properly checks that.
+
+This patch therefore ensure that we link against libintl when needed,
+thanks to the @LIBINTL@ variable provided by the configure script.
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+
+
+diff -uNr alsa-utils-1.0.28.org/alsamixer/Makefile.am alsa-utils-1.0.28/alsamixer/Makefile.am
+--- alsa-utils-1.0.28.org/alsamixer/Makefile.am	2014-06-13 19:21:05.000000000 +0200
++++ alsa-utils-1.0.28/alsamixer/Makefile.am	2014-10-19 13:13:09.333149017 +0200
+@@ -1,5 +1,5 @@
+ AM_CFLAGS = @CURSES_CFLAGS@ -DCURSESINC="@CURSESINC@"
+-LDADD = @CURSESLIB@
++LDADD = @CURSESLIB@ @LIBINTL@
+ 
+ bin_PROGRAMS = alsamixer
+ alsamixer_SOURCES = card_select.c card_select.h \
package/alsa-utils/alsa-utils.mk +2 -0
index 7079361..b69433f 100644
@@ -9,6 +9,8 @@ ALSA_UTILS_SOURCE = alsa-utils-$(ALSA_UTILS_VERSION).tar.bz2
 ALSA_UTILS_SITE = http://alsa.cybermirror.org/utils
 ALSA_UTILS_LICENSE = GPLv2
 ALSA_UTILS_LICENSE_FILES = COPYING
+ALSA_UTILS_AUTORECONF = YES
+ALSA_UTILS_GETTEXTIZE = YES
 ALSA_UTILS_INSTALL_STAGING = YES
 ALSA_UTILS_DEPENDENCIES = host-gettext host-pkgconf alsa-lib \
 	$(if $(BR2_PACKAGE_NCURSES),ncurses)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 package/alsa-utils: Link against libintl if needed

Hi Bernd,

Quoted 11 lines · Bernd Kuhls

Fixes
alsamixer-cli.o: In function `main':
cli.c:(.text.startup+0x4d): undefined reference to libintl_textdomain' cli.c:(.text.startup+0xc1): undefined reference to libintl_gettext' cli.c:(.text.startup+0xd5): undefined reference to libintl_gettext' cli.c:(.text.startup+0xe9): undefined reference to libintl_gettext' cli.c:(.text.startup+0x1fd): undefined reference to libintl_gettext' cli.c:(.text.startup+0x223): undefined reference to libintl_gettext' alsamixer-card_select.o:card_select.c:(.text+0xb8): more undefined references to `libintl_gettext' follow
collect2: Fehler: ld gab 1 als Ende-Status zur?ck
make[2]: *** [alsamixer] Fehler 1

I think English error messages would be more google friendly.

Quoted 65 lines

make[2]: Leaving directory `/home/fli4l/br4/output/build/alsa-utils-1.0.28/alsamixer'

The build error occured using this minimal defconfig:

BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y
BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y
BR2_TOOLCHAIN_BUILDROOT_INET_RPC=y
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
BR2_PACKAGE_ALSA_UTILS=y
BR2_PACKAGE_ALSA_UTILS_ALSACONF=y
BR2_PACKAGE_ALSA_UTILS_AMIDI=y
BR2_PACKAGE_ALSA_UTILS_AMIXER=y
BR2_PACKAGE_ALSA_UTILS_APLAY=y
BR2_PACKAGE_ALSA_UTILS_IECSET=y
BR2_PACKAGE_ALSA_UTILS_ACONNECT=y
BR2_PACKAGE_ALSA_UTILS_APLAYMIDI=y
BR2_PACKAGE_ALSA_UTILS_ARECORDMIDI=y
BR2_PACKAGE_ALSA_UTILS_ASEQDUMP=y
BR2_PACKAGE_ALSA_UTILS_ASEQNET=y
BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST=y
BR2_PACKAGE_GETTEXT=y
BR2_PACKAGE_NCURSES_WCHAR=y

---
 package/alsa-utils/alsa-utils-0001-libintl.patch |   23 ++++++++++++++++++++++
 package/alsa-utils/alsa-utils.mk                 |    2 ++
 2 files changed, 25 insertions(+)
 create mode 100644 package/alsa-utils/alsa-utils-0001-libintl.patch
package/alsa-utils/alsa-utils-0001-libintl.patch new file +23 -0
new file mode 100644
index 0000000..0562ce8
@@ -0,0 +1,23 @@
+Link against libintl if needed
+
+When built against a C library that has locale support, but for which
+intl support is provided by an external libintl library, alsamixer
+forgets to link against this library, even though the configure script
+properly checks that.
+
+This patch therefore ensure that we link against libintl when needed,
+thanks to the @LIBINTL@ variable provided by the configure script.
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+
+
+diff -uNr alsa-utils-1.0.28.org/alsamixer/Makefile.am alsa-utils-1.0.28/alsamixer/Makefile.am
+--- alsa-utils-1.0.28.org/alsamixer/Makefile.am	2014-06-13 19:21:05.000000000 +0200
++++ alsa-utils-1.0.28/alsamixer/Makefile.am	2014-10-19 13:13:09.333149017 +0200
+@@ -1,5 +1,5 @@
+ AM_CFLAGS = @CURSES_CFLAGS@ -DCURSESINC="@CURSESINC@"
+-LDADD = @CURSESLIB@
++LDADD = @CURSESLIB@ @LIBINTL@
+ 
+ bin_PROGRAMS = alsamixer
+ alsamixer_SOURCES = card_select.c card_select.h \
package/alsa-utils/alsa-utils.mk +0 -0
index 7079361..b69433f 100644

package/alsa-utils/alsa-utils.mk ALSA_UTILS_SOURCE = alsa-utils-$(ALSA_UTILS_VERSION).tar.bz2 · line 13

Quoted 5 lines
package/alsa-utils/alsa-utils.mk +2 -0
@@ -9,6 +9,8 @@ ALSA_UTILS_SOURCE = alsa-utils-$(ALSA_UTILS_VERSION).tar.bz2
 ALSA_UTILS_SITE = http://alsa.cybermirror.org/utils
 ALSA_UTILS_LICENSE = GPLv2
 ALSA_UTILS_LICENSE_FILES = COPYING
+ALSA_UTILS_AUTORECONF = YES
+ALSA_UTILS_GETTEXTIZE = YES

Why is this needed?

package/alsa-utils/alsa-utils.mk ALSA_UTILS_SOURCE = alsa-utils-$(ALSA_UTILS_VERSION).tar.bz2 · line 16

Quoted 3 lines
package/alsa-utils/alsa-utils.mk +0 -0
 ALSA_UTILS_INSTALL_STAGING = YES
 ALSA_UTILS_DEPENDENCIES = host-gettext host-pkgconf alsa-lib \
 	$(if $(BR2_PACKAGE_NCURSES),ncurses)

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#2 lore raw

PATCH 1/1 package/alsa-utils: Link against libintl if needed

Baruch, Bernd, All,

On 2014-10-19 16:17 +0300, Baruch Siach spake thusly:

Quoted 13 lines · Bernd Kuhls
Quoted 11 lines

Fixes
alsamixer-cli.o: In function `main':
cli.c:(.text.startup+0x4d): undefined reference to libintl_textdomain' cli.c:(.text.startup+0xc1): undefined reference to libintl_gettext' cli.c:(.text.startup+0xd5): undefined reference to libintl_gettext' cli.c:(.text.startup+0xe9): undefined reference to libintl_gettext' cli.c:(.text.startup+0x1fd): undefined reference to libintl_gettext' cli.c:(.text.startup+0x223): undefined reference to libintl_gettext' alsamixer-card_select.o:card_select.c:(.text+0xb8): more undefined references to `libintl_gettext' follow
collect2: Fehler: ld gab 1 als Ende-Status zur?ck
make[2]: *** [alsamixer] Fehler 1

Quoted 1 line

I think English error messages would be more google friendly.

Indeed. :-)

Quoted 33 lines
Quoted 33 lines
package/alsa-utils/alsa-utils-0001-libintl.patch new file +23 -0
new file mode 100644
index 0000000..0562ce8
@@ -0,0 +1,23 @@
+Link against libintl if needed
+
+When built against a C library that has locale support, but for which
+intl support is provided by an external libintl library, alsamixer
+forgets to link against this library, even though the configure script
+properly checks that.
+
+This patch therefore ensure that we link against libintl when needed,
+thanks to the @LIBINTL@ variable provided by the configure script.
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+
+
+diff -uNr alsa-utils-1.0.28.org/alsamixer/Makefile.am alsa-utils-1.0.28/alsamixer/Makefile.am
+--- alsa-utils-1.0.28.org/alsamixer/Makefile.am	2014-06-13 19:21:05.000000000 +0200
++++ alsa-utils-1.0.28/alsamixer/Makefile.am	2014-10-19 13:13:09.333149017 +0200
+@@ -1,5 +1,5 @@
+ AM_CFLAGS = @CURSES_CFLAGS@ -DCURSESINC="@CURSESINC@"
+-LDADD = @CURSESLIB@
++LDADD = @CURSESLIB@ @LIBINTL@
+ 
+ bin_PROGRAMS = alsamixer
+ alsamixer_SOURCES = card_select.c card_select.h \
package/alsa-utils/alsa-utils.mk +0 -0
index 7079361..b69433f 100644
Quoted 8 lines

package/alsa-utils/alsa-utils.mk ALSA_UTILS_SOURCE = alsa-utils-$(ALSA_UTILS_VERSION).tar.bz2 · line 13

Quoted 6 lines
package/alsa-utils/alsa-utils.mk +2 -0
@@ -9,6 +9,8 @@ ALSA_UTILS_SOURCE = alsa-utils-$(ALSA_UTILS_VERSION).tar.bz2
 ALSA_UTILS_SITE = http://alsa.cybermirror.org/utils
 ALSA_UTILS_LICENSE = GPLv2
 ALSA_UTILS_LICENSE_FILES = COPYING
+ALSA_UTILS_AUTORECONF = YES
+ALSA_UTILS_GETTEXTIZE = YES

Why is this needed?

AUTORECONF is needed because the patch touches a Makefile.am . However, it would be nice to add a comment why.

Ditto for GETTEXTIZE.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'