For me, it didn't compile 32 bit version of freetype. It just compiled 64 bit. I was root and I did it same way. But it didn't compile it into 32 bit directory. And it was 64 bit binary indeed it produced. I forced to load it, but it said ELF error. Hmm..... Let me research more...overkll wrote:1. Compile 32bit version of freetype and make a package. Take the necessary steps to make sure "bindist" IS NOT enabled:Code: Select all
# ABI=x86 emerge -B freetype
Code: Select all
ABI=x86 emerge -B freetype
Code: Select all
x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -s -o /var/tmp/portage/media-libs/freetype-2.3.4/work/ft2demos-2.3.4/bin/.libs/ftstring /var/tmp/portage/media-libs/freetype-2.3.4/work/ft2demos-2.3.4/obj/ftstring.o /var/tmp/portage/media-libs/freetype-2.3.4/work/ft2demos-2.3.4/obj/common.o /var/tmp/portage/media-libs/freetype-2.3.4/work/ft2demos-2.3.4/obj/ftcommon.o /var/tmp/portage/media-libs/freetype-2.3.4/work/freetype-2.3.4/objs/.libs/libfreetype.so /var/tmp/portage/media-libs/freetype-2.3.4/work/ft2demos-2.3.4/obj/graph.a -L/usr/lib /usr/lib64/libX11.so /usr/lib64/libXau.so /usr/lib64/libXdmcp.so -ldl -lm -Wl,--rpath -Wl,/usr/lib
/usr/lib64/libX11.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
same over here...Konsti wrote:Actually I am trying to fix up my display and get rif of blurry anitaliasing so I messed around with freetype.
yields into:Code: Select all
ABI=x86 emerge -B freetype
Code: Select all
x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -s -o /var/tmp/portage/media-libs/freetype-2.3.4/work/ft2demos-2.3.4/bin/.libs/ftstring /var/tmp/portage/media-libs/freetype-2.3.4/work/ft2demos-2.3.4/obj/ftstring.o /var/tmp/portage/media-libs/freetype-2.3.4/work/ft2demos-2.3.4/obj/common.o /var/tmp/portage/media-libs/freetype-2.3.4/work/ft2demos-2.3.4/obj/ftcommon.o /var/tmp/portage/media-libs/freetype-2.3.4/work/freetype-2.3.4/objs/.libs/libfreetype.so /var/tmp/portage/media-libs/freetype-2.3.4/work/ft2demos-2.3.4/obj/graph.a -L/usr/lib /usr/lib64/libX11.so /usr/lib64/libXau.so /usr/lib64/libXdmcp.so -ldl -lm -Wl,--rpath -Wl,/usr/lib /usr/lib64/libX11.so: could not read symbols: File in wrong format collect2: ld returned 1 exit status
Code: Select all
<?xml version="1.0"?>
<fontconfig>
<match target="font" >
<edit mode="assign" name="autohint" >
<bool>false</bool>
</edit>
<edit mode="assign" name="hinting" >
<bool>true</bool>
</edit>
<edit mode="assign" name="antialias" >
<bool>false</bool>
</edit>
<edit mode="assign" name="hintstyle" >
<const>hintfull</const>
</edit>
</match>
<!-- Reject bitmap fonts in favour of Truetype, Postscript, etc. -->
<selectfont>
<rejectfont>
<pattern>
<patelt name="scalable">
<bool>false</bool>
</patelt>
</pattern>
</rejectfont>
</selectfont>
<!-- Enable anti-aliasing for bold fonts > 14px -->
<match target="font">
<test compare="more" name="pixelsize" qual="any">
<double>14</double>
</test>
<test name="weight" compare="more">
<const>medium</const>
</test>
<edit mode="assign" name="antialias">
<bool>true</bool>
</edit>
</match>
</fontconfig>

