Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 417043 - app-text/fbreader-0.12.10 and 0.99.1 fail to build: "fatal error: glib.h: No such file or directory" via fribidi header file
Summary: app-text/fbreader-0.12.10 and 0.99.1 fail to build: "fatal error: glib.h: No ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 4 votes (vote)
Assignee: Alexey Shvetsov
URL:
Whiteboard:
Keywords:
: 424163 432352 434066 435160 (view as bug list)
Depends on:
Blocks: 431244
  Show dependency tree
 
Reported: 2012-05-22 09:17 UTC by Nikoli
Modified: 2012-12-01 12:18 UTC (History)
30 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (fbreader-0.12.10_build.log,19.77 KB, text/plain)
2012-05-22 09:17 UTC, Nikoli
Details
improved ebuild patch (fbreader.patch,963 bytes, patch)
2012-06-15 14:09 UTC, Maxim Kammerer
Details | Diff
patch for ebuild, works fine for me (fbreader-0.12.10.ebuild.patch,1.37 KB, patch)
2012-06-16 09:45 UTC, Nikoli
Details | Diff
fbreader-0.12.10.ebuild.diff (fbreader-0.12.10.ebuild.diff,1.96 KB, patch)
2012-07-05 03:27 UTC, Stefan Kuhn
Details | Diff
fbreader-0.12.10.ebuild.diff (fbreader-0.12.10.ebuild.diff,1.76 KB, patch)
2012-07-05 21:41 UTC, Stefan Kuhn
Details | Diff
fix (fbreader-0.12.10.patch,608 bytes, patch)
2012-09-24 16:38 UTC, Gordienko Oleg
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikoli 2012-05-22 09:17:38 UTC
Created attachment 312643 [details]
build.log

After some updates I am not able to rebuild app-text/fbreader-0.12.10:
Compiling ZLTextParagraphCursor.o ...In file included from /usr/include/fribidi/fribidi.h:35:0,
                 from ZLTextParagraphBuilder.h:26,
                 from ZLTextParagraphCursor.cpp:26:
