Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 371451 - games-mud/kmuddy-1.0.1 fails, fatal linker warning about use of `tempnam'
Summary: games-mud/kmuddy-1.0.1 fails, fatal linker warning about use of `tempnam'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-13 18:39 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2012-01-01 12:26 UTC (History)
6 users (show)

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


Attachments
Build log (kmuddy-1.0.1:20110613-163659.log,645.66 KB, text/plain)
2011-06-13 18:39 UTC, Diego Elio Pettenò (RETIRED)
Details
fix tempnam usage (kmuddy-1.0.1-tempnam.patch,791 bytes, patch)
2011-12-09 16:50 UTC, Michael Palimaka (kensington)
Details | Diff
kmuddy zlib underlinking fix (kmuddy-1.0.1-zlib.patch,537 bytes, patch)
2011-12-12 12:04 UTC, frankol
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2011-06-13 18:39:48 UTC
Created attachment 276937 [details]
Build log

Hello there!

You're getting this bug because the package in Summary failed to build in my tinderbox using the gold link editor from binutils. Before closing the bug as INVALID let me explain why this is still important!

The gold link editor does not support underlinking of shared objects, which is something I have described in my blog post:

http://blog.flameeyes.eu/2010/11/26/it-s-not-all-gold-that-shines-why-underlinking-is-a-bad-thing

Even the basic link editor (ld.bfd) has an option to support this but it is a heck to enable and get passed, so linking with gold is simply quicker.

Fixing underlinking provides optimized --as-needed builds (because the "softer" version no longer need to recover libraries that are underlinked), so it is a Good Thing To Do.

Thank you very much for the attention!
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2011-08-14 22:27:09 UTC
CMakeFiles/kmuddyscriptingplugin.dir/cunixsocket.o:cunixsocket.cpp:function cUnixSocket::cUnixSocket(int, cRunningScript*): warning: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../i686-pc-linux-gnu/bin/ld: error: treating warnings as errors
collect2: ld returned 1 exit status
make[2]: *** [lib/kmuddyscriptingplugin.so] Error 1

Different problem...
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2011-11-08 18:13:19 UTC
... and this is not the only problem, also displays underlinking issues. 

As no users are cc'ed here at all, I suggest treecleaning.
Comment 3 Tanktalus 2011-11-14 09:37:36 UTC
Note that the version in git builds here - not that there is an official 9999 build, but I created one myself and it still builds.  Perhaps this has been fixed in git?

Perhaps we could add a -9999 build for kmuddy to hold over until there is a newer official release?

(And the package.mask file has the wrong bug number attached :-) )
Comment 4 Tanktalus 2011-11-14 10:10:58 UTC
(not that I used gold - but if it is fixed in git, I'd hope to keep this around.)
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2011-11-14 19:53:33 UTC
the underlinking is not as serious as the tempnam problem (but it needs to be fixed as well in the long term). If you want to save this package then you need to step up and maintain it and provide a working patch as well. -9999 ebuild is not an appropriate solution (at least for portage inclusion)
Comment 6 Michael Palimaka (kensington) gentoo-dev 2011-12-09 16:50:45 UTC
Created attachment 295301 [details, diff]
fix tempnam usage

Please consider keeping this package.

Old behaviour: write socket to /tmp/$tempnam
New behaviour: write socket to /tmp/$mkdtemp/sock
Comment 7 frankol 2011-12-12 12:04:10 UTC
Created attachment 295551 [details, diff]
kmuddy zlib underlinking fix

This patch should fix underlinking of cmccp.cpp using inflateEnd from zlib.

This change is already in upstream's (so far unreleased) git.

Unfortunately I do not have gold installed to test this fix.

Since there's patches for both problems reported please consider not tree-cleaning the package just yet. Thanks!
Comment 8 Andreas K. Hüttel archtester gentoo-dev 2011-12-12 23:10:48 UTC
I'll have a look during the next days.
Comment 9 Andreas K. Hüttel archtester gentoo-dev 2012-01-01 12:26:02 UTC
All fixed and package mask removed (package is ~arch for now). 
Thank you for the patches!