Code: Select all
ABI=x86 emerge -B freetypeCode: Select all
x86_64-pc-linux-gnu-gcc -o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/bin/.libs/ftstring /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/ftstring.o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/common.o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/ftcommon.o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/freetype-2.3.4/objs/.libs/libfreetype.so -lz /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/graph.a -L/usr/lib /usr/lib64/libX11.so /usr/lib64/libXau.so /usr/lib64/libXdmcp.so -ldl -lm -Wl,--rpath -Wl,/usr/lib
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/lib64/libX11.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [/var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/bin/ftstring] Error 1
make: *** Waiting for unfinished jobs....
x86_64-pc-linux-gnu-gcc -o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/bin/.libs/ftgamma /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/ftgamma.o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/common.o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/ftcommon.o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/freetype-2.3.4/objs/.libs/libfreetype.so -lz /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/graph.a -L/usr/lib /usr/lib64/libX11.so /usr/lib64/libXau.so /usr/lib64/libXdmcp.so -ldl -lm -Wl,--rpath -Wl,/usr/lib
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/lib64/libX11.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [/var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/bin/ftgamma] Error 1
x86_64-pc-linux-gnu-gcc -o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/bin/.libs/ftmulti /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/ftmulti.o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/common.o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/freetype-2.3.4/objs/.libs/libfreetype.so -lz /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/graph.a -L/usr/lib /usr/lib64/libX11.so /usr/lib64/libXau.so /usr/lib64/libXdmcp.so -ldl -lm -Wl,--rpath -Wl,/usr/lib
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/lib64/libX11.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [/var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/bin/ftmulti] Error 1
x86_64-pc-linux-gnu-gcc -o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/bin/.libs/ftgrid /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/ftgrid.o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/common.o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/ftcommon.o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/freetype-2.3.4/objs/.libs/libfreetype.so -lz /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/graph.a -L/usr/lib /usr/lib64/libX11.so /usr/lib64/libXau.so /usr/lib64/libXdmcp.so -ldl -lm -Wl,--rpath -Wl,/usr/lib
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/lib64/libX11.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [/var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/bin/ftgrid] Error 1
x86_64-pc-linux-gnu-gcc -o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/bin/.libs/ftdiff /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/ftdiff.o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/common.o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/ftcommon.o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/freetype-2.3.4/objs/.libs/libfreetype.so -lz /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/graph.a -L/usr/lib /usr/lib64/libX11.so /usr/lib64/libXau.so /usr/lib64/libXdmcp.so -ldl -lm -Wl,--rpath -Wl,/usr/lib
x86_64-pc-linux-gnu-gcc -o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/bin/.libs/ftview /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/ftview.o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/common.o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/ftcommon.o /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/freetype-2.3.4/objs/.libs/libfreetype.so -lz /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/obj/graph.a -L/usr/lib /usr/lib64/libX11.so /usr/lib64/libXau.so /usr/lib64/libXdmcp.so -ldl -lm -Wl,--rpath -Wl,/usr/lib
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/lib64/libX11.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [/var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/bin/ftdiff] Error 1
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/lib64/libX11.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [/var/tmp/portage/media-libs/freetype-2.3.4-r2/work/ft2demos-2.3.4/bin/ftview] Error 1
*
* ERROR: media-libs/freetype-2.3.4-r2 failed.
* Call stack:
* ebuild.sh, line 1654: Called dyn_compile
* ebuild.sh, line 990: Called qa_call 'src_compile'
* ebuild.sh, line 44: Called src_compile
* freetype-2.3.4-r2.ebuild, line 102: Called die
*
* ft2demos emake failed
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/media-libs/freetype-2.3.4-r2/temp/build.log'.
*
* Messages for package media-libs/freetype-2.3.4-r2:
*
* ERROR: media-libs/freetype-2.3.4-r2 failed.
* Call stack:
* ebuild.sh, line 1654: Called dyn_compile
* ebuild.sh, line 990: Called qa_call 'src_compile'
* ebuild.sh, line 44: Called src_compile
* freetype-2.3.4-r2.ebuild, line 102: Called die
*
* ft2demos emake failed
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/media-libs/freetype-2.3.4-r2/temp/build.log'.
* Code: Select all
# mkdir /tmp/emul-xlibs
# tar jxpvf /usr/portage/distfiles/emul-linux-x86-xlibs-20071128.tar.bz2 -C /tmp/emul-xlibsCode: Select all
# ABI=x86 emerge -B freetypeCode: Select all
# cd /var/tmp/portage/media-libs/freetype-2.3.4-r2/work/freetype-2.3.4
# strip objs/.libs/libfreetype.so.6.3.15Code: Select all
# cp objs/.libs/libfreetype.{a,so.6.3.15} /tmp/emul-xlibs/usr/lib32/
# cd /tmp/emul-xlibs
# tar cjpvf ../emul-linux-x86-xlibs-20071128.tar.bz2 *Code: Select all
# cp /tmp/emul-linux-x86-xlibs-20071128.tar.bz2 /usr/portage/distfiles/
# ebuild /usr/portage/app-emulation/emul-linux-x86-xlibs/emul-linux-x86-xlibs-20071128-r2.ebuild digest
# emerge -1 emul-linux-x86-xlibsI don't think that this is possible at the moment.Alanceil wrote:A thousand thanks to you, my fonts look "good" again
As far as I can see, this seems to be a problem that occurs often .. is there a chance that the building process you described can be made into an ebuild or a useflag ( sth. like "rebuilt-font-support" ) for the emul-xlibs and upped into the portage tree ?

