Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 559524

Summary: media-libs/allegro-4.4.2-r1 fails with gcc-5.2.0
Product: Gentoo Linux Reporter: Sven Eden <sven.eden>
Component: [OLD] GCC PortingAssignee: Gentoo Games <games>
Status: RESOLVED WORKSFORME    
Severity: normal CC: sven.eden
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://sourceforge.net/p/alleg/bugs/398
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 536984    
Attachments: Make get_value() static

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.