Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 339825 - dev-lang/tcc-0.9.25 has linkage bug on AMD64
Summary: dev-lang/tcc-0.9.25 has linkage bug on AMD64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Maintainers for Miscelleneous Language Packages [OBSOLETE]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-05 13:40 UTC by Alex HeadHunter Pyattaev
Modified: 2013-07-16 23:53 UTC (History)
2 users (show)

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


Attachments
Build log with max verbosity showing linkage failure (1.txt,4.50 KB, text/plain)
2010-10-06 21:03 UTC, Alex HeadHunter Pyattaev
Details
patch from upstream commit that applies (tcc-0.9.25-fix-linkage.patch,3.65 KB, patch)
2012-03-02 16:25 UTC, Sławomir Nizio
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex HeadHunter Pyattaev 2010-10-05 13:40:30 UTC
There is a linker bug in tcc of specified version, which was fixed by tcc dev team in commit bcc9137 of mob branch. Unless it gets into gentoo, linking might fail looking for common functions (e.g. strcmp) without clear reason. 

WORKAROUND: get latest revision from project repository and install it manually. See additional info section for details.

Reproducible: Sometimes

Steps to Reproduce:
Take relatively big project and pray it triggers.

Actual Results:  
Linking fails with random freaky errors missing stdlib functions

Expected Results:  
GCC links same code nicely

If you have this trouble try following advice in this message:
http://lists.nongnu.org/archive/html/tinycc-devel/2010-10/msg00007.html - the only one I could find so far...
Comment 1 Michael Weber (RETIRED) gentoo-dev 2010-10-05 16:23:38 UTC
Hi, 

can you please provide a build.log displaying the error?

Thank you
Comment 2 Alex HeadHunter Pyattaev 2010-10-06 21:03:08 UTC
Created attachment 249788 [details]
Build log with max verbosity showing linkage failure

(In reply to comment #1)
> Hi, 
> 
> can you please provide a build.log displaying the error?
> 
> Thank you
> 
Depending on what you are compiling. e.g. I have attached one I had when first encountered the bug. The point is the bug is already fixed by the tcc devs, it is just not in release version. I dont think there is a need to actually fix it ASAP, basically we could make a patch or something or just keep this info here until next version (whoever needs tcc could install workaround)
Comment 3 Sławomir Nizio 2012-03-02 16:25:04 UTC
Created attachment 303997 [details, diff]
patch from upstream commit that applies

I can confirm it on x86. Attaching patch that works for me. It's simply upstream patch (the same as mentioned by you) that applies against tcc 0.9.25.

Btw. to reproduce, one can try something like:
#include <string.h>
int main() { strlen("x"); return 0; }
Comment 4 Tim Harder gentoo-dev 2013-07-16 23:53:36 UTC
This should be fixed in 0.9.26.