Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 532408 - media-libs/harfbuzz[+abi_x86_32 +abi_x86_64 +graphite]: cannot find -lgraphite2 (media-gfx/graphite2)
Summary: media-libs/harfbuzz[+abi_x86_32 +abi_x86_64 +graphite]: cannot find -lgraphit...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
: 532422 532480 (view as bug list)
Depends on:
Blocks: 531592
  Show dependency tree
 
Reported: 2014-12-13 03:47 UTC by David Carlos Manuelda
Modified: 2021-12-20 06:08 UTC (History)
3 users (show)

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


Attachments
emerge.log (emerge.log,581 bytes, text/x-log)
2014-12-13 09:34 UTC, David Carlos Manuelda
Details
summary.log (summary.log,179.87 KB, text/x-log)
2014-12-13 09:35 UTC, David Carlos Manuelda
Details
Correct build log (build.log,88.43 KB, text/plain)
2014-12-13 17:06 UTC, David Carlos Manuelda
Details
emerge --info (just in case it is needed) (emergeinfo.txt,19.12 KB, text/plain)
2014-12-13 17:08 UTC, David Carlos Manuelda
Details
Rebuild graphite, same result (log,110.76 KB, text/plain)
2014-12-13 17:52 UTC, David Carlos Manuelda
Details
graphite2 build log (CMAKE_VERBOSE enabled) (media-gfx:graphite2-1.2.4-r1:20141218-173128.log,97.50 KB, text/plain)
2014-12-18 17:33 UTC, David Carlos Manuelda
Details
gentoo_toolchain.cmake (gentoo_toolchain.cmake,338 bytes, text/x-cmake)
2014-12-18 18:11 UTC, David Carlos Manuelda
Details
make.conf (make.conf,1.17 KB, text/plain)
2014-12-18 18:39 UTC, David Carlos Manuelda
Details
emerge-info.txt (emerge-info.txt,16.77 KB, text/plain)
2017-06-18 18:57 UTC, Toralf Förster
Details
dev-qt:qtsql-4.8.7-r1:20170618-185114.log (dev-qt:qtsql-4.8.7-r1:20170618-185114.log,341.86 KB, text/plain)
2017-06-18 18:57 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,321.07 KB, text/plain)
2017-06-18 18:57 UTC, Toralf Förster
Details
environment (environment,123.88 KB, text/plain)
2017-06-18 18:57 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,25.75 KB, application/x-bzip)
2017-06-18 18:57 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,48.30 KB, application/x-bzip)
2017-06-18 18:57 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Carlos Manuelda 2014-12-13 03:47:01 UTC
When trying to build on amd64 with abi_x86_32 enabled (in emul-linux-x86-* and also per package setting as suggested by emerge), I found that harfbuzz can't be compiled with the summary error.

Last lines are:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../lib32/libgraphite2.so when searching for -lgraphite2
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/../lib32/libgraphite2.so when searching for -lgraphite2
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../libgraphite2.so when searching for -lgraphite2
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib32/libgraphite2.so when searching for -lgraphite2
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libgraphite2.so when searching for -lgraphite2
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgraphite2
collect2: error: ld returned 1 exit status
Makefile:1093: recipe for target 'libharfbuzz.la' failed
make[4]: *** [libharfbuzz.la] Error 1

locate graphite2.so gives:
/usr/lib32/libgraphite2.so
/usr/lib32/libgraphite2.so.3
/usr/lib32/libgraphite2.so.3.0.1
/usr/lib64/libgraphite2.so
/usr/lib64/libgraphite2.so.3
/usr/lib64/libgraphite2.so.3.0.1

So I guess the problem is not in the graphite2 ebuild but something about it not being able to find it.


Reproducible: Always
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-13 08:25:28 UTC
I need complete build log.
Comment 2 David Carlos Manuelda 2014-12-13 09:34:23 UTC
Created attachment 391534 [details]
emerge.log
Comment 3 David Carlos Manuelda 2014-12-13 09:35:28 UTC
Created attachment 391536 [details]
summary.log
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-13 10:08:37 UTC
No, I mean the *build.log*. The one listed in the big failure message, in /var/tmp/portage.
Comment 5 David Carlos Manuelda 2014-12-13 17:06:51 UTC
Created attachment 391584 [details]
Correct build log