/usr/include/fribidi/fribidi-common.h:65:20: fatal error: glib.h: No such file or directory
compilation terminated.
make[2]: *** [ZLTextParagraphCursor.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/app-text/fbreader-0.12.10/work/fbreader-0.12.10/zlibrary/text/src/area'
make[1]: *** [.objects] Error 1
make[1]: Leaving directory `/var/tmp/portage/app-text/fbreader-0.12.10/work/fbreader-0.12.10/zlibrary/text'
make: *** [all] Error 1



Portage 2.1.10.49 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.14.1-r3, 3.3.5-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
Timestamp of tree: Tue, 22 May 2012 07:45:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r1
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo nikoli
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -mtune=generic -mavx -maes -mpclmul -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -mtune=generic -mavx -maes -mpclmul -O2 -pipe"
DISTDIR="/var/package-manager/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS=""
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="ru en"
MAKEOPTS="-j9"
PKGDIR="/var/package-manager/packages/corei7-avx"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR="/var/package-manager/portage"
PORTDIR_OVERLAY="/var/lib/layman/nikoli"
USE="X a52 aac acl acpi aes-ni akonadi alsa amd64 amr atm audiofile avx bash-completion bluetooth bzip2 cairo caps cdda cddb cdio cdparanoia cdr celt cli consolekit cracklib crypt css cups cxx dbus djvu dri dts dv dvd dvdr emboss encode exif fat ffmpeg firefox flac fluidsynth fontconfig fortran gd geoip gif gimp gmp gnutls gphoto2 gpm graphviz gsm gstreamer gtk handbook iconv icu id3tag idn ilbc imagemagick imap imlib ios ipod ipv6 jbig jpeg jpeg2k kde kipi kontact lame laptop lcms libnotify libproxy libsamplerate lm_sensors lzma lzo mac mad matroska mikmod mmx mmxext mng modplug modules mp3 mp4 mpeg mtp mudflap multilib musepack musicbrainz ncurses networkmanager nls nptl nptlonly ntfs ogg openal openexr opengl openmp pam pango pcre pdf pg-intdatetime phonon plasma pm-utils png policykit ppds pppd qt3support qt4 quicktime rar raw readline reiserfs replaygain rtmp sasl scanner schroedinger semantic-desktop session sid smp sndfile socks5 speex spell sqlite sse sse2 sse3 sse4_1 ssl ssse3 startup-notification svg symlink sysfs taglib theora threads thumbnail tiff truetype tta udev udisks unicode upnp upower usb v4l v4l2 vaapi vcd vdpau vorbis vpx wavpack webkit webp wifi wma wmf wps wxwidgets x264 xattr xcb xcomposite xface xinerama xml xmp xorg xpm xscreensaver xulrunner xv xvid xz zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="*" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru en" NGINX_MODULES_HTTP="access auth_basic autoindex fastcgi gzip rewrite" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon r600 vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

app-text/fbreader-0.12.10 was built with the following:
USE="(multilib) qt4 test -debug -gtk"
Comment 1 Alexey Shvetsov archtester gentoo-dev 2012-05-22 09:30:40 UTC
Looks like fribidi is br0ken so reassigning to fribidi maintainer
Comment 2 Nikoli 2012-05-22 09:32:54 UTC
bug 417041 may be related
Comment 3 Marien Zwart (RETIRED) gentoo-dev 2012-06-02 12:39:44 UTC
This isn't fribidi's fault, as far as I can tell. pkg-config --cflags fribidi gives me this:

-I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  

and the glib.h fribidi is trying to include is in one of those paths. fbreader just isn't paying attention to fribidi's pkg-config (or to user CFLAGS).

I've worked around this in fbreader by adding the following horrible sed to src_prepare:

sed -i -e "/^CFLAGS = / s/$/ \$(shell pkg-config --cflags fribidi) ${CFLAGS}/" makefiles/arch/desktop.mk

which appends fribidi's required CFLAGS to the flags fbreader uses, and then appends the user's CFLAGS to that for good measure. This built me a working fbreader.

fbreader not using fribidi's pkg-config file should probably be reported upstream (it gets this right for other libraries it uses). Fixing the user CFLAGS thing in gentoo would be nice, too.
Comment 4 Leho Kraav (:macmaN @lkraav) 2012-06-08 11:28:07 UTC
Horrible or not, it got the build done :>
Comment 5 Maxim Kammerer 2012-06-15 14:09:29 UTC
Created attachment 315415 [details, diff]
improved ebuild patch

A slightly less ugly ebuild patch:

1. pkg-config is executed at makefile patch time, and won't be run on each makefile .o rule
2. makefiles/config.mk seems like the place where CFLAGS/LDFLAGS customizations should go
3. CXXFLAGS is taken from portage environment instead of CFLAGS
4. LDFLAGS is also taken from portage environment
5. FBReader's release "-O3" is replaced with portage CXXFLAGS (I observed difference of ~40% in final executable size).

So this patch combines using portage's CXXFLAGS/LDFLAGS (should probably stay) and the pkg-config hack (should be fixed by upstream).

Easy way to see the actual flags:

ebuild /usr/portage/app-text/fbreader/fbreader-0.12.10.ebuild prepare
make -n -C /var/tmp/portage/app-text/fbreader-0.12.10/work/fbreader-0.12.10
Comment 6 Maxim Kammerer 2012-06-15 14:20:29 UTC
(In reply to comment #5)
> 4. LDFLAGS is also taken from portage environment

Small comment -- LDFLAGS was probably also taken from the environment previously, but my patch interferes less with FBReader's makefiles, I think (no need to remove direct LDFLAGS assignments).
Comment 7 Nikoli 2012-06-16 09:45:45 UTC
Created attachment 315483 [details, diff]
patch for ebuild, works fine for me

Maxim, thanks for patch, it works, but has missing pkgconfig DEPEND.
Comment 8 madcabbit 2012-06-27 01:53:59 UTC
I'm also having the same problem, with it breaking at the same point not finding glib.h.
Comment 9 Stefan Kuhn 2012-07-05 01:56:58 UTC
Bug #424163 is a duplicate of this.
Comment 10 Stefan Kuhn 2012-07-05 03:27:04 UTC
Created attachment 317204 [details, diff]
fbreader-0.12.10.ebuild.diff

Bug #417043 is a duplicate of this, my patch is based  on its comment 7 and the diff
by Nikoli.
His patch did not work with "debug" flag enabled, I mainly improved that and ran
some tests on minimal VMs.

Changes:
--------
1. virtual/pkconfig to DEPEND
2. src_prepare(): Improved patching of LDFLAGS/CFFLAGS
3. virtual/jpeg to DEPEND and RDEPEND.
4. Resorted dependencies alphabetically

#3 is not related to this bug, but fbreader won't compile without. It will run
without but images in books will then be missing.
#4 is just a cleanup, sorry if that makes the diff harder to read.

Effect:
-------
fbreader compiles and runs (buggy, see below).
qt4: Chinese (?) symbols show in catalog view, might be due to working fribidi.
gtk: The Chinese symbols are not displayed correctly, did not find out why.

Tested:
-------
"emerge test": amd64 and x86
On minimal VM (X, xterm, twm, ...) - Successfully emerged the following flag combinations:
-debug gtk -qt4
debug gtk -qt4
-debug -gtk qt4
debug -gtk qt4

"visual test": amd64 and x86
Started fbreader with each gtk and qt4, without debug flag.
gtk did not display some Chinese symbols, which qt4 did.
Otherwise all combinations of x86/amd64/gtk/qt4 were the same.

Why is this stable?
-------------------
Personal opinion! I don't see why fbreader is stable. Running it is a pain, on both
test-VMs and on my own box.
1)	About 1/5 of book downloads successfull!
2)	Throws messages at user: Error here, Failed to there. In catalog view it
	often works despite these, but not always.
3)	Ignoring all CFLAGS, CXXFLAGS and CPPFLAGS ...
4)	Makefile: "make -jX" with X>1 throws many of these warnings:
	jobserver unavailable: using -j1.  Add `+' to parent make rule
Comment 11 Stefan Kuhn 2012-07-05 21:41:07 UTC
Created attachment 317360 [details, diff]
fbreader-0.12.10.ebuild.diff

The mentioned errors happened when browsing online catalogue.
These changes should fix this.

Changes:
--------
1. net-misc/curl[threads] to R/DEPEND
2. gtk? ( x11-libs/gdk-pixbuf[jpeg] ) to DEPEND
2.b) removed virtual/jpeg from DEPEND again
3. removed -O0 -g when using debug flag3.

