Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 139887 - xine-lib-1.1.2_pre20060328-r9 does not compile (unknown option -fvisibility=hidden)
Summary: xine-lib-1.1.2_pre20060328-r9 does not compile (unknown option -fvisibility=h...
Status: VERIFIED DUPLICATE of bug 132122
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-10 07:45 UTC by Guido Flohr
Modified: 2006-07-10 09:00 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guido Flohr 2006-07-10 07:45:06 UTC
This version of xine-lib (marked as stable) does not compile with gcc 3.3.6:

cc1: error: unrecognized option `-fvisibility=hidden'
make[3]: *** [xineplug_ao_out_oss_la-audio_oss_out.lo] Error 1
make[3]: Leaving directory `/var/tmp/portage/xine-lib-1.1.2_pre20060328-r9/work/xine-lib-1.1.2cvs/src/audio_out'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/xine-lib-1.1.2_pre20060328-r9/work/xine-lib-1.1.2cvs/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/xine-lib-1.1.2_pre20060328-r9/work/xine-lib-1.1.2cvs'
make: *** [all] Error 2

The patch 237_all_visibility.patch seems to address this problem, but not correctly.  With gcc 3.3.6 configure spits out:

  checking if compiler supports __attribute__((visibility("default")))... yes

It shold be "no" because only gcc >= 4.x supports the flag, afaik at least.

Why do you not simply check the gcc version, or alternatively check whether gcc understands the option or not?
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-07-10 07:48:22 UTC
> Why do you not simply check the gcc version, or alternatively check whether gcc
> understands the option or not?

Because it wouldn't make any difference, it'd die either. And there's no way to force users to switch.

http://www.gentoo.org/doc/en/gcc-upgrading.xml

*** This bug has been marked as a duplicate of 132122 ***
Comment 2 Guido Flohr 2006-07-10 08:44:11 UTC
Yes, it _would_ make a difference: gcc 3.3.6 does not support the command line switch "-fvisibility=..." but already supports the function attribute "visibility", see http://gcc.gnu.org/onlinedocs/gcc-3.3.6/gcc/Function-Attributes.html#Function-Attributes and search for "visibility".  And, anyway, gcc only warns about unknown function attributes and will not die.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-07-10 08:46:33 UTC
(In reply to comment #2)
> And, anyway, gcc only warns about unknown function attributes and will not die.

Err?

<snip>
cc1: error: unrecognized option `-fvisibility=hidden'
make[3]: *** [xineplug_ao_out_oss_la-audio_oss_out.lo] Error 1
</snip>
Comment 4 Guido Flohr 2006-07-10 09:00:45 UTC
(In reply to comment #3)
> Err?
> 
> <snip>
> cc1: error: unrecognized option `-fvisibility=hidden'
> make[3]: *** [xineplug_ao_out_oss_la-audio_oss_out.lo] Error 1
> </snip>

That's exactly my point.  The configure macro does not try the command line option but instead compiles a piece of code:

  void __attribute__ ((visibility ("default"))) testfunc() {}

That compiles with gcc 3.3.6, and so the test succeeds, although it should not.