My fault, this is the correct build log. Thank you for looking at this issue.
Comment 6 David Carlos Manuelda 2014-12-13 17:08:34 UTC
Created attachment 391586 [details]
emerge --info (just in case it is needed)
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-13 17:41:19 UTC
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../lib32/libgraphite2.so when searching for -lgraphite2

This looks weird. Could you try rebuilding graphite2?
Comment 8 David Carlos Manuelda 2014-12-13 17:52:22 UTC
Created attachment 391596 [details]
Rebuild graphite, same result
Comment 9 David Carlos Manuelda 2014-12-17 04:03:04 UTC
By the way, this seems affected only by multilib build, because building "normal" (amd64 for me) do not trigger the bug.
Comment 10 David Carlos Manuelda 2014-12-18 15:53:05 UTC
I think I found the cause for this:

file /usr/lib32/libgraphite2.so.3.0.1 
/usr/lib32/libgraphite2.so.3.0.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped


Why is the 64bit version of the library stored in lib32 folder instead of its 32bit version? It possibly indicates a bug in graphite ebuild, which installs that library
Comment 11 David Carlos Manuelda 2014-12-18 15:58:47 UTC
Should I post a new bug against graphite2 and block this one, or simply change bug topic?
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-18 15:59:25 UTC
(In reply to David Carlos Manuelda from comment #11)
> Should I post a new bug against graphite2 and block this one, or simply
> change bug topic?

Please start by attaching the graphite2 build log, and we'll see how to proceed from there :).
Comment 13 David Carlos Manuelda 2014-12-18 16:00:12 UTC
(In reply to Michał Górny from comment #12)
> (In reply to David Carlos Manuelda from comment #11)
> > Should I post a new bug against graphite2 and block this one, or simply
> > change bug topic?
> 
> Please start by attaching the graphite2 build log, and we'll see how to
> proceed from there :).

It's already attached https://bugs.gentoo.org/attachment.cgi?id=391596
Comment 14 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-18 16:22:22 UTC
Your build log lacks verbose command output. Did you disable CMAKE_VERBOSE by any chance? If you did, then please re-enable it, rebuild graphite2 and attach the build log with commands (graphite2 is enough, no need for harfbuzz).
Comment 15 David Carlos Manuelda 2014-12-18 17:33:25 UTC
Created attachment 391966 [details]
graphite2 build log (CMAKE_VERBOSE enabled)
Comment 16 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-18 18:07:55 UTC
It seems that it doesn't get -m32 somehow. Could you paste /var/tmp/portage/media-gfx/graphite2-1.2.4-r1/work/graphite2-1.2.4-abi_x86_32.x86/gentoo_toolchain.cmake as well?
Comment 17 David Carlos Manuelda 2014-12-18 18:11:03 UTC
Created attachment 391972 [details]
gentoo_toolchain.cmake

Added requested file, but seems ok to my eyes :(
Comment 18 David Carlos Manuelda 2014-12-18 18:15:32 UTC
Also I ran a ccmake . in the compiling folder to get this:

CMAKE_CXX_COMPILER               /usr/bin/x86_64-pc-linux-gnu-g++                                                                                                                          
 CMAKE_CXX_COMPILE_OBJECT         <CMAKE_CXX_COMPILER> <DEFINES>  -DNDEBUG <FLAGS> -o <OBJECT> -c <SOURCE>                                                                                  
 CMAKE_CXX_FLAGS                  -march=native -O2 -pipe -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -ftree-vectorize

It seems that it is completelly ignoring the -m32 here
Comment 19 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-18 18:24:57 UTC
(In reply to David Carlos Manuelda from comment #17)
> Created attachment 391972 [details]
> gentoo_toolchain.cmake
> 
> Added requested file, but seems ok to my eyes :(

It doesn't seem wrong, yet in my case it only contains -m32 and no more flags; and looking at cmake-utils.eclass, that's what it should contain.

Which cmake version are you using? Can you attach your make.conf? Is there any risk that you could be using non-standard version of cmake-utils.eclass, e.g. through some overlay?
Comment 20 David Carlos Manuelda 2014-12-18 18:39:42 UTC
Created attachment 391974 [details]
make.conf

CMake:
[ebuild   R    ] dev-util/cmake-3.0.2  USE="ncurses qt4 -doc -emacs (-qt5) {-test}"

make.conf (attached)

And about the non standard cmake-utils.eclass I only have one:

locate cmake-utils.eclass
/usr/portage/eclass/cmake-utils.eclass
Comment 21 David Carlos Manuelda 2014-12-18 18:47:10 UTC
I discovered that if I comment CFLAGS_x86 and CXXFLAGS_x86 in my make.conf the problem goes away, but should it work regardless if I comment that or not?

This workaround it:
GRAPHITE="-floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -ftree-vectorize"
CFLAGS="-march=native -O2 -pipe ${GRAPHITE}"
#CFLAGS_x86="${CFLAGS_x86} ${CFLAGS}"
CXXFLAGS="${CFLAGS}"
#CXXFLAGS_x86="${CFLAGS_x86}"
Comment 22 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-18 18:59:19 UTC
(In reply to David Carlos Manuelda from comment #21)
> I discovered that if I comment CFLAGS_x86 and CXXFLAGS_x86 in my make.conf
> the problem goes away, but should it work regardless if I comment that or
> not?

Yeah, that's what I suspected. You aren't supposed to define those variables yourself, they are special variables used by multilib stuff internally. Regular CFLAGS get appended to them automatically.

I think this concludes this bug. Please remove the variables. I'm going to close the remaining relevant bugs as well. If it doesn't help in some of them, please reopen.
Comment 23 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-18 19:00:15 UTC
*** Bug 532422 has been marked as a duplicate of this bug. ***
Comment 24 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-18 19:01:36 UTC
*** Bug 532480 has been marked as a duplicate of this bug. ***
Comment 25 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-18 19:02:10 UTC
Oh, and I suggest you locate all 64-bit libraries in /usr/lib32 and rebuild the relevant packages.
Comment 26 Toralf Förster gentoo-dev 2017-06-18 18:57:20 UTC
same issue with dev-qt/qtsql-4.8.7-r1 at the unstable amd64 chroot image 17.0-desktop-plasma_abi32+64_20170611-104510 at the tinderbox
Comment 27 Toralf Förster gentoo-dev 2017-06-18 18:57:23 UTC
Created attachment 477162 [details]
emerge-info.txt
Comment 28 Toralf Förster gentoo-dev 2017-06-18 18:57:26 UTC
Created attachment 477164 [details]
dev-qt:qtsql-4.8.7-r1:20170618-185114.log
Comment 29 Toralf Förster gentoo-dev 2017-06-18 18:57:29 UTC
Created attachment 477166 [details]
emerge-history.txt
Comment 30 Toralf Förster gentoo-dev 2017-06-18 18:57:32 UTC
Created attachment 477168 [details]
environment
Comment 31 Toralf Förster gentoo-dev 2017-06-18 18:57:35 UTC
Created attachment 477170 [details]
etc.portage.tbz2
Comment 32 Toralf Förster gentoo-dev 2017-06-18 18:57:38 UTC
Created attachment 477172 [details]
temp.tbz2
Comment 33 Larry the Git Cow gentoo-dev 2021-12-20 00:48:31 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d1bf1816e7e2b05f0d9435e2d266272f120d19f

commit 0d1bf1816e7e2b05f0d9435e2d266272f120d19f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-12-20 00:36:33 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-12-20 00:48:20 +0000

    media-gfx/graphite2: fix build system (mainly musl build)
    
    - Fix musl build (force in -lssp_nonshared for -nodefaultlibs)
    - Fix .cmake install path
    
    Bug: https://bugs.gentoo.org/532408
    Closes: https://bugs.gentoo.org/829690
    Signed-off-by: Sam James <sam@gentoo.org>

 .../graphite2-1.3.14-fix-cmake-files-libdir.patch      | 13 +++++++++++++
 .../files/graphite2-1.35-fix-gcc-linking.patch         | 18 ++++++++++++++++++
 ...phite2-1.3.14.ebuild => graphite2-1.3.14-r1.ebuild} | 17 +++++++++++++----
 3 files changed, 44 insertions(+), 4 deletions(-)
Comment 34 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-20 06:08:01 UTC
Fixed now, I think?