Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 616668 - sys-boot/refind-0.10.7 fails compilation with conflicting types for ‘CatPrint’
Summary: sys-boot/refind-0.10.7 fails compilation with conflicting types for ‘CatPrint’
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sam Jorna (wraeth)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-26 13:53 UTC by José Romildo Malaquias
Modified: 2017-05-15 05:16 UTC (History)
3 users (show)

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


Attachments
sys-boot:refind-0.10.7:20170426-134641.log (sys-boot:refind-0.10.7:20170426-134641.log,7.66 KB, text/x-log)
2017-04-26 13:53 UTC, José Romildo Malaquias
Details
Output of `emerge --info '=sys-boot/refind-0.10.7'` (nada.txt,17.20 KB, text/plain)
2017-04-26 13:55 UTC, José Romildo Malaquias
Details
emerge-info.txt (emerge-info.txt,5.26 KB, text/plain)
2017-04-27 19:39 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,176.57 KB, text/plain)
2017-04-27 19:39 UTC, Toralf Förster
Details
environment (environment,101.71 KB, text/plain)
2017-04-27 19:39 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,29.61 KB, application/x-bzip)
2017-04-27 19:39 UTC, Toralf Förster
Details
sys-boot:refind-0.10.7:20170427-193246.log (sys-boot:refind-0.10.7:20170427-193246.log,3.11 KB, text/plain)
2017-04-27 19:39 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,25.41 KB, application/x-bzip)
2017-04-27 19:39 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description José Romildo Malaquias 2017-04-26 13:53:13 UTC
Created attachment 470938 [details]
sys-boot:refind-0.10.7:20170426-134641.log

Emerging sys-boot/refind-0.10.7 fails on my ~amd64 system with the error: conflicting types for ‘CatPrint’.

x86_64-pc-linux-gnu-gcc -fno-PIE -Os -fno-strict-aliasing -fno-stack-protector -fshort-wchar -Wall -DEFIX64 -DEFI_FUNCTION_WRAPPER -m64 -mno-red-zone  -fpic -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -I../include -I../refind -I../libeg -I../mok -I. -I./../include \
      -D__MAKEWITH_GNUEFI -DREFIND_VERSION='L"0.10.7"' -c lodepng_xtra.c -o lodepng_xtra.o
In file included from ../refind/global.h:54:0,
                 from lodepng_xtra.c:26:
