Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 500034 - media-libs/openal-1.15.1-r2 - ld: CMakeFiles/openal.dir/OpenAL32/alAuxEffectSlot.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
Summary: media-libs/openal-1.15.1-r2 - ld: CMakeFiles/openal.dir/OpenAL32/alAuxEffectS...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-02 03:04 UTC by account-removed
Modified: 2019-11-09 08:23 UTC (History)
2 users (show)

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


Attachments
openal-1.15.1-r2-logs.tar.xz (openal-1.15.1-r2-logs.tar.xz,6.72 KB, application/x-xz-compressed-tar)
2014-02-02 03:04 UTC, account-removed
Details

Note You need to log in before you can comment on or make changes to this bug.
Description account-removed 2014-02-02 03:04:48 UTC
Created attachment 369312 [details]
openal-1.15.1-r2-logs.tar.xz

media-libs/openal-1.15.1-r2 fails to build (emake fails).
It seems to be because -fPIC is omitted during shared object compilation.
Attached is an archive with:
1) output of "emerge --info '=media-libs/openal-1.15.1-r2::gentoo'"
2) output of "emerge -pqv '=media-libs/openal-1.15.1-r2::gentoo'"
3) the build log for that package

those are also available at:
1) https://gist.github.com/anonymous/8762364
2) https://gist.github.com/anonymous/8762397
3) https://gist.github.com/anonymous/8762404
Comment 1 Rafał Mużyło 2014-02-02 08:45:26 UTC
> -- The C compiler identification is unknown

It seems something is wrong either with gcc or with cmake.

Search for the log of that test.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2014-02-02 09:43:54 UTC
So, do you have any special setup... like crossdev? clang? custom cmake installation? Anything that might be confusing gcc-config and the build environment? Have you tried the default, selecting compiler with gcc-config again, env-update, source /etc/profile, possible re-emerge of cmake?

CCing kde as cmake maintainer. How does the user get the info from Comment #1?
Comment 3 account-removed 2014-02-02 13:59:56 UTC
No special setup, though ~amd64 in ACCEPT_KEYWORDS.
gcc-config reselected, libtool and cmake re-emerged, same result.
I'm starting to think this might be an upstream problem (removed -fPIC?)

Updated log (about the same) https://gist.github.com/8768831
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2014-02-02 16:03:41 UTC
emerges fine on multiple ~amd64 systems here. both with and without ABI_X86="32"
almost 100% sure it's something broken in your toolchain. have you made any radical changes in your toolchain like changed CHOST in make.conf recently?
try to be a bit more proactive with the bug since you are the only one who can reproduce it ;)
'emerge -e system' if in doubt
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2014-02-02 16:05:56 UTC
why do you have so much free space in your CFLAGS and CXXFLAGS?

CFLAGS="        -march=native -O2 -pipe "
CXXFLAGS="      -march=native -O2 -pipe "

this is just a lame'ish guess, but try deleting the extra spaces, maybe it's confusing the cmake.  i don't know why it would, but it's the only thing standing out from the provided files, imho
Comment 6 account-removed 2014-02-02 17:29:28 UTC
I had free space in there because I defined CFLAGS as such:

CFLAGS="
       -march=native -pipe -O2
"

since I used to add -sse4_2 (and a couple others) on another line before.

However, changing CFLAGS line to
CFLAGS="-march=native -pipe -O2"
and emerging openal fixed the issue (CMake recognized GCC as 4.8.2 and compiled sucessfully).

Maybe add into the gcc-optimization wiki page "adding any form of whitespace in USE flags is fine, but in CFLAGS it might break certain packages"?
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2014-02-02 17:58:04 UTC
wow :)
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-11-09 08:23:44 UTC
[Redacting comment to remove PII]

(In reply to Michael Palimaka (kensington) from comment #8)
> Interesting, this is not the first whitespace-induced compile bug I've seen
> before.
> 
> (In reply to [redacted] from comment #6)
> > Maybe add into the gcc-optimization wiki page "adding any form of whitespace
> > in USE flags is fine, but in CFLAGS it might break certain packages"?
> It's a wiki, go for it!