Modify

Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#11829 closed defect (worksforme)

glib2 in trunk not compiling

Reported by: anonymous Owned by: developers
Priority: response-needed Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: glib2 gettext nls Cc:

Description

Starting from approximately r32408 in trunk build process breaks on glib2. Some time earlier everything compiled ok. I didn't change my settings.

It says that gettext is missing, like this:

*** You must have either have gettext support in your C library, or use the
*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html)

backfire doesn't have such problems.

If I specify CONFIG_BUILD_NLS=y then everything compiles ok.
But I don't need full-blown language support.
Please tell what was changed that could break things.

Attachments (3)

config.log1 (74.5 KB) - added by anonymous 6 years ago.
config.log1: build_dir/target-mips_r2_uClibc-0.9.33.2/glib-2.26.1/config.log
config.log2 (340.7 KB) - added by anonymous 6 years ago.
config.log2: build_dir/host/glib-2.26.1/config.log
output.txt (88.6 KB) - added by anonymous 6 years ago.

Download all attachments as: .zip

Change History (21)

comment:1 Changed 6 years ago by jow

  • Priority changed from normal to response-needed

Attach the config.log

Changed 6 years ago by anonymous

config.log1: build_dir/target-mips_r2_uClibc-0.9.33.2/glib-2.26.1/config.log

Changed 6 years ago by anonymous

config.log2: build_dir/host/glib-2.26.1/config.log

comment:2 Changed 6 years ago by anonymous

I'm not sure which config.log you need. So I attached both.
Attached is also the relevant part of output from make V=99

Changed 6 years ago by anonymous

comment:2 Changed 6 years ago by anonymous

I'm not sure which config.log you need. So I attached both.
Attached is also the relevant part of output from make V=99

comment:3 Changed 6 years ago by Andy Leiserson <andy@…>

I got the same error and was able to fix it by making the change below. The source package is named "gettext", but the binary package is called "libintl", so this change makes some amount of sense, but I'm not sure why the dependency on gettext worked before or what is different now.

--- a/include/nls.mk
+++ b/include/nls.mk
@@ -23,7 +23,7 @@
 endif
 
 PKG_CONFIG_DEPENDS += CONFIG_BUILD_NLS
-PKG_BUILD_DEPENDS += !BUILD_NLS:libiconv !BUILD_NLS:gettext
+PKG_BUILD_DEPENDS += !BUILD_NLS:libiconv !BUILD_NLS:libintl
 
 ICONV_DEPENDS:=+BUILD_NLS:libiconv-full
 ICONV_CFLAGS:=-I$(ICONV_PREFIX)/include

comment:4 Changed 6 years ago by anonymous

I found out that problem also goes away if I don't use CONFIG_BUILD_NLS=y and use CONFIG_PACKAGE_libintl-full=m

comment:5 Changed 6 years ago by anonymous

Sorry, it was a wistake (occasionally other setting disabled glib2).
So, setting CONFIG_PACKAGE_libintl-full=m alone without CONFIG_BUILD_NLS=y doesn't make the problem go away.

comment:6 Changed 6 years ago by Andy Leiserson <andy@…>

I tracked the breakage to r32216.

r32216 changed PKG_FIXUP for libiconv-full from "libtool no-autoreconf" to "patch-libtool".

The libtool fixup adds libtool, libintl, and libiconv to PKG_BUILD_DEPENDS.

Prior to r32216, "scripts/feeds install glib2" would install gettext due to the indirect dependency path glib2 -> libiconv-full -> libintl.

Starting with r32216, there is no longer a dependency path from glib2 to libintl.

There is still a dependency path from glib2 to gettext, but it seems scripts/feeds does not install source packages named as dependencies.

I'm not sure whether dependencies on source packages are legal. If they're legal, then scripts/feeds should be changed to handle them correctly. If they're not legal, then include/nls.mk and the glib2 package Makefile should be changed to name "libintl" rather than "gettext" as a dependency.

comment:7 Changed 6 years ago by jow

  • Resolution set to fixed
  • Status changed from new to closed

Dependency corrected in r32665 - thank you!

comment:8 Changed 6 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

I updated sources to r32665, patched glib2/Makefile as you said. Compiled from scratch.
It breaks as before. I ran diff on config.log1, config.log2, output.txt which I attached earlied against their new versions. Diffs show that absolutely nothing changed.