#1 gets rid of most errors when browsing catalogue and downloading.
#2 is an improvement, this not only makes fbreader compile with gtk, but also
shows images in ebooks.

Effect:
-------
Most download errors vanish, some timeout are probably due server-side.
Images are displazed with gtk (not Chinese characters)

Tested: amd64, x86
-------

ToDo:
-----
- Displaying chinese characters with gtk does not work
- Downloading Chinese books does not work
(Russian works well)

With these changes I have to revert my opinion and would call fbreader stable.
Comment 12 Johannes Huber (RETIRED) gentoo-dev 2012-07-08 22:56:05 UTC
*** Bug 424163 has been marked as a duplicate of this bug. ***
Comment 13 Joaquim Uchoa 2012-08-08 01:40:22 UTC
There is a new version (0.99.1) in fbreader site. Maybe a new try with this new version???
Comment 14 kermit.mei 2012-08-19 02:16:52 UTC
I use Gentoo AMD64, and I just made a patch for the source code: fbreader-sources-0.12.10.tgz. The patch is like this:
=====================================================
=====================================================
$ cat fbreader-0.12.10-gentoo-r1.patch 
diff --git a/fbreader/src/library/Library.cpp b/fbreader/src/library/Library.cpp
index ad1e4ec..844905c 100644
--- a/fbreader/src/library/Library.cpp
+++ b/fbreader/src/library/Library.cpp
@@ -39,7 +39,7 @@
 shared_ptr<Library> Library::ourInstance;
 const size_t Library::MaxRecentListSize = 10;
 