../refind/../EfiLib/GenericBdsLib.h:964:1: error: conflicting types for ‘CatPrint’
 CatPrint (
 ^~~~~~~~
In file included from ../refind/global.h:50:0,
                 from lodepng_xtra.c:26:
/usr/include/efi/efilib.h:509:1: note: previous declaration of ‘CatPrint’ was here
 CatPrint (
 ^~~~~~~~
In file included from ../refind/global.h:54:0,
                 from ../refind/lib.h:56,
                 from screen.c:60:
../refind/../EfiLib/GenericBdsLib.h:964:1: error: conflicting types for ‘CatPrint’
 CatPrint (
 ^~~~~~~~
In file included from libegint.h:42:0,
                 from screen.c:58:
/usr/include/efi/efilib.h:509:1: note: previous declaration of ‘CatPrint’ was here
 CatPrint (
 ^~~~~~~~
In file included from ../refind/global.h:54:0,
                 from image.c:59:
../refind/../EfiLib/GenericBdsLib.h:964:1: error: conflicting types for ‘CatPrint’
 CatPrint (
 ^~~~~~~~
In file included from libegint.h:42:0,
                 from image.c:58:
/usr/include/efi/efilib.h:509:1: note: previous declaration of ‘CatPrint’ was here
 CatPrint (
 ^~~~~~~~
In file included from ../refind/global.h:54:0,
                 from text.c:38:
../refind/../EfiLib/GenericBdsLib.h:964:1: error: conflicting types for ‘CatPrint’
 CatPrint (
 ^~~~~~~~
In file included from libegint.h:42:0,
                 from text.c:37:
/usr/include/efi/efilib.h:509:1: note: previous declaration of ‘CatPrint’ was here
 CatPrint (
 ^~~~~~~~
make[1]: *** [../Make.common:159: screen.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [../Make.common:159: text.o] Error 1
make[1]: *** [../Make.common:159: image.o] Error 1
make[1]: *** [../Make.common:159: lodepng_xtra.o] Error 1
make[1]: Leaving directory '/tmp/portage/sys-boot/refind-0.10.7/work/refind-0.10.7/libeg'
make: *** [Makefile:64: gnuefi] Error 2
Comment 1 José Romildo Malaquias 2017-04-26 13:55:42 UTC
Created attachment 470940 [details]
Output of `emerge --info '=sys-boot/refind-0.10.7'`
Comment 2 Toralf Förster gentoo-dev 2017-04-27 19:39:33 UTC
same at tinderbox image  13.0-no-multilib_20170424-194440
Comment 3 Toralf Förster gentoo-dev 2017-04-27 19:39:36 UTC
Created attachment 471104 [details]
emerge-info.txt
Comment 4 Toralf Förster gentoo-dev 2017-04-27 19:39:39 UTC
Created attachment 471106 [details]
emerge-history.txt
Comment 5 Toralf Förster gentoo-dev 2017-04-27 19:39:42 UTC
Created attachment 471108 [details]
environment
Comment 6 Toralf Förster gentoo-dev 2017-04-27 19:39:45 UTC
Created attachment 471110 [details]
etc.portage.tbz2
Comment 7 Toralf Förster gentoo-dev 2017-04-27 19:39:48 UTC
Created attachment 471112 [details]
sys-boot:refind-0.10.7:20170427-193246.log
Comment 8 Toralf Förster gentoo-dev 2017-04-27 19:39:51 UTC
Created attachment 471114 [details]
temp.tbz2
Comment 9 Wes 2017-04-28 00:47:25 UTC
I discovered this today as well, and did some build testing.  Both refind 0.10.4-r2 and 0.10.7 succeed with gnu-efi <= 3.0.4, and fail on gnu-efi 3.0.5
Comment 10 Greg Turner 2017-04-30 19:54:33 UTC
If I had to guess what is the culprit in gnu-efi 3.0.5, I'd tend to suppose this change is the culprit:

https://sourceforge.net/p/gnu-efi/code/ci/fa1b9779620670248c40c4fe92e797188a9736b8/

Perhaps some corresponding change needs to happen in refind's headers?  Does anyone know where the refind project normally is reachable for bug reports and whatnot?  I find the website quite helpful as an end-user, but I have no clue how to get in touch with the man behind the curtain.
Comment 11 Denis Descheneaux 2017-05-14 14:32:55 UTC
Perhaps with the email on top of his page :)

http://www.rodsbooks.com/refind/
Comment 12 Greg Turner 2017-05-14 15:19:23 UTC
(In reply to Denis Descheneaux from comment #11)
> Perhaps with the email on top of his page :)
> 
> http://www.rodsbooks.com/refind/

haha

Thanks for helping me past this mental block, your idea seems quite sound :)

I'll drop him a line and see if there's anything he's able to do about this.

However, until some better solution is forthcoming, perhaps the refind ebuilds should BDEPEND on '<=sys-boot/gnu-efi-3.0.4'?
Comment 13 Rod Smith 2017-05-15 00:42:35 UTC
Thanks for the bug report, Greg. I've investigated and I believe I've fixed it -- it now compiles for me on my Ubuntu 16.04 system with a locally-compiled GNU-EFI 3.0.5. I'd appreciate hearing if it compiled under Gentoo The problem, FWIW, is that the GNU-EFI developers have added functions that previously did not exist in GNU-EFI but that did exist in TianoCore. I'd extracted those functions from TianoCore for compilation ONLY with GNU-EFI, but with 3.0.5, that caused function- and variable-name collisions.

In any event, here's the commit that fixes the problem:

https://sourceforge.net/p/refind/code/ci/5e494221a6daf2435faad452185f2efed67b6f57/

I have not attempted applying that to a plain rEFInd 0.10.7. It might apply cleanly, or it might require some intervening commit, too. As a worst-case scenario, you can continue building rEFInd against GNU-EFI 3.0.4 (or TianoCore, if that's supported in the Gentoo package) until I release the next version of rEFInd. I don't think that will be this weekend, but it will probably be soon -- maybe this week or next weekend.
Comment 14 Sam Jorna (wraeth) gentoo-dev 2017-05-15 05:16:31 UTC
(In reply to Rod Smith from comment #13)
> In any event, here's the commit that fixes the problem:
> 
> https://sourceforge.net/p/refind/code/ci/5e494221a6daf2435faad452185f2efed67b6f57/
> 
> I have not attempted applying that to a plain rEFInd 0.10.7. It might apply
> cleanly, or it might require some intervening commit, too. As a worst-case
> scenario, you can continue building rEFInd against GNU-EFI 3.0.4 (or
> TianoCore, if that's supported in the Gentoo package) until I release the
> next version of rEFInd. I don't think that will be this weekend, but it will
> probably be soon -- maybe this week or next weekend.

Thanks, I've applied and committed this. The only conflict the patch had was with NEWS.txt (ironically, adding the note about resolving this).


commit 7c4e72babf0b6675281208334313aba4c40dd914 (HEAD -> master)
Author: Sam Jorna <wraeth@gentoo.org>
Date:   Mon May 15 15:11:28 2017 +1000

    sys-boot/refind: fix build against gnu-efi-3.0.5
    
    Adds upstream patch for building against gnu-efi-3.0.5 which added functions
    causing namespace collisions.
    
    Gentoo-Bug: 616668
    Package-Manager: Portage-2.3.5, Repoman-2.3.2