comment:9 Changed 6 years ago by jow

a) there where no changes to the glib2 Makefile
b) the change was not supposed to affect .config - it is a build dependency only
c) for me gettext correctly shows up as compilation prerequisite in tmp/.packagedeps:

$ grep 'packages/glib2/compile += ' tmp/.packagedeps 
$(curdir)/feeds/packages/glib2/compile += $(curdir)/feeds/packages/gettext/compile $(curdir)/feeds/packages/glib2/host/compile $(curdir)/toolchain/compile $(curdir)/zlib/compile $(if $(CONFIG_BUILD_NLS),$(curdir)/feeds/packages/gettext-full/compile) $(if $(CONFIG_BUILD_NLS),$(curdir)/feeds/packages/libiconv-full/compile) $(if $(CONFIG_BUILD_NLS),,$(curdir)/feeds/packages/gettext/compile) $(if $(CONFIG_BUILD_NLS),,$(curdir)/feeds/packages/libiconv/compile)

comment:10 Changed 6 years ago by Andy <andy@…>

You may need to do:

scripts/feeds uninstall glib2
scripts/feeds install glib2

comment:11 Changed 6 years ago by anonymous

I recompiled r32665 from zero (i.e. toolchain and everything) without modifications.

$ grep 'packages/glib2/compile += ' tmp/.packagedeps
$(curdir)/feeds/packages/glib2/compile += $(curdir)/feeds/packages/glib2/host/compile $(curdir)/toolchain/compile $(curdir)/zlib/compile $(if $(CONFIG_BUILD_NLS),$(curdir)/feeds/packages/gettext-full/compile) $(if $(CONFIG_BUILD_NLS),$(curdir)/feeds/packages/libiconv-full/compile) $(if $(CONFIG_BUILD_NLS),,$(curdir)/feeds/packages/libiconv/compile)

So, in comparison with your output this one lacks

$(curdir)/feeds/packages/gettext/compile

and

$(if $(CONFIG_BUILD_NLS),,$(curdir)/feeds/packages/gettext/compile)

comment:12 Changed 6 years ago by Andy <andy@…>

Rebuilding will not install the gettext package if it's not installed.

Besides uninstalling and reinstalling glib2, you could also do "scripts/feeds install gettext".

comment:13 Changed 6 years ago by jow

  • Resolution set to worksforme
  • Status changed from reopened to closed

Exactly. Only a re-checkout and reinstalling of the packages feed will fix it. Merely clean the broken tree and rebuild it will not install them issign dependency from feeds.

comment:14 Changed 6 years ago by anonymous

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Neither uninstalling/reinstalling glib2, nor installing gettext helps. Breaks with the same error.
Please try to build with my settings:

./scripts/feeds update packages
./scripts/feeds install mpd-full
CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx_generic_TLWR1043=y
CONFIG_PACKAGE_block-mount=y
CONFIG_PACKAGE_kmod-fs-ext4=y
CONFIG_PACKAGE_kmod-usb-ohci=y
CONFIG_PACKAGE_kmod-usb-storage=y
CONFIG_PACKAGE_mpd-full=m

But before you configure you also have to apply this patch, otherwise mpd won't be enabled:

diff -ur feeds/packages/sound/mpd/Makefile feeds/packages/sound/mpd/Makefile
--- feeds/packages/sound/mpd/Makefile    2012-06-12 00:13:01.557676158 +0800
+++ feeds/packages/sound/mpd/Makefile    2012-06-12 00:58:00.845674530 +0800
@@ -48,7 +48,7 @@
   TITLE+= (full)
   DEPENDS+= \
     +AUDIO_SUPPORT:alsa-lib \
-    +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg +libid3tag \
+    +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg-full +libid3tag \
     +libmms +libogg +libshout +libsndfile +libvorbis
   PROVIDES:=mpd
   VARIANT:=full

comment:15 Changed 6 years ago by jow

  • Resolution set to worksforme
  • Status changed from reopened to closed

Your dependency change is invalid. "libffmpeg" is a virtual package provided by libffmpeg-mini, libffmpeg-custom or libffmpeg-full, you have to select on of these.

As for the glib2 error, I still cannot reproduce it.

comment:16 Changed 5 years ago by anonymous

"sudo apt-get install gettext" for those who missed it like i did

comment:17 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.