Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 620446 - games-emulation/dolphin-5.0 : /.../RasterFont.cpp:18:18: error: expected unqualified-id before numeric constant
Summary: games-emulation/dolphin-5.0 : /.../RasterFont.cpp:18:18: error: expected unqu...
Status: RESOLVED DUPLICATE of bug 637986
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Devan Franchini (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-02 17:16 UTC by Toralf Förster
Modified: 2018-01-11 10:11 UTC (History)
4 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,5.79 KB, text/plain)
2017-06-02 17:16 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,372.07 KB, text/plain)
2017-06-02 17:16 UTC, Toralf Förster
Details
environment (environment,127.19 KB, text/plain)
2017-06-02 17:16 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,35.11 KB, application/x-bzip)
2017-06-02 17:16 UTC, Toralf Förster
Details
games-emulation:dolphin-5.0:20170601-233901.log (games-emulation:dolphin-5.0:20170601-233901.log,291.74 KB, text/plain)
2017-06-02 17:16 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,39.79 KB, application/x-bzip)
2017-06-02 17:16 UTC, Toralf Förster
Details
Patch for the current ZIP archive. (bug_620446_rename_var.patch,4.45 KB, patch)
2017-12-02 12:03 UTC, Thibaud "thican" CANALE
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2017-06-02 17:16:21 UTC
                 from /var/tmp/portage/games-emulation/dolphin-5.0/work/dolphin-5.0_build/Source/CMakeFiles/pch.dir/pch.h:35,
                 from <command-line>:0:
/var/tmp/portage/games-emulation/dolphin-5.0/work/dolphin-5.0/Source/Core/VideoBackends/OGL/RasterFont.cpp:18:18: error: expected unqualified-id before numeric constant
 static const int CHAR_WIDTH = 8;
                  ^
make[2]: *** [Source/Core/VideoBackends/OGL/CMakeFiles/videoogl.dir/build.make:239: Source/Core/VideoBackends/OGL/CMakeFiles/videoogl.dir/RasterFont.cpp.o] Error 1

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 13.0-systemd_20170523-170152

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-6.3.0 *

Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby21 (with Rubygems) *
  [2]   ruby22 (with Rubygems)