-Library &Library::Instance() {
+Library::Library &Library::Instance() {
 	if (ourInstance.isNull()) {
 		ourInstance = new Library();
 	}
diff --git a/makefiles/config.mk b/makefiles/config.mk
index aa9a187..84ad7d6 100644
--- a/makefiles/config.mk
+++ b/makefiles/config.mk
@@ -21,7 +21,7 @@ XML_LIBS ?= -lexpat
 ARCHIVER_LIBS ?= -lz -lbz2
 NETWORK_LIBS ?= -lcurl
 
-CFLAGS += -DINSTALLDIR=\"$(INSTALLDIR_MACRO)\" -DBASEDIR=\"$(SHAREDIR_MACRO)\" -DLIBDIR=\"$(LIBDIR_MACRO)\" -DIMAGEDIR=\"$(IMAGEDIR_MACRO)\" -DAPPIMAGEDIR=\"$(APPIMAGEDIR_MACRO)\" -DVERSION=\"$(VERSION)\" -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
+CFLAGS += -DINSTALLDIR=\"$(INSTALLDIR_MACRO)\" -DBASEDIR=\"$(SHAREDIR_MACRO)\" -DLIBDIR=\"$(LIBDIR_MACRO)\" -DIMAGEDIR=\"$(IMAGEDIR_MACRO)\" -DAPPIMAGEDIR=\"$(APPIMAGEDIR_MACRO)\" -DVERSION=\"$(VERSION)\"
 ifeq "$(ZLSHARED)" "yes"
   CFLAGS += -fPIC -DZLSHARED
 endif
=============================================
=============================================

I know not how to make a ebuild patch for it, so I just install it with the source code, it works OK for me.
Hope the offical update will be OK.

B.R
Kermit
Comment 15 Markos Chandras (RETIRED) gentoo-dev 2012-08-22 12:03:30 UTC
(In reply to comment #14)
> I use Gentoo AMD64, and I just made a patch for the source code:
> fbreader-sources-0.12.10.tgz. The patch is like this:
> =====================================================
> =====================================================
> $ cat fbreader-0.12.10-gentoo-r1.patch 
> diff --git a/fbreader/src/library/Library.cpp
> b/fbreader/src/library/Library.cpp
> index ad1e4ec..844905c 100644
> --- a/fbreader/src/library/Library.cpp
> +++ b/fbreader/src/library/Library.cpp
> @@ -39,7 +39,7 @@
>  shared_ptr<Library> Library::ourInstance;
>  const size_t Library::MaxRecentListSize = 10;
>  
> -Library &Library::Instance() {
> +Library::Library &Library::Instance() {
>  	if (ourInstance.isNull()) {
>  		ourInstance = new Library();
>  	}
> diff --git a/makefiles/config.mk b/makefiles/config.mk
> index aa9a187..84ad7d6 100644
> --- a/makefiles/config.mk
> +++ b/makefiles/config.mk
> @@ -21,7 +21,7 @@ XML_LIBS ?= -lexpat
>  ARCHIVER_LIBS ?= -lz -lbz2
>  NETWORK_LIBS ?= -lcurl
>  
> -CFLAGS += -DINSTALLDIR=\"$(INSTALLDIR_MACRO)\"
> -DBASEDIR=\"$(SHAREDIR_MACRO)\" -DLIBDIR=\"$(LIBDIR_MACRO)\"
> -DIMAGEDIR=\"$(IMAGEDIR_MACRO)\" -DAPPIMAGEDIR=\"$(APPIMAGEDIR_MACRO)\"
> -DVERSION=\"$(VERSION)\" -I/usr/include/glib-2.0
> -I/usr/lib64/glib-2.0/include
> +CFLAGS += -DINSTALLDIR=\"$(INSTALLDIR_MACRO)\"
> -DBASEDIR=\"$(SHAREDIR_MACRO)\" -DLIBDIR=\"$(LIBDIR_MACRO)\"
> -DIMAGEDIR=\"$(IMAGEDIR_MACRO)\" -DAPPIMAGEDIR=\"$(APPIMAGEDIR_MACRO)\"
> -DVERSION=\"$(VERSION)\"
>  ifeq "$(ZLSHARED)" "yes"
>    CFLAGS += -fPIC -DZLSHARED
>  endif
> =============================================
> =============================================
> 
> I know not how to make a ebuild patch for it, so I just install it with the
> source code, it works OK for me.
> Hope the offical update will be OK.
> 
> B.R
> Kermit

Hi,
Please send this patch upstream as well. Thanks
Comment 16 Johannes Huber (RETIRED) gentoo-dev 2012-08-22 22:34:09 UTC
*** Bug 432352 has been marked as a duplicate of this bug. ***
Comment 17 Yanestra 2012-08-24 19:27:11 UTC
Is there any problem applying one of the suggested patches to the portage tree? Finally? It gets disgusting after some weeks, you know?

As it appears to me, it's a Gentoo problem, not upstream's. So finally, action please.
Comment 18 Markos Chandras (RETIRED) gentoo-dev 2012-08-24 20:11:21 UTC
(In reply to comment #17)
> Is there any problem applying one of the suggested patches to the portage
> tree? Finally? It gets disgusting after some weeks, you know?
> 
> As it appears to me, it's a Gentoo problem, not upstream's. So finally,
> action please.

yes sir
Comment 19 Yanestra 2012-09-04 14:25:47 UTC
No Sir.

It still doesn't work. It looks like I am going for another distribution, since Gentoo developers...

Long time fruitless discussion, like so many.
Comment 20 Michael Palimaka (kensington) gentoo-dev 2012-09-04 16:45:16 UTC
This is fixed in 0.99.1, thanks Alexey.

  04 Sep 2012; Alexey Shvetsov <alexxy@gentoo.org> +fbreader-0.99.1.ebuild:
  [app-text/fbreader] Version bump. Thanks to yury Puhalsky
Comment 21 Markos Chandras (RETIRED) gentoo-dev 2012-09-04 17:08:02 UTC
(In reply to comment #20)
> This is fixed in 0.99.1, thanks Alexey.
> 
>   04 Sep 2012; Alexey Shvetsov <alexxy@gentoo.org> +fbreader-0.99.1.ebuild:
>   [app-text/fbreader] Version bump. Thanks to yury Puhalsky

<sarcasm> I wonder if that will make Yanestra keep Gentoo</sarcasm>

Thank you Michael
Comment 22 Marien Zwart (RETIRED) gentoo-dev 2012-09-04 19:15:04 UTC
fbreader-0.99.1 still fails to build for me, with the same failure as the original bug description has ("/usr/include/fribidi/fribidi-common.h:65:20: fatal error: glib.h: No such file or directory"). Reopening. Note I'm trying to build the gtk frontend. If you need a full build log or the like just prod me (here or on freenode).

Also, user C(XX)FLAGS are apparently still ignored, as adding the output of "pkg-config --cflags fribidi" to both CFLAGS and CXXFLAGS still got me the same failure. I've put my horrible sed from comment #3 back in for now to get it to build, but fixing this properly would be nice.

Are you in touch with upstream? This shouldn't be that hard for them to fix there: they're already using pkg-config for a few other things. It'd be nice to get one of the more complete fixes mentioned on this bug in gentoo in the mean time.
Comment 23 Michael Palimaka (kensington) gentoo-dev 2012-09-04 19:18:43 UTC
(In reply to comment #22)
> Are you in touch with upstream? This shouldn't be that hard for them to fix
> there: they're already using pkg-config for a few other things. It'd be nice
> to get one of the more complete fixes mentioned on this bug in gentoo in the
> mean time.

I sent a whole bunch of fixes (which I compiled before noticing Alexey's work, doh!) upstream: https://github.com/geometer/FBReader/pull/221
Comment 24 Michael Palimaka (kensington) gentoo-dev 2012-09-04 20:23:21 UTC
Unfortunately, 0.99.1 GTK fails to build for me for other reasons even with the fix applied
Comment 25 Sergey S. Starikoff 2012-09-05 05:54:27 UTC
app-text/fbreader-0.99.1

fails to build with gtk UI, but compilles successfully with qt4 UI.
Comment 26 Samuli Suominen (RETIRED) gentoo-dev 2012-09-06 04:45:44 UTC
*** Bug 434066 has been marked as a duplicate of this bug. ***
Comment 27 Samuli Suominen (RETIRED) gentoo-dev 2012-09-06 04:48:17 UTC
(In reply to comment #17)
> Is there any problem applying one of the suggested patches to the portage
> tree? Finally? It gets disgusting after some weeks, you know?
> 
> As it appears to me, it's a Gentoo problem, not upstream's. So finally,
> action please.

entirely upstream problem if they fail to use pkg-config with fribidi.  

read: fribidi can't be used without pkg-config, but it might work out of pure luck if fribidi is compiled without glib support (severely crippled copy)
Comment 28 Jeroen Roovers (RETIRED) gentoo-dev 2012-09-16 14:39:41 UTC
*** Bug 435160 has been marked as a duplicate of this bug. ***
Comment 29 Victor Orozco 2012-09-20 05:09:47 UTC
Same problem of Sergey and Michael, fbreader-0.99.1 fails for gtk, QT builds fine:

Log
---
make[2]: Leaving directory `/var/tmp/portage/app-text/fbreader-0.99.1/work/fbreader-0.99.1/zlibrary/core/src/unix/library'
Creating libzlcore.so.0.99.1 ... OK
make[1]: Leaving directory `/var/tmp/portage/app-text/fbreader-0.99.1/work/fbreader-0.99.1/zlibrary/core'
make[1]: Entering directory `/var/tmp/portage/app-text/fbreader-0.99.1/work/fbreader-0.99.1/zlibrary/text'
make[2]: Entering directory `/var/tmp/portage/app-text/fbreader-0.99.1/work/fbreader-0.99.1/zlibrary/text/src/model'
make[2]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
Compiling ZLTextModel.o ... OK
Compiling ZLTextParagraph.o ... OK
Compiling ZLTextRowMemoryAllocator.o ... OK
make[2]: Leaving directory `/var/tmp/portage/app-text/fbreader-0.99.1/work/fbreader-0.99.1/zlibrary/text/src/model'
make[2]: Entering directory `/var/tmp/portage/app-text/fbreader-0.99.1/work/fbreader-0.99.1/zlibrary/text/src/area'
make[2]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
Compiling ZLTextArea_drawTextLine.o ... OK
Compiling ZLTextParagraphBuilder.o ...In file included from /usr/include/fribidi/fribidi.h:35:0,
                 from ZLTextParagraphBuilder.h:26,
                 from ZLTextParagraphBuilder.cpp:30:
/usr/include/fribidi/fribidi-common.h:65:20: fatal error: glib.h: No such file or directory
compilation terminated.
make[2]: *** [ZLTextParagraphBuilder.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/app-text/fbreader-0.99.1/work/fbreader-0.99.1/zlibrary/text/src/area'
make[1]: *** [.objects] Error 1
make[1]: Leaving directory `/var/tmp/portage/app-text/fbreader-0.99.1/work/fbreader-0.99.1/zlibrary/text'
make: *** [all] Error 1

Emerge --info
------------
Portage 2.3.4-r9 (funtoo/1.0/linux-gnu/arch/x86-64bit, gcc-4.6.2, glibc-2.13-r4, 3.4.5-tuxonice x86_64)
=================================================================
System uname: Linux-3.4.5-tuxonice-x86_64-Intel-R-_Core-TM-_i7-2670QM_CPU_@_2.20GHz-with-gentoo-2.2.0
Timestamp of tree: Mon, 17 Sep 2012 05:45:01 +0000
ccache version 3.1.8 [enabled]
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12-r1000
dev-lang/python:          2.7.3-r1000, 3.2.3-r1000
dev-util/ccache:          3.1.8
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2.0-r1
sys-apps/openrc:          0.10.5-r1::pentoo
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.6.2-r1
sys-devel/gcc-config:     1.5
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.2-r1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo mpd zugaina angelos sabayon science sunrise pentoo tuxtor
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 skype-eula AdobeFlash-10.1 google-talkplugin skype-4.0.0.7-copyright"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=corei7 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs candy ccache config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.c3sl.ufpr.br/"
LANG="pt_BR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
LINGUAS="en pt pt_BR es"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/mpd /var/lib/layman/zugaina /var/lib/layman/angelos /var/lib/layman/sabayon /var/lib/layman/science /var/lib/layman/sunrise /var/lib/layman/pentoo /var/lib/layman/tuxtor"
SYNC="git://github.com/funtoo/ports-2012.git"
SYNC_USER="root"
USE="7zip X a52 aac aalib acl acpi addbookmarks additions admin administrator alsa amarok amazon amd amd64 amrnb animation-rtl antlr apache2 apng archive ares ascii aspell autoipd automount avahi bash-completion bdf berkdb binary-drivers branding bzip2 c++ ccache cdda cddb cdio cdr cli colord consolekit contentcache corba cracklib crypt css cups cursors custom-cxxflags cxx daap dbus dc1394 directfb disk-partition divx djvu dri dts dvb dvd dvdr dvdread eds equalizer evo fastbuild fat fbcon fbcondecor fbsplash ffmpeg flac ftp fuse gconf gdbm gdm gif git gnome gnome-keyring gnome-print gnutella gnutls gpm grub gstreamer gtk gtk2 gtk3 hddtemp hfs httpd icons iconv id3tag imagemagick injection introspection ipv6 jpeg lame lcms libcaca libgcrypt libmpeg2 libnotify live lua lxde mad mmx mmxext mng modules mp3 mp4 mpeg mpeg2 mudflap multilib musepack mysql nautilus ncurses nls nptl nsplugin ntfs objc objc++ objc-gc ogg openal openexr opengl openmp pam pcimcia pcre php plugins png policykit pppd private-headers pulseaudio python readline reflection reiser4 reiserfs samba sdl shout simplexml skins spl sqlite srt sse sse2 sse3 ssl ssse3 startup-notification stream subversion svg taglib tcpd theora threads tiff tokenizer truetype udev udf unicode v4l v4l2 vcd vdpau verse vorbis wavpack webkit wmf wxwindows x x264 xcb xcomposite xinerama xml xorg xscreensaver xsl xulrunner xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en pt pt_BR es" NETBEANS_MODULES="apisupport java profiler websvccommon enterprise webcommon" PHP_TARGETS="php5-3" PYTHON_ABIS="2.7 3.2" PYTHON_TARGETS="python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="vesa nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, SYNC_UMASK
Comment 30 Gordienko Oleg 2012-09-24 16:38:09 UTC
Created attachment 324854 [details, diff]
fix
Comment 31 Bash Vi 2012-10-10 23:01:40 UTC
I had the same problems with 0.12.10 with GTK.  
Marien Zwart's sed trick solved the problem for me :)

haven't tried 0.99.1
If it helps you, I can still do that though.
Comment 32 Michael Palimaka (kensington) gentoo-dev 2012-10-17 08:26:27 UTC
A patch fixing this issue has been merged upstream...however they have also dropped support for GTK as it does not presently build. See bug #436490.

+  17 Oct 2012; Michael Palimaka <kensington@gentoo.org> +fbreader-0.99.2.ebuild:
+  Version bump. This release drops support for GTK (bug #436490), fixes a build
+  failure (bug #417043) and respects CFLAGS (bug #438408).
Comment 33 James Potts 2012-11-30 19:53:57 UTC
Ran into this bug with FBReader 0.12.10.  Why is this version still stable and unmasked in portage?  I think it would be a good idea to (package) mask both 0.12.10 and 0.99.1 due to the bugs that cause these versions to fail to build.

Note: 0.99.2 built correctly for me.

--James
Comment 34 Michael Palimaka (kensington) gentoo-dev 2012-12-01 12:18:09 UTC
(In reply to comment #33)
> Ran into this bug with FBReader 0.12.10.  Why is this version still stable
> and unmasked in portage?  I think it would be a good idea to (package) mask
> both 0.12.10 and 0.99.1 due to the bugs that cause these versions to fail to
> build.
> 
> Note: 0.99.2 built correctly for me.
> 
> --James

I think the only reason the old version is still around is because it has GTK+ support which is dropped in newer. In any case I will ping the primary maintainer to see what they think about stabilising 0.99.2