Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 698944 - games-emulation/generator-0.35_p4-r1 - ld: vdp.o: in function `vdp_layer_simple': vdp.c:(.text+0x2ce2): undefined reference to `vdp_plotcell'
Summary: games-emulation/generator-0.35_p4-r1 - ld: vdp.o: in function `vdp_layer_simp...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-10-30 19:00 UTC by kleph
Modified: 2019-10-31 07:52 UTC (History)
0 users

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


Attachments
build.log (build.log,58.12 KB, text/plain)
2019-10-30 19:02 UTC, kleph
Details
emerge --info (emerge.info,6.72 KB, text/plain)
2019-10-30 19:03 UTC, kleph
Details
proposed patch (generator-0.35_p4-static.patch,945 bytes, patch)
2019-10-30 19:06 UTC, kleph
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description kleph 2019-10-30 19:00:37 UTC
Gcc 9 defaults to -std=gnu11 which change the behavior of the "inline" keyword.
(https://stackoverflow.com/questions/19068705/undefined-reference-when-calling-inline-function)
This change prevents generator from linking.

Please find the build logs and a patch that correct the compilation in attachment.


Reproducible: Always

Steps to Reproduce:
1.emerge generator (with gcc >= 9)
Actual Results:  
x86_64-pc-linux-gnu/bin/ld: vdp.o: in function `vdp_layer_simple':
vdp.c:(.text+0x2ce2): undefined reference to `vdp_plotcell'

Expected Results:  
Compiling :)

I tried to use de macro patched in generator-0.35_p4-inline.patch but I had syntax errors.
So I used the keyword 'static' instead. If I understand correctly it should do what the original code intented to.
Feel free to correct/adapt the proposed patch.
Comment 1 kleph 2019-10-30 19:02:50 UTC
Created attachment 594582 [details]
build.log
Comment 2 kleph 2019-10-30 19:03:42 UTC
Created attachment 594584 [details]
emerge --info
Comment 3 kleph 2019-10-30 19:06:08 UTC
Created attachment 594586 [details, diff]
proposed patch
Comment 4 Larry the Git Cow gentoo-dev 2019-10-31 07:52:26 UTC
The bug has been closed via the following commit(s):

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

commit b6f075cae0bd3a804fffb076fc803180830f4e03
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-10-31 07:52:07 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-10-31 07:52:19 +0000

    games-emulation/generator: tweak for gcc-9
    
    Fixed-by: kleph
    Closes: https://bugs.gentoo.org/698944
    Package-Manager: Portage-2.3.78, Repoman-2.3.17
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 .../generator/files/generator-0.35_p4-gcc-9.patch  | 22 ++++++++++++++++++++++
 .../generator/generator-0.35_p4-r1.ebuild          | 16 +++++++---------
 2 files changed, 29 insertions(+), 9 deletions(-)