java-config:
The following VMs are available for generation-2:
Comment 1 Toralf Förster gentoo-dev 2017-06-02 17:16:25 UTC
Created attachment 475004 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-06-02 17:16:29 UTC
Created attachment 475006 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2017-06-02 17:16:32 UTC
Created attachment 475008 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2017-06-02 17:16:36 UTC
Created attachment 475010 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2017-06-02 17:16:39 UTC
Created attachment 475012 [details]
games-emulation:dolphin-5.0:20170601-233901.log
Comment 6 Toralf Förster gentoo-dev 2017-06-02 17:16:42 UTC
Created attachment 475014 [details]
temp.tbz2
Comment 7 Arve Barsnes 2017-10-05 12:02:21 UTC
This patch fixed the compile for me:
https://github.com/dolphin-emu/dolphin/commit/ad84b904e4123e02bd6aec198cc73bfb0f254aca.diff
Comment 8 Eugene Cormier 2017-11-03 12:39:40 UTC
same results here on both a fresh install and a machine which already had dolphin compiled properly.... both fail
Comment 9 Tom Gillespie 2017-11-05 03:07:18 UTC
The patch in Arve's link fixes it for me.
Comment 10 Stefan Schmid 2017-11-20 13:01:35 UTC
(In reply to Tom Gillespie from comment #9)
> The patch in Arve's link fixes it for me.

for me not, same error with patch.
Comment 11 Thibaud "thican" CANALE 2017-12-02 12:03:04 UTC
Created attachment 507678 [details, diff]
Patch for the current ZIP archive.

Hello everyone,

It seams this patch is not matching with the current archive of Dolphin 5.0 on my system, because it fails to apply itself:

Steps:
1. Fetch the patch from its source and store it in /etc/portage/patches/:
  a. as user: wget --output-document='/tmp/rename_var_ad84b904e4123e02bd6aec198cc73bfb0f254aca.patch' 'https://github.com/dolphin-emu/dolphin/commit/ad84b904e4123e02bd6aec198cc73bfb0f254aca.diff'
  b. as root: mkdir -p /etc/portage/patches/games-emulation/dolphin-5.0/ && mv /tmp/rename_var_ad84b904e4123e02bd6aec198cc73bfb0f254aca.patch $_ && chown -R root:portage /etc/portage/patches/
1 bis. extra: remove the "FEATURE" "fail-clean" from portage/emerge
2. execute the following: ebuild /usr/portage/games-emulation/dolphin/dolphin-5.0.ebuild clean prepare
3. watch it failing, as expected (poor little thing)
4. from its output, read file "${PORTAGE_TMPDIR}/portage/games-emulation/dolphin-5.0/temp/rename_var_ad84b904e4123e02bd6aec198cc73bfb0f254aca.patch.out"

Here part of its output (with patch -p1, it finds the targeted file):

-------- START --------
PATCH COMMAND:  patch -p1 -g0 -E --no-backup-if-mismatch  --dry-run -f < '/etc/portage/patches//games-emulation/dolphin-5.0/rename_var_ad84b904e4123e02bd6aec198cc73bfb0f254aca.patch'

=====================================================================
checking file Source/Core/VideoBackends/OGL/RasterFont.cpp
Hunk #1 FAILED at 14.
Hunk #2 FAILED at 142.
Hunk #3 FAILED at 196.
Hunk #4 FAILED at 220.
4 out of 4 hunks FAILED

patch program exited with status 1
=====================================================================
-------- END --------

I noticed the file in the .zip archive (of course the SHA256 SHA512 WHIRLPOOL checksums and size are correct) don't own the same "Source/Core/VideoBackends/OGL/RasterFont.cpp" file than the parent commit from the remote patch:
As user:
% unzip -p /usr/portage/distfiles/dolphin-5.0.zip dolphin-5.0/Source/Core/VideoBackends/OGL/RasterFont.cpp > /tmp/zipped_RasterFont.cpp
# Notice the "^" for the parent commit, as you know.
% wget --output-document='/tmp/ad84b904e4123e02bd6aec198cc73bfb0f254aca^_RasterFont.cpp' 'https://github.com/dolphin-emu/dolphin/raw/ad84b904e4123e02bd6aec198cc73bfb0f254aca^/Source/Core/VideoBackends/OGL/RasterFont.cpp'
% diff -q /tmp/zipped_RasterFont.cpp /tmp/ad84b904e4123e02bd6aec198cc73bfb0f254aca\^_RasterFont.cpp
Files /tmp/zipped_RasterFont.cpp and /tmp/ad84b904e4123e02bd6aec198cc73bfb0f254aca^_RasterFont.cpp differ

Hence why the patch is not working.

… and then I made my own patch! Please find it attachment, and enjoy. Compilation went just fine.
Some checksums, SHA256 and SHA512:
ea6f33305a4d31d44c01912ea33c1368af3104825b6787850fbc45385bd747f6  bug_620446_rename_var.patch
33c72a85ce85d8122730834da8a0acd43eb7fad3725af2f5d6ecb224100c29271bde84dae1b6c3845962c8d37bbe59b65e1fcc279687efdb5d002b61eb456412  bug_620446_rename_var.patch



By the way, in case you wonder, the CHAR_WIDTH and stuff are already defined in /usr/include/limits.h which belongs to sys-libs/glibc-2.25. And those were not defined in sys-libs/glibc-2.23 or before GCC 7, as explain the comment inside this file.

That's all, folks!
Comment 12 Jan Buecken 2017-12-03 18:37:37 UTC
I assume this is a duplicate of https://bugs.gentoo.org/show_bug.cgi?id=637986

Upstream fix is 
https://github.com/dolphin-emu/dolphin/commit/1963996dd068a081f14fa12f364e9cdf8cd52a41

(as referenced in the other bug)

I would prefer the other bug as master, because it has a fix for the ebuild, too and is short and has the fix attached
Comment 13 Toralf Förster gentoo-dev 2017-12-03 19:13:12 UTC

*** This bug has been marked as a duplicate of bug 637986 ***
Comment 14 Alex 2018-01-10 18:32:41 UTC
(In reply to Thibaud "thican" CANALE from comment #11)
> Created attachment 507678 [details, diff] [details, diff]
> 
> … and then I made my own patch! Please find it attachment, and enjoy.
> Compilation went just fine.

This patch worked out for me from /etc/portage/patches/... on one machine, but didn't on another, rather identical one.

Failing machine says:
--------------------------------------------------------------------
 * cmake-utils_src_prepare has not been run, please open a bug on https://bugs.gentoo.org/
--------------------------------------------------------------------
Maybe it's the reason, I don't know...

"Upstream patch" didn't work out on both machines at all.

Regards,
Alex
Comment 15 David Seifert gentoo-dev 2018-01-11 10:11:05 UTC

*** This bug has been marked as a duplicate of bug 637986 ***