avahi: link with libintl if libglib2 is enabled
PATCH 1/1 avahi: link with libintl if libglib2 is enabled
Fix bug 9341: avahi-utils does not compile with uClibc and libglib2.
--- package/avahi/avahi.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
package/avahi/avahi.mk +3 -1
@@ -168,7 +168,9 @@ endif AVAHI_CONF_ENV += CFLAGS="$(AVAHI_CFLAGS)" -AVAHI_MAKE_OPTS += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl) +# If either locale or libglib2 is defined, avahi needs libintl. +AVAHI_MAKE_OPTS += \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE)$(BR2_PACKAGE_LIBGLIB2),LIBS=-lintl) define AVAHI_USERS avahi -1 avahi -1 * - - -
Signature · 1 line
2.7.4
PATCH 1/1 avahi: link with libintl if libglib2 is enabled
Hello,
package/avahi/avahi.mk endif · line 173
Quoted 12 lines · Johan Oudinet
package/avahi/avahi.mk +3
-1@@ -168,7 +168,9 @@ endif AVAHI_CONF_ENV += CFLAGS="$(AVAHI_CFLAGS)" -AVAHI_MAKE_OPTS += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl) +# If either locale or libglib2 is defined, avahi needs libintl. +AVAHI_MAKE_OPTS += \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE)$(BR2_PACKAGE_LIBGLIB2),LIBS=-lintl)
Hum, I wondering if it wouldn't be nicer to rely on the fact that the Config.in of those packages enable BR2_PACKAGE_GETTEXT when necessary. So maybe we should instead rely on BR2_PACKAGE_GETTEXT=y, with something like:
ifeq ($(BR2_PACKAGE_GETTEXT),y)AVAHI_DEPENDENCIES += gettextAVAHI_MAKE_OPTS += LIBS=-lintl
endif
(and of course, remove the gettext dependency added conditionally on BR2_NEEDS_GETTEXT_IF_LOCALE).
It would be necessary to also test this with musl and glibc configurations, with gettext enabled, to make sure it doesn't break.
And if it works, then we should update the Buildroot manual, which has a section on the gettext integration.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 avahi: link with libintl if libglib2 is enabled
Hi Thomas,
Quoted 26 lines · Thomas Petazzoni
package/avahi/avahi.mk endif · line 173
Quoted 12 lines · Johan Oudinet
package/avahi/avahi.mk +3
-1@@ -168,7 +168,9 @@ endif AVAHI_CONF_ENV += CFLAGS="$(AVAHI_CFLAGS)" -AVAHI_MAKE_OPTS += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl) +# If either locale or libglib2 is defined, avahi needs libintl. +AVAHI_MAKE_OPTS += \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE)$(BR2_PACKAGE_LIBGLIB2),LIBS=-lintl)Hum, I wondering if it wouldn't be nicer to rely on the fact that the Config.in of those packages enable
BR2_PACKAGE_GETTEXTwhen necessary. So maybe we should instead rely on BR2_PACKAGE_GETTEXT=y, with something like:ifeq ($(BR2_PACKAGE_GETTEXT),y)
AVAHI_DEPENDENCIES+= gettextAVAHI_MAKE_OPTS+= LIBS=-lintl
endif
Quoted 9 lines
(and of course, remove the gettext dependency added conditionally on
BR2_NEEDS_GETTEXT_IF_LOCALE).It would be necessary to also test this with musl and glibc configurations, with gettext enabled, to make sure it doesn't break.
And if it works, then we should update the Buildroot manual, which has a section on the gettext integration.
Good idea. I'm trying it and if it works, I'll send a patch serie. One to modify the documentation, and one to update every packet that integrates gettext.
Signature · 1 line
Johan
PATCH 1/1 avahi: link with libintl if libglib2 is enabled
Hello,
Quoted 21 lines · Johan Oudinet
Quoted 21 lines
package/avahi/avahi.mk endif · line 173
Quoted 4 lines
package/avahi/avahi.mk +3
-1-AVAHI_MAKE_OPTS += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl) +# If either locale or libglib2 is defined, avahi needs libintl. +AVAHI_MAKE_OPTS += \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE)$(BR2_PACKAGE_LIBGLIB2),LIBS=-lintl)Hum, I wondering if it wouldn't be nicer to rely on the fact that the Config.in of those packages enable
BR2_PACKAGE_GETTEXTwhen necessary. So maybe we should instead rely on BR2_PACKAGE_GETTEXT=y, with something like:ifeq ($(BR2_PACKAGE_GETTEXT),y)
AVAHI_DEPENDENCIES+= gettextAVAHI_MAKE_OPTS+= LIBS=-lintl
endif(and of course, remove the gettext dependency added conditionally on
BR2_NEEDS_GETTEXT_IF_LOCALE).It would be necessary to also test this with musl and glibc configurations, with gettext enabled, to make sure it doesn't break.
Quoted 6 lines
Quoted 2 lines
And if it works, then we should update the Buildroot manual, which has a section on the gettext integration.
Good idea. I'm trying it and if it works, I'll send a patch serie. One to modify the documentation, and one to update every packet that integrates gettext.
Could you please send the documentation patch alone first, so we can validate the approach (i.e not only me, but also other folks in Buildroot), before you spend time on reworking all the packages. This way, we can all agree on the new approach first.
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 avahi: link with libintl if libglib2 is enabled
Quoted 26 lines · Thomas Petazzoni
Quoted 24 lines · Johan Oudinet
Quoted 23 lines
package/avahi/avahi.mk endif · line 173
Quoted 4 lines
package/avahi/avahi.mk +3
-1-AVAHI_MAKE_OPTS += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl) +# If either locale or libglib2 is defined, avahi needs libintl. +AVAHI_MAKE_OPTS += \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE)$(BR2_PACKAGE_LIBGLIB2),LIBS=-lintl)Hum, I wondering if it wouldn't be nicer to rely on the fact that the Config.in of those packages enable
BR2_PACKAGE_GETTEXTwhen necessary. So maybe we should instead rely on BR2_PACKAGE_GETTEXT=y, with something like:ifeq ($(BR2_PACKAGE_GETTEXT),y)
AVAHI_DEPENDENCIES+= gettextAVAHI_MAKE_OPTS+= LIBS=-lintl
endif(and of course, remove the gettext dependency added conditionally on
BR2_NEEDS_GETTEXT_IF_LOCALE).It would be necessary to also test this with musl and glibc configurations, with gettext enabled, to make sure it doesn't break.
And if it works, then we should update the Buildroot manual, which has a section on the gettext integration.
Quoted 9 lines
Quoted 3 lines
Good idea. I'm trying it and if it works, I'll send a patch serie. One to modify the documentation, and one to update every packet that integrates gettext.
Could you please send the documentation patch alone first, so we can validate the approach (i.e not only me, but also other folks in Buildroot), before you spend time on reworking all the packages. This way, we can all agree on the new approach first.
Sure. However, It does break if I activate gettext with glibc:
----------8<----------8<----------8<----------8<----------8<----------
Quoted 1 line
Quoted 1 line
Quoted 1 line
avahi 0.6.32 Building
PATH="/home/johan/Documents/buildroot/output-glibc/host/bin:/home/johan/Documents/buildroot/output-glibc/host/sbin:/home/johan/Documents/buildroot/output-glibc/host/usr/bin:/home/johan/Documents/buildroot/output-glibc/host/usr/sbin:/home/johan/cov-analysis-linux64-6.6.1/bin:/home/johan/bin:/home/johan/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
/usr/bin/make -j9 LIBS=-lintl -C/home/johan/Documents/buildroot/output-glibc/build/avahi-0.6.32//usr/bin/make all-recursive
Making all in common
make[4]: Nothing to be done for 'all'.
Making all in avahi-common/bin/bash ../libtool --tag=CC --mode=link/home/johan/Documents/buildroot/output-glibc/host/usr/bin/i686-pc-linux-gnu-gcc
-std=gnu99 -I.. '-DDEBUG_TRAP=__asm__("int $3")' -pthread
-DAVAHI_LOCALEDIR=\"/usr/share/locale\" -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -DDISABLE_SYSTEMD
-std=c99 -Wall -W -Wextra -pedantic -pipe -Wformat
-Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal
-Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes
-Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels
-Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align
-Wwrite-strings -fdiagnostics-show-option -Wno-cast-qual
-fno-strict-aliasing -version-info 8:3:5 -o libavahi-common.la
-rpath /usr/lib libavahi_common_la-malloc.lo
libavahi_common_la-address.lo libavahi_common_la-alternative.lo
libavahi_common_la-error.lo libavahi_common_la-strlst.lo
libavahi_common_la-domain.lo libavahi_common_la-timeval.lo
libavahi_common_la-simple-watch.lo libavahi_common_la-thread-watch.lo
libavahi_common_la-rlist.lo libavahi_common_la-utf8.lo
libavahi_common_la-i18n.lo -pthread -lintl
libtool: link: /home/johan/Documents/buildroot/output-glibc/host/usr/bin/i686-pc-linux-gnu-gcc
-std=gnu99 -shared -fPIC -DPIC .libs/libavahi_common_la-malloc.o.libs/libavahi_common_la-address.o.libs/libavahi_common_la-alternative.o.libs/libavahi_common_la-error.o .libs/libavahi_common_la-strlst.o.libs/libavahi_common_la-domain.o .libs/libavahi_common_la-timeval.o.libs/libavahi_common_la-simple-watch.o.libs/libavahi_common_la-thread-watch.o.libs/libavahi_common_la-rlist.o .libs/libavahi_common_la-utf8.o.libs/libavahi_common_la-i18n.o -lintl -pthread -Os -pthread
-pthread -Wl,-soname -Wl,libavahi-common.so.3 -o
.libs/libavahi-common.so.3.5.3/home/johan/Documents/buildroot/output-glibc/host/opt/ext-toolchain/bin/../lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../i686-pc-linux-gnu/bin/ld:
cannot find -lintl
----------8<----------8<----------8<----------8<----------8<----------
However, if I don't manually select the gettext package, it won't be selected and the build is a success. I'm not sure when it makes sense to manually select gettext?
Signature · 1 line
Johan
PATCH 1/1 avahi: link with libintl if libglib2 is enabled
Quoted 32 lines · Johan Oudinet
Quoted 30 lines · Thomas Petazzoni
Quoted 30 lines · Johan Oudinet
Quoted 28 lines
Quoted 28 lines
Quoted 16 lines
Quoted 16 lines
Quoted 5 lines
package/avahi/avahi.mk endif · line 173
Quoted 5 lines
package/avahi/avahi.mk +3
-1-AVAHI_MAKE_OPTS += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl) +# If either locale or libglib2 is defined, avahi needs libintl. +AVAHI_MAKE_OPTS += \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE)$(BR2_PACKAGE_LIBGLIB2),LIBS=-lintl)Hum, I wondering if it wouldn't be nicer to rely on the fact that the Config.in of those packages enable
BR2_PACKAGE_GETTEXTwhen necessary. So maybe we should instead rely on BR2_PACKAGE_GETTEXT=y, with something like:ifeq ($(BR2_PACKAGE_GETTEXT),y)
AVAHI_DEPENDENCIES+= gettextAVAHI_MAKE_OPTS+= LIBS=-lintl
endifQuoted 8 lines
Quoted 8 lines
(and of course, remove the gettext dependency added conditionally on
BR2_NEEDS_GETTEXT_IF_LOCALE).It would be necessary to also test this with musl and glibc configurations, with gettext enabled, to make sure it doesn't break.
And if it works, then we should update the Buildroot manual, which has a section on the gettext integration.
Good idea. I'm trying it and if it works, I'll send a patch serie. One to modify the documentation, and one to update every packet that integrates gettext.
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
Could you please send the documentation patch alone first, so we can validate the approach (i.e not only me, but also other folks in Buildroot), before you spend time on reworking all the packages. This way, we can all agree on the new approach first.
Sure. However, It does break if I activate gettext with glibc:
That was exactly my concern with Thomas's proposal...
I would say: don't touch this now, and schedule it for discussion at the next
BR developer meeting.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
PATCH 1/1 avahi: link with libintl if libglib2 is enabled
Hi,
Arnout Vandecappelle wrote,
Quoted 38 lines · Johan Oudinet
Quoted 37 lines
Quoted 35 lines · Thomas Petazzoni
Quoted 35 lines · Johan Oudinet
Quoted 22 lines
Quoted 22 lines
Quoted 22 lines
Quoted 22 lines
Quoted 5 lines
package/avahi/avahi.mk endif · line 173
Quoted 5 lines
package/avahi/avahi.mk +3
-1-AVAHI_MAKE_OPTS += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl) +# If either locale or libglib2 is defined, avahi needs libintl. +AVAHI_MAKE_OPTS += \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE)$(BR2_PACKAGE_LIBGLIB2),LIBS=-lintl)Hum, I wondering if it wouldn't be nicer to rely on the fact that the Config.in of those packages enable
BR2_PACKAGE_GETTEXTwhen necessary. So maybe we should instead rely on BR2_PACKAGE_GETTEXT=y, with something like:ifeq ($(BR2_PACKAGE_GETTEXT),y)
AVAHI_DEPENDENCIES+= gettextAVAHI_MAKE_OPTS+= LIBS=-lintl
endif(and of course, remove the gettext dependency added conditionally on
BR2_NEEDS_GETTEXT_IF_LOCALE).It would be necessary to also test this with musl and glibc configurations, with gettext enabled, to make sure it doesn't break.
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
And if it works, then we should update the Buildroot manual, which has a section on the gettext integration.
Good idea. I'm trying it and if it works, I'll send a patch serie. One to modify the documentation, and one to update every packet that integrates gettext.
Could you please send the documentation patch alone first, so we can validate the approach (i.e not only me, but also other folks in Buildroot), before you spend time on reworking all the packages. This way, we can all agree on the new approach first.
Quoted 6 lines
Quoted 1 line
Sure. However, It does break if I activate gettext with glibc:
That was exactly my concern with Thomas's proposal...
I would say: don't touch this now, and schedule it for discussion at the next
BR developer meeting.
Just want to mention that I want integrate gettext-tiny into uClibc-ng soon. It is a stub implementation. The existing stub isn't selectable since a while...
https://github.com/rofl0r/gettext-tiny
best regards
Waldemar
PATCH 1/1 avahi: link with libintl if libglib2 is enabled
Hello,
Quoted 5 lines · Waldemar Brodkorb
Just want to mention that I want integrate gettext-tiny into uClibc-ng soon. It is a stub implementation. The existing stub isn't selectable since a while...
Interesting. I once started experimenting a bit with integrating gettext-tiny in Buildroot, but it was not that easy to achieve.
In fact, the problem with gettext is two-fold: it's both the target gettext (i.e libintl) but also the host gettext (for gettext tools) that are annoyingly long to build.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 avahi: link with libintl if libglib2 is enabled
In reply to Arnout VandecappelleHello,
Quoted 3 lines · Arnout Vandecappelle
Quoted 1 line
Sure. However, It does break if I activate gettext with glibc:
That was exactly my concern with Thomas's proposal...
Yes, I also thought about it.
Quoted 2 lines
I would say: don't touch this now, and schedule it for discussion at the next
BR developer meeting.
I don't think we can do that: there is a real build failure today if we don't make a fix.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 avahi: link with libintl if libglib2 is enabled
Quoted 9 lines · Thomas Petazzoni
Hello,
Quoted 2 lines · Arnout Vandecappelle
I would say: don't touch this now, and schedule it for discussion at the next
BR developer meeting.I don't think we can do that: there is a real build failure today if we don't make a fix.
With "don't touch this" I meant: apply this patch the way it is now (using our
traditional approach of adding -lintl), and delay reworking the whole thing until FOSDEM.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
PATCH 1/1 avahi: link with libintl if libglib2 is enabled
In reply to Johan OudinetAm Tue, 18 Oct 2016 16:53:23 +0200 schrieb Johan Oudinet:
Quoted 1 line
Fix bug 9341: avahi-utils does not compile with uClibc and libglib2.
Hi,
please test this patch: http://patchwork.ozlabs.org/patch/774259/
It should not fail with glibc.
Regards, Bernd