Summary:ASTERISK-18950: weak (linker) attribute handling for MAC/OS in optional_api.h breaks x86 executable (seg fault)
Reporter:Thomas Arimont (tomaso)Labels:
Date Opened:2011-12-01 07:16:01.000-0600Date Closed:2011-12-07 02:42:15.000-0600
Versions: Frequency of
is duplicated byASTERISK-19126 Cannot install asterisk on mac os lion
is related toASTERISK-18728 Segfault in app_stack.so on Solaris
Environment:Asterisk, i586 PC, gcc 3.4Attachments:( 0) config.log
Description:The used gcc is version 3.4 which has weak attribute support (weak only). While building the target is succesful, running Asterisk immediately ends up in a seg fault.
In optional_api.h the set HAVE_ATTRIBUTE_weak flag chooses code for MACOS which seems not to be suitable for a PC.

Manually undefining the HAVE_ATTRIBUTE_weak flag in autoconfig.h solved the problem in my environment for now.
Comments:By: Leif Madsen (lmadsen) 2011-12-01 13:38:15.777-0600

Hopefully someone who uses MacOSX from the community who has an interest in this will take this up and resolve the issue. Thanks for reporting it!

By: Thomas Arimont (tomaso) 2011-12-05 00:27:59.621-0600

I'm not sure if you've really understood this issue. For MacOSX Users this current behaviour should be fine, but not for i586/PC/gcc 3.4(at least) like me. So I don't know if the interest of the MacOSX community is really high, We maybe need MacOSX implementors which are PC-friendly to fix this, and respect the pluralistic world of operation systems ;-)

By: Richard Mudgett (rmudgett) 2011-12-05 10:19:00.075-0600

Please try the patch attached to ASTERISK-18728.

By: Thomas Arimont (tomaso) 2011-12-05 12:44:57.322-0600

Thanks Richard,
looks reasonable, I will try it tomorrow and give some feedback ...

By: Thomas Arimont (tomaso) 2011-12-07 02:41:56.936-0600

o.k., this works fine!