Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 627744 - sys-boot/refind fails to build with SYMLINK_LIB=no LIBDIR_x86=lib
Summary: sys-boot/refind fails to build with SYMLINK_LIB=no LIBDIR_x86=lib
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sam Jorna (wraeth)
: 665004 (view as bug list)
Depends on:
Blocks: no-symlink-lib
  Show dependency tree
Reported: 2017-08-13 02:55 UTC by Georgy Yakovlev
Modified: 2018-09-02 00:47 UTC (History)
12 users (show)

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

sys-boot/refind-0.10.8/temp/build.log (build.log,15.13 KB, text/x-log)
2017-08-13 02:55 UTC, Georgy Yakovlev
emerge --info output (,5.08 KB, text/plain)
2017-08-13 02:55 UTC, Georgy Yakovlev
SYMLINK_LIB=no patch (refind-0.10.8.ebuild.patch,645 bytes, patch)
2018-02-09 12:21 UTC, Wil Reichert
Details | Diff
set library paths to build on 64-bit systems (0001-Bug-627744-sys-boot-refind-fails-to-build-with-SYMLI.patch,872 bytes, patch)
2018-04-25 01:32 UTC, Georgi Georgiev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Georgy Yakovlev archtester gentoo-dev 2017-08-13 02:55:25 UTC
Created attachment 488728 [details]

So I have a testing system with 

cleanly installed from fresh snapshot and migrated as discussed here:

Refind fails to build with: 
x86_64-pc-linux-gnu-ld: cannot open linker script file /usr/lib/ No such file or directory
make[1]: *** [Makefile:48:] Error 1
make[1]: Leaving directory '/var/tmp/portage/sys-boot/refind-0.10.8/work/refind-0.10.8/refind'
make: *** [Makefile:68: gnuefi] Error 2
Comment 1 Georgy Yakovlev archtester gentoo-dev 2017-08-13 02:55:55 UTC
Created attachment 488730 [details]
emerge --info output
Comment 2 Martin Väth 2017-12-30 05:01:25 UTC
The problem here is that the location


is wrong: The make system should look for this file not in /usr/lib/ but in

Glancing over the makefile, it seems that using
as an additional make parameter (or patching the default in the makefile correspondingly) should do the trick.
Comment 3 Wil Reichert 2018-02-09 12:21:36 UTC
Created attachment 518728 [details, diff]
SYMLINK_LIB=no patch

Looks like GNUEFILIB, EFILIB, EFICRT0 all need the $(get_libdir) treatment. Works on my 17.1 profile, can't vouch for any other configs.
Comment 4 Georgi Georgiev 2018-04-25 01:32:43 UTC
Created attachment 528472 [details, diff]
set library paths to build on 64-bit systems

Here is another version of the patch. It seems to fit better with the style of the current ebuild - setting the variables where all the rest are getting set.

I've been using this patch for the past three versions.
Comment 5 Larry the Git Cow gentoo-dev 2018-04-27 09:23:38 UTC
The bug has been referenced in the following commit(s):

commit 2086a46b5f2e37f49d6ba68a7a82a73a2abcb3b9
Author:     Sam Jorna <>
AuthorDate: 2018-04-27 09:20:09 +0000
Commit:     Sam Jorna <>
CommitDate: 2018-04-27 09:20:09 +0000

    sys-boot/refind: fix SYMLINK_LIB=no bug 627744
    Package-Manager: Portage-2.3.31, Repoman-2.3.9

 sys-boot/refind/refind-0.11.2.ebuild | 3 +++
 1 file changed, 3 insertions(+)}
Comment 6 Sam Jorna (wraeth) gentoo-dev 2018-04-27 09:24:49 UTC
Thanks, Georgi, for the patch - it did the trick nicely.
Comment 7 Ulenrich 2018-08-30 16:51:27 UTC
Please reopen:
# diff refind-0.11.2.ebuild refind-0.11.3.ebuild 
< inherit toolchain-funcs flag-o-matic versionator
> inherit toolchain-funcs flag-o-matic eapi7-ver
< 		GNUEFILIB="/usr/$(get_libdir)"
< 		EFILIB="/usr/$(get_libdir)"
< 		EFICRT0="/usr/$(get_libdir)"
Please apply the same to
Comment 8 Jonas Stein gentoo-dev 2018-09-01 09:37:13 UTC
*** Bug 665004 has been marked as a duplicate of this bug. ***
Comment 9 Larry the Git Cow gentoo-dev 2018-09-02 00:46:29 UTC
The bug has been referenced in the following commit(s):

commit b6d2187e9c3ba35adeb83431485df503178244c6
Author:     Sam Jorna <>
AuthorDate: 2018-09-02 00:44:21 +0000
Commit:     Sam Jorna <>
CommitDate: 2018-09-02 00:44:21 +0000

    sys-boot/refind: fix SIMLINK_LIB=no
    Package-Manager: Portage-2.3.48, Repoman-2.3.10

 sys-boot/refind/refind-0.11.3.ebuild | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Comment 10 Sam Jorna (wraeth) gentoo-dev 2018-09-02 00:47:29 UTC
Sorry, looks like I forked the ebuild from an earlier version.

Fixed, and thanks.