I have the same issue, so I followed the guide here and rebuilt my emul-linux-x86-xlibs to use a newer freetype without bindist set and etc...slithy wrote:Not trusting the partial multilib implementation, I used a binary build of freetype from an actual i686 gentoo machine and copied over the same libraries. It worked fine. I can probably throw up the freetype someplace if people want it.
So, to fix it I first tried to undo "ABI=x86 emerge -B freetype" by running "ABI=x86 emerge -B --unmerge freetype" I then did a "emerge --ask freetype" to get everything back to normal. Afterwards, firefox still diden't run.No running windows found
/opt/firefox/firefox-bin: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory
firefox-bin exited with non-zero status (127)
Something is really wrong here :S>>> Original instance of package unmerged safely.
* Generating pango modules listing...
pango-querymodules32: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory
* Generating gtk+ immodules/gdk-pixbuf loaders listing...
gtk-query-immodules-2.0-32: error while loading shared libraries:: cannot open shared object file: No such file or directorylibexpat.so.0

Change that to:grrrendel wrote:
<snip>
Build the 32bit binary package as usual.<snip>Code: Select all
# ABI=x86 emerge -B freetype
Code: Select all
# ABI=x86 emerge -avB =freetype-2.3.4-r2
I realise this is probably a bit late, but I just stumbled on this thread myself trying to fix this bug. So I'll explain how to do it with the newer version for the benefit of anyone else who comes along.neonl wrote:Hello all.
This thread was created 1 year ago, and now the versions of the packs are diferent so I don't know how to apply the things that were said here to my case (and don't even know if it is exactly the same the screenshots here posted are not in the servers anymore) so I'm going to explain it and I count on your help.
I use the package mozilla-firefox-bin (32-bits) because it's a very much stable solution for flash than using firefox-64bits + nspluginwrapper. Everything was ok, until I notice that the fonts (after everything configured in xorg.conf and fontconfig, etc) look ugly and I can't do nothing about it - screenshot.
I removed the package, just to be sure, and I built the mozilla-firefox package with my 64-bits flag. The result was that the fonts were working ok here.
Now, the packages are:
mozilla-firefox-bin-3.0.1-r1
emul-linux-x86-xlibs-20080316
Thanks in advance.
Code: Select all
mkdir /tmp/emul-xlibs
tar jxpvf /usr/portage/distfiles/emul-linux-x86-xlibs-$X86_XLIBS_VERSION.tar.bz2 -C /tmp/emul-xlibsCode: Select all
ABI=x86 emerge -avB freetypeCode: Select all
mkdir /tmp/freetype
tar xvf /usr/portage/packages/All/freetype-2.3.7.tbz2 -C /tmp/freetypeCode: Select all
cp /tmp/freetype/usr/lib32/libfreetype.{a,so.*} /tmp/emul-xlibs/lib32/
cd /tmp/emul-xlibs
tar cjpvf ../emul-linux-x86-xlibs-$X86_XLIBS_VERSION.tar.bz2 *Code: Select all
cp /tmp/emul-linux-x86-xlibs-$X86_XLIBS_VERSION.tar.bz2 /usr/portage/distfiles/
rm /usr/portage/app-emulation/emul-linux-x86-xlibs/Manifest
ebuild /usr/portage/app-emulation/emul-linux-x86-xlibs/emul-linux-x86-xlibs-$X86_XLIBS_VERSION.ebuild manifestCode: Select all
emerge -1 emul-linux-x86-xlibsI commented over a year ago in this thread, but my problems recently came back.jw5801 wrote:
Grab the existing distfile & extract itEmerge a good 32-bit version of freetype (don't forget to check the bindist USE flag is not set)Code: Select all
mkdir /tmp/emul-xlibs tar jxpvf /usr/portage/distfiles/emul-linux-x86-xlibs-20080316.tar.bz2 -C /tmp/emul-xlibsGrab the resultant packageCode: Select all
ABI=x86 emerge -avB freetypeCopy the good freetype library to the xlibs directory and recreate the tarballCode: Select all
mkdir /tmp/freetype tar xvf /usr/portage/packages/All/freetype-2.3.7.tbz2 -C /tmp/freetypeCopy it back into distfiles and recreate the digestCode: Select all
cp /tmp/freetype/usr/lib32/libfreetype.{a,so.6.3.18} /tmp/emul-xlibs/lib32/ cd /tmp/emul-xlibs tar cjpvf ../emul-linux-x86-xlibs-20080316.tar.bz2 *Emerge your fixed versionCode: Select all
cp /tmp/emul-linux-x86-xlibs-20080316.tar.bz2 /usr/portage/distfiles/ ebuild /usr/portage/app-emulation/emul-linux-x86-xlibs/emul-linux-x86-xlibs-20080316.ebuild digestCode: Select all
emerge -1 emul-linux-x86-xlibs
Code: Select all
rm /usr/portage/app-emulation/emul-linux-x86-xlibs/Manifest
ebuild /usr/portage/app-emulation/emul-linux-x86-xlibs/emul-linux-x86-xlibs-20080810.ebuild manifest