Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 559524 - media-libs/allegro-4.4.2-r1 fails with gcc-5.2.0
Summary: media-libs/allegro-4.4.2-r1 fails with gcc-5.2.0
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL: https://sourceforge.net/p/alleg/bugs/398
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: gcc-5
  Show dependency tree
 
Reported: 2015-09-03 13:06 UTC by Sven Eden
Modified: 2016-03-31 07:48 UTC (History)
1 user (show)

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


Attachments
Make get_value() static (50_fix_get_value_gcc_5.patch,373 bytes, patch)
2015-09-03 13:07 UTC, Sven Eden
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Eden 2015-09-03 13:06:25 UTC
Merging allegro-4.4.2-r1 fails on target 'grabber' with a linker error when built with gcc-5.2.0:

-----
../lib/libjpgalleg.so.4.4.2: undefined reference to `get_value'
collect2: error: ld returned 1 exit status
-----

In fact, all tools fail with this error.

The Problem is a function 'get_value()' that is marked with INLINE and local to the compilation unit (addons/jpgalleg/src/decode.c) - This must be static with gcc-5.2.0 (and maybe 5.0 and 5.1 as well.

The attached patch fixes this.

Reproducible: Always

Steps to Reproduce:
1. Set up the system to use gcc-5.2.0
2. emerge allegro-4.4.2-r1

Actual Results:  
Build fails

Expected Results:  
Build succeeds
Comment 1 Sven Eden 2015-09-03 13:07:25 UTC
Created attachment 410926 [details, diff]
Make get_value() static

This is the patch that adds the static keywords. After adding this, allegro built fine on my machine.
Comment 2 Sven Eden 2015-09-03 13:17:45 UTC
Issue reported here:

https://sourceforge.net/p/alleg/bugs/398

...but as they concentrate on Allegro-5, I doubt anything new for Allegro-4 will be released anytime soon.
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2016-03-31 07:48:35 UTC
I can't reproduce this with 5.3.0 so closing for now.