Asterisk dumps core when loading chan_h323.so module compiled against emerged libraries pwlib and openh323 using -Wl,--as-needed. I'm building Asterisk from original source code (1.6.2.x, 1.8.0) on x86_64. But it also happens on x86 platform too. Reproducible: Always Steps to Reproduce: 1. Emerge dev-libs/pwlib and net-libs/openh323 using -Wl,--as-needed (default). 2. Compile Asterisk with h323 support (bundled module chan_h323) against those libraries. 3. Asterisk dumps core when loading chan_h323.so module. Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.4.4, glibc-2.11.2-r0, 2.6.34-gentoo-r6 x86_64) ================================================================= System uname: Linux-2.6.34-gentoo-r6-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9400_@_2.66GHz-with-gentoo-1.12.13 Timestamp of tree: Tue, 26 Oct 2010 22:45:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 4.1_p7 dev-lang/python: 2.6.5-r3, 3.1.2-r4 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 1.12.13 sys-apps/sandbox: 2.3-r1 sys-devel/autoconf: 2.65-r1 sys-devel/automake: 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.4-r2 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.10 sys-devel/make: 3.81-r2 virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/eselect/postgresql /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests ccache distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="ftp://10.1.1.5/gentoo-distfiles/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en ru" MAKEOPTS="-j6" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://10.1.1.5/gentoo-portage/" USE="acl amd64 bash-completion berkdb bzip2 cli cracklib crypt cups cxx diskio dri fortran gdbm gpm iconv idn ipv6 lm_sensors mmx modules mudflap multilib ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline session sse sse2 ssl sysfs tcpd threads unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Adding block to http://bugs.gentoo.org/show_bug.cgi?id=129413
If you do not use the Asterisk ebuild, I can not support you.
I have cleaned up previous Asterisk installation and built Asterisk from net-misc/asterisk-1.6.2.13-r2 ebuild. Trying to load chan_h323.so gives errors: *CLI> module load chan_h323.so Unable to load module chan_h323.so Command 'module load chan_h323.so ' failed. *CLI> [Dec 1 21:18:32] WARNING[18363]: loader.c:387 load_dynamic_module: Error loading module 'chan_h323.so': /usr/lib/asterisk/modules/chan_h323.so: undefined symbol: _ZNK7PObject7CompareERKS_ I know what it means. When building Asterisk from sources I can cleanup channels/h323 directory and rebuild chan_h323.so module, but not with ebuild. Also building Asterisk from sources gives the same error when pwlib and openh323 compiled with --as-needed option.
There is no h323 support in the Asterisk ebuild as this is known broken. The only action I can take based on this bug report is to more aggressively obliterate the H323 support so that it never hits the disk. (I still believe that the h323 module in question was produced by you and not the ebuild though)
Unless I hear otherwise (i.e. in the form of patches that enable a demonstrably non-broken H323 module without relying on packages that have been masked for removal), the newest Asterisk patch set for 1.6.2 will contain a removal patch for the H323 configure checks & build system components.
+ 20 Sep 2011; Tony Vroon <chainsaw@gentoo.org> asterisk-1.8.5.0-r3.ebuild, + asterisk-1.8.6.0.ebuild: + Explicitly block against the abandoned net-libs/openh323 package in the tree. + Closes bug #345635 by Grigoriy Puzankin and bug #383629 by Aidan Marks.