[Home]

Summary:ASTERISK-17022: compiling error in ubuntu 9.04 sparc
Reporter:brianmus (brianmus)Labels:
Date Opened:2010-11-25 00:47:37.000-0600Date Closed:2012-09-05 08:22:35
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Codecs/General
Versions:Frequency of
Occurrence
Related
Issues:
is related toASTERISK-18651 Compile failure Debian/sparc64
Environment:Attachments:
Description:I got problem while I have performed 1.6 or 1.8 compiling. Any ideas?

./configure. no problem.

Problem is while perform make.

<pre>
config.status: creating include/asterisk/autoconfig.h

.$$$$$$$$$$$$$$$=..
.$7$7.. .7$$7:.
.$$:. ,$7.7
.$7. 7$$$$ .$$77
..$$. $$$$$ .$$$7
..7$ .?. $$$$$ .?. 7$$$.
$.$. .$$$7. $$$$7 .7$$$. .$$$.
.777. .$$$$$$77$$$77$$$$$7. $$$,
$$$~ .7$$$$$$$$$$$$$7. .$$$.
.$$7 .7$$$$$$$7: ?$$$.
$$$ ?7$$$$$$$$$$I .$$$7
$$$ .7$$$$$$$$$$$$$$$$ :$$$.
$$$ $$$$$$7$$$$$$$$$$$$ .$$$.
$$$ $$$ 7$$$7 .$$$ .$$$.
$$$$ $$$$7 .$$$.
7$$$7 7$$$$ 7$$$
$$$$$ $$$
$$$$7. $$ (TM)
$$$$$$$. .7$$$$$$ $$
$$$$$$$$$$$$7$$$$$$$$$.$$$$$$
$$$$$$$$$$$$$$$$.

configure: Package configured for:
configure: OS type : linux-gnu
configure: Host CPU : sparc64
configure: build-cpu:vendor:os: sparc64 : unknown : linux-gnu :
configure: host-cpu:vendor:os: sparc64 : unknown : linux-gnu :
CC="cc" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/usr/src/asterisk-1.6.2.0/menuselect'
make[1]: Leaving directory `/usr/src/asterisk-1.6.2.0/menuselect'
CC="cc" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" menuselect
make[1]: Entering directory `/usr/src/asterisk-1.6.2.0/menuselect'
gcc -g -c -D_GNU_SOURCE -Wall -c -o menuselect.o menuselect.c
gcc -g -c -D_GNU_SOURCE -Wall -c -o strcompat.o strcompat.c
gcc -g -c -D_GNU_SOURCE -Wall -c -o menuselect_stub.o menuselect_stub.c
make[2]: Entering directory `/usr/src/asterisk-1.6.2.0/menuselect/mxml'
gcc -O -Wall -c mxml-attr.c
gcc -O -Wall -c mxml-entity.c
gcc -O -Wall -c mxml-file.c
gcc -O -Wall -c mxml-index.c
gcc -O -Wall -c mxml-node.c
gcc -O -Wall -c mxml-search.c
gcc -O -Wall -c mxml-set.c
gcc -O -Wall -c mxml-private.c
gcc -O -Wall -c mxml-string.c
/bin/rm -f libmxml.a
/usr/bin/ar crvs libmxml.a mxml-attr.o mxml-entity.o mxml-file.o mxml-index.o mxml-node.o mxml-search.o mxml-set.o mxml-private.o mxml-string.o
a - mxml-attr.o
a - mxml-entity.o
a - mxml-file.o
a - mxml-index.o
a - mxml-node.o
a - mxml-search.o
a - mxml-set.o
a - mxml-private.o
a - mxml-string.o
ranlib libmxml.a
make[2]: Leaving directory `/usr/src/asterisk-1.6.2.0/menuselect/mxml'
gcc -o menuselect menuselect.o strcompat.o menuselect_stub.o mxml/libmxml.a
make[1]: Leaving directory `/usr/src/asterisk-1.6.2.0/menuselect'
menuselect/menuselect --check-deps menuselect.makeopts
Generating embedded module rules ...
[CC] stereorize.c -> stereorize.o
[CC] frame.c -> frame.o
[LD] stereorize.o frame.o -> stereorize
[CC] streamplayer.c -> streamplayer.o
[LD] streamplayer.o -> streamplayer
[CC] muted.c -> muted.o
[LD] muted.o -> muted
[CC] hashtest2.c -> hashtest2.o
[CP] main/md5.c -> md5.c
[CC] md5.c -> md5.o
[CP] main/utils.c -> utils.c
[CC] utils.c -> utils.o
[CP] main/strings.c -> strings.c
[CC] strings.c -> strings.o
[CP] main/astobj2.c -> astobj2.c
[CC] astobj2.c -> astobj2.o
[CP] main/sha1.c -> sha1.c
[CC] sha1.c -> sha1.o
[CP] main/strcompat.c -> strcompat.c
[CC] strcompat.c -> strcompat.o
[CP] main/threadstorage.c -> threadstorage.c
[CC] threadstorage.c -> threadstorage.o
[CC] clicompat.c -> clicompat.o
[CP] main/poll.c -> poll.c
[CC] poll.c -> poll.o
[LD] hashtest2.o md5.o utils.o strings.o astobj2.o sha1.o strcompat.o threadstorage.o clicompat.o poll.o -> hashtest2
utils.o: In function `ast_atomic_dec_and_test':
/usr/src/asterisk-1.6.2.0/include/asterisk/lock.h:2007: undefined reference to `__sync_sub_and_fetch_4'
utils.o: In function `ast_atomic_fetchadd_int':
/usr/src/asterisk-1.6.2.0/include/asterisk/lock.h:1961: undefined reference to `__sync_fetch_and_add_4'
astobj2.o: In function `ast_atomic_fetchadd_int':
/usr/src/asterisk-1.6.2.0/include/asterisk/lock.h:1961: undefined reference to `__sync_fetch_and_add_4'
/usr/src/asterisk-1.6.2.0/include/asterisk/lock.h:1961: undefined reference to `__sync_fetch_and_add_4'
/usr/src/asterisk-1.6.2.0/include/asterisk/lock.h:1961: undefined reference to `__sync_fetch_and_add_4'
/usr/src/asterisk-1.6.2.0/include/asterisk/lock.h:1961: undefined reference to `__sync_fetch_and_add_4'
astobj2.o:/usr/src/asterisk-1.6.2.0/include/asterisk/lock.h:1961: more undefined references to `__sync_fetch_and_add_4' follow
collect2: ld returned 1 exit status
make[1]: *** [hashtest2] Error 1
make: *** [utils] Error 2

root@para:/usr/src/asterisk-1.6.2.0# uname -a
Linux paradox 2.6.32.4 #1 SMP Fri Jan 22 12:35:06 HKT 2010 sparc64 GNU/Linux
</pre>
Comments:By: Paul Belanger (pabelanger) 2010-11-25 11:51:55.000-0600

Same problem is reproducible under FreeBSD 8.1 i386. For FreeBSD it has to do with not passing "ASTCFLAGS=-march=i686".  I'd would assume it will be the same for sparc64 CPU, just need to figure out the proper -march setting.

By: brianmus (brianmus) 2010-11-26 00:23:31.000-0600

So Is that mean the ./configure script got detect arch wrongly?

I am using sparc CPU and it should be a V9 version.

Will the asterisk capable for linux/sparc?

By: brianmus (brianmus) 2010-12-15 02:37:15.000-0600

It is now OK. can compile. However after make install sucessful, cannot bring the asterisk up.
It is now 1.8.1
root@hhtf04:/usr/src/asterisk-1.8.1# asterisk -vvvvvvc
 == Parsing '/etc/asterisk/asterisk.conf':   == Found
 == Manager registered action DataGet
 == Parsing '/etc/asterisk/codecs.conf':   == Found
Asterisk Dynamic Loader Starting:
 == Parsing '/etc/asterisk/modules.conf':   == Found
 == Parsing '/etc/asterisk/dnsmgr.conf':   == Found
 == Parsing '/etc/asterisk/http.conf':   == Found
 == Manager registered action Ping
 == Manager registered action Events
 == Manager registered action Logoff
 == Manager registered action Login
 == Manager registered action Challenge
 == Manager registered action Hangup
 == Manager registered action Status
 == Manager registered action Setvar
 == Manager registered action Getvar
 == Manager registered action GetConfig
 == Manager registered action GetConfigJSON
 == Manager registered action UpdateConfig
 == Manager registered action CreateConfig
 == Manager registered action ListCategories
 == Manager registered action Redirect
 == Manager registered action Atxfer
 == Manager registered action Originate
 == Manager registered action Command
 == Manager registered action ExtensionState
 == Manager registered action AbsoluteTimeout
 == Manager registered action MailboxStatus
 == Manager registered action MailboxCount
 == Manager registered action ListCommands
 == Manager registered action SendText
 == Manager registered action UserEvent
 == Manager registered action WaitEvent
 == Manager registered action CoreSettings
 == Manager registered action CoreStatus
 == Manager registered action Reload
 == Manager registered action CoreShowChannels
 == Manager registered action ModuleLoad
 == Manager registered action ModuleCheck
 == Manager registered action AOCMessage
 == Parsing '/etc/asterisk/manager.conf':   == Found
 == Parsing '/etc/asterisk/users.conf':   == Found
 == Parsing '/etc/asterisk/cdr.conf':   == Found
[Dec 15 16:35:04] NOTICE[7864]: cdr.c:1567 do_reload: CDR simple logging enabled.
 == Parsing '/etc/asterisk/cel.conf':   == Found
   -- CEL logging disabled.
 == Parsing '/etc/asterisk/dsp.conf':   == Found
 == Parsing '/etc/asterisk/udptl.conf':   == Found
 == UDPTL allocating from port range 4000 -> 4999
Asterisk PBX Core Initializing
Registering builtin applications:
 == Registered custom function 'EXCEPTION'
 == Registered custom function 'TESTTIME'
[Answer]
 == Registered application 'Answer'
[BackGround]
 == Registered application 'BackGround'
[Busy]
 == Registered application 'Busy'
[Congestion]
 == Registered application 'Congestion'
[ExecIfTime]
 == Registered application 'ExecIfTime'
[Goto]
 == Registered application 'Goto'
[GotoIf]
 == Registered application 'GotoIf'
[GotoIfTime]
 == Registered application 'GotoIfTime'
[ImportVar]
 == Registered application 'ImportVar'
[Hangup]
 == Registered application 'Hangup'
[Incomplete]
 == Registered application 'Incomplete'
[NoOp]
 == Registered application 'NoOp'
[Proceeding]
 == Registered application 'Proceeding'
[Progress]
 == Registered application 'Progress'
[RaiseException]
 == Registered application 'RaiseException'
[ResetCDR]
 == Registered application 'ResetCDR'
[Ringing]
 == Registered application 'Ringing'
[SayAlpha]
 == Registered application 'SayAlpha'
[SayDigits]
 == Registered application 'SayDigits'
[SayNumber]
 == Registered application 'SayNumber'
[SayPhonetic]
 == Registered application 'SayPhonetic'
[Set]
 == Registered application 'Set'
[MSet]
 == Registered application 'MSet'
[SetAMAFlags]
 == Registered application 'SetAMAFlags'
[Wait]
 == Registered application 'Wait'
[WaitExten]
 == Registered application 'WaitExten'
 == Manager registered action ShowDialPlan
 == Parsing '/etc/asterisk/indications.conf':   == Found
   -- Registered indication country 'at'
   -- Registered indication country 'au'
   -- Registered indication country 'bg'
   -- Registered indication country 'br'
   -- Registered indication country 'be'
   -- Registered indication country 'ch'
   -- Registered indication country 'cl'
   -- Registered indication country 'cn'
   -- Registered indication country 'cz'
   -- Registered indication country 'de'
   -- Registered indication country 'dk'
   -- Registered indication country 'ee'
   -- Registered indication country 'es'
   -- Registered indication country 'fi'
   -- Registered indication country 'fr'
   -- Registered indication country 'gr'
   -- Registered indication country 'hu'
   -- Registered indication country 'il'
   -- Registered indication country 'in'
   -- Registered indication country 'it'
   -- Registered indication country 'lt'
   -- Registered indication country 'jp'
   -- Registered indication country 'mx'
   -- Registered indication country 'my'
   -- Registered indication country 'nl'
   -- Registered indication country 'no'
   -- Registered indication country 'nz'
   -- Registered indication country 'ph'
   -- Registered indication country 'pl'
   -- Registered indication country 'pt'
   -- Registered indication country 'ru'
   -- Registered indication country 'se'
   -- Registered indication country 'sg'
   -- Registered indication country 'th'
   -- Registered indication country 'uk'
   -- Registered indication country 'us'
   -- Registered indication country 'us-old'
   -- Registered indication country 'tw'
   -- Registered indication country 've'
   -- Registered indication country 'za'
   -- Setting default indication country to 'us'
 == Registered application 'Bridge'
   -- Registered extension context 'parkedcalls'; registrar: features
   -- Added extension '700' priority 1 to parkedcalls
 == Parsing '/etc/asterisk/features.conf':   == Found
   -- Added extension '700' priority 1 to parkedcalls
 == Registered application 'ParkedCall'
 == Registered application 'Park'
 == Manager registered action ParkedCalls
 == Manager registered action Park
 == Manager registered action Bridge
 == Manager registered action DBGet
 == Manager registered action DBPut
 == Manager registered action DBDel
 == Manager registered action DBDelTree
 == Parsing '/etc/asterisk/enum.conf':   == Found
 == Registered application 'CallCompletionRequest'
 == Registered application 'CallCompletionCancel'
 == Parsing '/etc/asterisk/ccss.conf':   == Found
Asterisk Dynamic Loader Starting:
 == Parsing '/etc/asterisk/modules.conf':   == Found
[Dec 15 16:35:04] NOTICE[7864]: loader.c:1118 load_modules: 186 modules will be loaded.
 == Parsing '/etc/asterisk/res_stun_monitor.conf':   == Found
res_stun_monitor.so => (STUN Network Monitor)
 == Registered application 'Monitor'
 == Registered application 'StopMonitor'
 == Registered application 'ChangeMonitor'
 == Registered application 'PauseMonitor'
 == Registered application 'UnpauseMonitor'
 == Manager registered action Monitor
 == Manager registered action StopMonitor
 == Manager registered action ChangeMonitor
 == Manager registered action PauseMonitor
 == Manager registered action UnpauseMonitor
res_monitor.so => (Call Monitoring Resource)
 == Parsing '/etc/asterisk/smdi.conf':   == Found
[Dec 15 16:35:04] NOTICE[7864]: res_smdi.c:1414 load_module: No SMDI interfaces are available to listen on, not starting SMDI listener.
   -- Loaded PUBLIC key 'freeworlddialup'
   -- Loaded PUBLIC key 'iaxtel'
res_crypto.so => (Cryptographic Digital Signatures)
 == Parsing '/etc/asterisk/adsi.conf':   == Found
res_adsi.so => (ADSI Resource)
 == AGI Command 'answer' registered
 == AGI Command 'asyncagi break' registered
 == AGI Command 'channel status' registered
 == AGI Command 'database del' registered
 == AGI Command 'database deltree' registered
 == AGI Command 'database get' registered
 == AGI Command 'database put' registered
 == AGI Command 'exec' registered
 == AGI Command 'get data' registered
 == AGI Command 'get full variable' registered
 == AGI Command 'get option' registered
 == AGI Command 'get variable' registered
 == AGI Command 'hangup' registered
 == AGI Command 'noop' registered
 == AGI Command 'receive char' registered
 == AGI Command 'receive text' registered
 == AGI Command 'record file' registered
 == AGI Command 'say alpha' registered
 == AGI Command 'say digits' registered
 == AGI Command 'say number' registered
 == AGI Command 'say phonetic' registered
 == AGI Command 'say date' registered
 == AGI Command 'say time' registered
 == AGI Command 'say datetime' registered
 == AGI Command 'send image' registered
 == AGI Command 'send text' registered
 == AGI Command 'set autohangup' registered
 == AGI Command 'set callerid' registered
 == AGI Command 'set context' registered
 == AGI Command 'set extension' registered
 == AGI Command 'set music' registered
 == AGI Command 'set priority' registered
 == AGI Command 'set variable' registered
 == AGI Command 'stream file' registered
 == AGI Command 'control stream file' registered
 == AGI Command 'tdd mode' registered
 == AGI Command 'verbose' registered
 == AGI Command 'wait for digit' registered
 == AGI Command 'speech create' registered
 == AGI Command 'speech set' registered
 == AGI Command 'speech destroy' registered
 == AGI Command 'speech load grammar' registered
 == AGI Command 'speech unload grammar' registered
 == AGI Command 'speech activate grammar' registered
 == AGI Command 'speech deactivate grammar' registered
 == AGI Command 'speech recognize' registered
 == Registered application 'DeadAGI'
 == Registered application 'EAGI'
 == Manager registered action AGI
 == Registered application 'AGI'
res_agi.so => (Asterisk Gateway Interface (AGI))
res_speech.so => (Generic Speech Recognition API)
 == Parsing '/etc/asterisk/res_fax.conf':   == Found
 == Registered application 'SendFAX'
 == Registered application 'ReceiveFAX'
 == Registered custom function 'FAXOPT'
res_fax.so => (Generic FAX Applications)
 == Parsing '/etc/asterisk/calendar.conf':   == Found
 == Registered custom function 'CALENDAR_BUSY'
 == Registered custom function 'CALENDAR_EVENT'
 == Registered custom function 'CALENDAR_QUERY'
 == Registered custom function 'CALENDAR_QUERY_RESULT'
 == Registered custom function 'CALENDAR_WRITE'
res_calendar.so => (Asterisk Calendar integration)
res_ael_share.so => (share-able code for AEL)
 == Parsing '/etc/asterisk/res_pgsql.conf':   == Found
[Dec 15 16:35:05] ERROR[7864]: res_config_pgsql.c:1490 pgsql_reconnect: PostgreSQL RealTime: Failed to connect database asterisk on 127.0.0.1:
[Dec 15 16:35:05] WARNING[7864]: res_config_pgsql.c:1442 parse_config: PostgreSQL RealTime: Couldn't establish connection. Check debug.
 == PostgreSQL RealTime reloaded.
[Dec 15 16:35:05] NOTICE[7864]: config.c:1988 ast_config_engine_register: Registered Config Engine pgsql
PostgreSQL RealTime driver loaded.
res_config_pgsql.so => (PostgreSQL RealTime Configuration Driver)
 == Parsing '/etc/asterisk/res_ldap.conf':   == Found
[Dec 15 16:35:05] NOTICE[7864]: res_config_ldap.c:1629 parse_config: No directory user found, anonymous binding as default.
[Dec 15 16:35:05] ERROR[7864]: res_config_ldap.c:1655 parse_config: No directory URL or host found.
[Dec 15 16:35:05] ERROR[7864]: res_config_ldap.c:1538 load_module: Cannot load LDAP RealTime driver.
res_config_ldap.so => (LDAP realtime interface)
 == Parsing '/etc/asterisk/musiconhold.conf':   == Found
 == Registered application 'MusicOnHold'
 == Registered application 'WaitMusicOnHold'
 == Registered application 'SetMusicOnHold'
 == Registered application 'StartMusicOnHold'
 == Registered application 'StopMusicOnHold'
res_musiconhold.so => (Music On Hold Resource)
res_timing_timerfd.so => (Timerfd Timing Interface)
res_timing_pthread.so => (pthread Timing Interface)
 == Registered RTP engine 'multicast'
res_rtp_multicast.so => (Multicast RTP Engine)
 == Registered RTP engine 'asterisk'
 == Parsing '/etc/asterisk/rtp.conf':   == Found
 == RTP Allocating from port range 10000 -> 20000
res_rtp_asterisk.so => (Asterisk RTP Stack)
 == Registered channel type 'MulticastRTP' (Multicast RTP Paging Channel Driver)
chan_multicast_rtp.so => (Multicast RTP Paging Channel)
 == Parsing '/etc/asterisk/iax.conf':   == Found
 == Parsing '/etc/asterisk/users.conf':   == Found
 == Binding IAX2 to default address 0.0.0.0:4569
      > doing dnsmgr_lookup for '216.207.245.47'
 == Registered application 'IAX2Provision'
 == Registered custom function 'IAXPEER'
 == Registered custom function 'IAXVAR'
 == Manager registered action IAXpeers
 == Manager registered action IAXpeerlist
 == Manager registered action IAXnetstats
 == Manager registered action IAXregistry
 == Registered channel type 'IAX2' (Inter Asterisk eXchange Driver (Ver 2))
 == 10 helper threads started
 == IAX Ready and Listening
 == Parsing '/etc/asterisk/iaxprov.conf':   == Found
   -- Loaded provisioning template 'default'
chan_iax2.so => (Inter Asterisk eXchange (Ver 2))
 == Parsing '/etc/asterisk/mgcp.conf':   == Found
 == MGCP Listening on 0.0.0.0:2727
 == Registered channel type 'MGCP' (Media Gateway Control Protocol (MGCP))
 == Registered RTP glue 'MGCP'
chan_mgcp.so => (Media Gateway Control Protocol (MGCP))
[Dec 15 16:35:07] NOTICE[7864]: chan_skinny.c:7156 config_load: Configuring skinny from skinny.conf
 == Parsing '/etc/asterisk/skinny.conf':   == Found
 == Skinny listening on 0.0.0.0:2000
 == Registered channel type 'Skinny' (Skinny Client Control Protocol (Skinny))
 == Registered RTP glue 'Skinny'
 == Manager registered action SKINNYdevices
 == Manager registered action SKINNYshowdevice
 == Manager registered action SKINNYlines
 == Manager registered action SKINNYshowline
chan_skinny.so => (Skinny Client Control Protocol (Skinny))
SIP channel loading...
 == Parsing '/etc/asterisk/sip.conf':   == Found
 == Parsing '/etc/asterisk/users.conf':   == Found
 == SIP Listening on 0.0.0.0:5060
 == Using SIP CoS mark 4
 == Parsing '/etc/asterisk/sip_notify.conf':   == Found
 == Registered channel type 'SIP' (Session Initiation Protocol (SIP))
 == Registered RTP glue 'SIP'
 == Registered application 'SIPDtmfMode'
 == Registered application 'SIPAddHeader'
 == Registered application 'SIPRemoveHeader'
 == Registered custom function 'SIP_HEADER'
 == Registered custom function 'SIPPEER'
 == Registered custom function 'SIPCHANINFO'
 == Registered custom function 'CHECKSIPDOMAIN'
 == Manager registered action SIPpeers
 == Manager registered action SIPshowpeer
 == Manager registered action SIPqualifypeer
 == Manager registered action SIPshowregistry
 == Manager registered action SIPnotify
chan_sip.so => (Session Initiation Protocol (SIP))
 == Registered channel type 'Bridge' (Bridge Interaction Channel)
chan_bridge.so => (Bridge Interaction Channel)
 == Registered channel type 'Local' (Local Proxy Channel Driver)
 == Manager registered action LocalOptimizeAway
chan_local.so => (Local Proxy Channel (Note: used internally by other modules))
 == Registered channel type 'Agent' (Call Agent Proxy Channel)
 == Parsing '/etc/asterisk/agents.conf':   == Found
 == Parsing '/etc/asterisk/users.conf':   == Found
 == Registered application 'AgentLogin'
 == Registered application 'AgentMonitorOutgoing'
 == Manager registered action Agents
 == Manager registered action AgentLogoff
 == Registered custom function 'AGENT'
chan_agent.so => (Agent Proxy Channel)
 == Registered file format siren14, extension(s) siren14
format_siren14.so => (ITU G.722.1 Annex C (Siren14, licensed from Polycom))
 == Registered file format iLBC, extension(s) ilbc
format_ilbc.so => (Raw iLBC data)
 == Registered file format wav49, extension(s) WAV|wav49
format_wav_gsm.so => (Microsoft WAV format (Proprietary GSM))
 == Registered file format sln16, extension(s) sln16
format_sln16.so => (Raw Signed Linear 16KHz Audio support (SLN16))
 == Registered file format pcm, extension(s) pcm|ulaw|ul|mu|ulw
 == Registered file format alaw, extension(s) alaw|al|alw
 == Registered file format au, extension(s) au
 == Registered file format g722, extension(s) g722
format_pcm.so => (Raw/Sun uLaw/ALaw 8KHz (PCM,PCMA,AU), G.722 16Khz)
 == Registered file format g729, extension(s) g729
format_g729.so => (Raw G.729 data)
 == Registered file format gsm, extension(s) gsm
format_gsm.so => (Raw GSM data)
 == Registered file format g719, extension(s) g719
format_g719.so => (ITU G.719)
 == Registered file format siren7, extension(s) siren7
format_siren7.so => (ITU G.722.1 (Siren7, licensed from Polycom))
 == Registered file format h264, extension(s) h264
format_h264.so => (Raw H.264 data)
 == Registered format 'jpg' (JPEG (Joint Picture Experts Group))
format_jpeg.so => (jpeg (joint picture experts group) image format)
 == Registered file format g726-40, extension(s) g726-40
 == Registered file format g726-32, extension(s) g726-32
 == Registered file format g726-24, extension(s) g726-24
 == Registered file format g726-16, extension(s) g726-16
format_g726.so => (Raw G.726 (16/24/32/40kbps) data)
 == Registered file format sln, extension(s) sln|raw
format_sln.so => (Raw Signed Linear Audio support (SLN))
 == Registered file format wav, extension(s) wav
 == Registered file format wav16, extension(s) wav16
format_wav.so => (Microsoft WAV/WAV16 format (8kHz/16kHz Signed Linear))
 == Registered file format h263, extension(s) h263
format_h263.so => (Raw H.263 data)
 == Registered file format g723sf, extension(s) g723|g723sf
format_g723.so => (G.723.1 Simple Timestamp File Format)
 == Registered file format vox, extension(s) vox
format_vox.so => (Dialogic VOX (ADPCM) File Format)
 == Registered application 'ConfBridge'
app_confbridge.so => (Conference Bridge Application)
 == Registered custom function 'DEVICE_STATE'
 == Registered custom function 'HINT'
func_devstate.so => (Gets or sets a device state in the dialplan)
 == Parsing '/etc/asterisk/cdr_manager.conf':   == Found
cdr_manager.so => (Asterisk Manager Interface CDR Backend)
 == Parsing '/etc/asterisk/cdr_custom.conf':   == Found
cdr_custom.so => (Customizable Comma Separated Values CDR Backend)
 == Parsing '/etc/asterisk/cdr_sqlite3_custom.conf':   == Found
   -- cdr_sqlite3_custom: Logging CDR records to table 'cdr' in 'master.db'
Bus error
root@hhtf04:/usr/src/asterisk-1.8.1#

By: brianmus (brianmus) 2010-12-15 02:37:45.000-0600

root@hhtf04:/usr/src/asterisk-1.8.1# tail /var/log/asterisk/messages
[Dec 15 16:35:04] NOTICE[7864] cdr.c: CDR simple logging enabled.
[Dec 15 16:35:04] NOTICE[7864] loader.c: 186 modules will be loaded.
[Dec 15 16:35:04] NOTICE[7864] res_smdi.c: No SMDI interfaces are available to listen on, not starting SMDI listener.
[Dec 15 16:35:05] ERROR[7864] res_config_pgsql.c: PostgreSQL RealTime: Failed to connect database asterisk on 127.0.0.1:
[Dec 15 16:35:05] WARNING[7864] res_config_pgsql.c: PostgreSQL RealTime: Couldn't establish connection. Check debug.
[Dec 15 16:35:05] NOTICE[7864] config.c: Registered Config Engine pgsql
[Dec 15 16:35:05] NOTICE[7864] res_config_ldap.c: No directory user found, anonymous binding as default.
[Dec 15 16:35:05] ERROR[7864] res_config_ldap.c: No directory URL or host found.
[Dec 15 16:35:05] ERROR[7864] res_config_ldap.c: Cannot load LDAP RealTime driver.
[Dec 15 16:35:07] NOTICE[7864] chan_skinny.c: Configuring skinny from skinny.conf

By: Paul Belanger (pabelanger) 2010-12-15 14:14:30.000-0600

Debugging deadlocks:

Please select DEBUG_THREADS and DONT_OPTIMIZE in the Compiler Flags section of menuselect. Recompile and install Asterisk (i.e. make install)

This will then give you the console command:

core show locks

When the symptoms of the deadlock present themselves again, please provide output of the deadlock via:

# asterisk -rx "core show locks" | tee /tmp/core-show-locks.txt

# gdb -se "asterisk" <pid of asterisk> | tee /tmp/backtrace.txt

gdb> bt
gdb> bt full
gdb> thread apply all bt

Then attach the core-show-locks.txt and backtrace.txt files to this issue. Thanks!

By: brianmus (brianmus) 2010-12-15 21:08:40.000-0600

I still could not perform that. why?

root@hhtf04:/usr/src/asterisk-1.8.1# asterisk -vvvvx "core show locks" | tee /tmp/core-show-locks.txt
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
root@hhtf04:/usr/src/asterisk-1.8.1# asterisk -rx
asterisk: option requires an argument -- 'x'
root@hhtf04:/usr/src/asterisk-1.8.1# asterisk -rx "core show locks" | tee /tmp/core-show-locks.txt
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
root@hhtf04:/usr/src/asterisk-1.8.1#

By: Tilghman Lesher (tilghman) 2010-12-16 02:18:10.000-0600

What is the output of the script ./config.guess on your system?  We probably need to add the -mcpu=v9 to all invocations of gcc, so that it can find the sync-add instructions for your processor.  I suspect the issue is that by default, it's selecting the v7 instructions, which probably don't support these atomic instructions.

By: brianmus (brianmus) 2010-12-16 04:03:57.000-0600

root@hhtf04:/usr/src/asterisk-1.8.1# ./config.guess
sparc64-unknown-linux-gnu
root@hhtf04:/usr/src/asterisk-1.8.1#

how could I add flag of v9?

By: Alec Davis (alecdavis) 2011-10-04 19:04:24.243-0500

had the similar issue with asterisk 1.8 svn and debian squeeze on a sparc64.
Last week had compiled and ran with debian lenny fine.

{code}
  [LD] abstract_jb.o acl.o alaw.o aoc.o app.o ast_expr2.o ast_expr2f.o asterisk.o astfd.o astmm.o astobj2.o audiohook.o autochan.o autoservice.o bridging.o callerid.o ccss.o cdr.o cel.o channel.o chanvars.o cli.o config.o data.o datastore.o db.o devicestate.o dial.o dns.o dnsmgr.o dsp.o enum.o event.o features.o file.o fixedjitterbuf.o frame.o framehook.o fskmodem.o global_datastores.o hashtab.o heap.o http.o image.o indications.o io.o jitterbuf.o loader.o lock.o logger.o manager.o md5.o netsock.o netsock2.o pbx.o plc.o poll.o privacy.o rtp_engine.o say.o sched.o security_events.o sha1.o slinfactory.o srv.o ssl.o stdtime/localtime.o strcompat.o strings.o stun.o syslog.o taskprocessor.o tcptls.o tdd.o term.o test.o threadstorage.o timing.o translate.o udptl.o ulaw.o utils.o version.o xml.o xmldoc.o editline/libedit.a db1-ast/libdb1.a  -> asterisk
utils.o: In function `ast_atomic_fetchadd_int':
/usr/src/pbx/asterisk-1.8/include/asterisk/lock.h:600: undefined reference to `__sync_fetch_and_add_4'
utils.o: In function `ast_atomic_dec_and_test':
/usr/src/pbx/asterisk-1.8/include/asterisk/lock.h:646: undefined reference to `__sync_sub_and_fetch_4'
collect2: ld returned 1 exit status
make[1]: *** [asterisk] Error 1
make: *** [main] Error 2
{code}

changed -mcpu=v8 to -mcpu=v9 in Makefile as below
OPTIONS+=$(shell if $(CC) -mcpu=v9 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mcpu=v9"; fi)

Then 'make clean' then 'make'
Now runs.

Not too sure how to fix it properly in the repository, to be compatible with various versions of gcc.
the comment below in the Makefile is what makes me nervous.
{code}
   #The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
   #This works for even old (2.96) versions of gcc and provides a small boost either way.
   #A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn't support it.
   #So we go lowest common available by gcc and go a step down, still a step up from
   #the default as we now have a better instruction set to work with. - Belgarath
{code}

By: Alec Davis (alecdavis) 2011-10-04 19:09:34.648-0500

reopened as it's still an issue.

By: Jeremy Kister (jkister) 2011-10-04 20:23:14.694-0500

the new symptoms are now a dupe of ASTERISK-18651

i opened the new ticket because this ticket's core issue was a bit different and actually fixed..

By: Gregory Hinton Nietsky (irroot) 2011-10-05 03:10:43.091-0500

Please supply GCC / libc version ...

By: Alec Davis (alecdavis) 2011-10-05 17:17:12.617-0500

{code}
debian:~# /lib/libc.so.6
GNU C Library (Debian EGLIBC 2.11.2-10) stable release version 2.11.2, by Roland McGrath et al.
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.4.5.
Compiled on a Linux 2.6.32 system on 2011-01-23.
Available extensions:
       crypt add-on version 2.1 by Michael Glad and others
       GNU Libidn by Simon Josefsson
       Native POSIX Threads Library by Ulrich Drepper et al
       BIND-8.2.3-T5B
       software FPU emulation by Richard Henderson, Jakub Jelinek and others
For bug reporting instructions, please see:
<http://www.debian.org/Bugs/>.
{code}
{code}
debian:~# gcc -v
Using built-in specs.
Target: sparc-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --with-long-double-128 --enable-checking=release --build=sparc-linux-gnu --host=sparc-linux-gnu --target=sparc-linux-gnu
Thread model: posix
gcc version 4.4.5 (Debian 4.4.5-8)
debian:~#
{code}

By: Matt Jordan (mjordan) 2012-09-05 08:22:35.832-0500

I'm going to go ahead and close this out as ASTERISK-18651 was committed, and appears to have fixed this issue as well.

If that turns out to not be the case, please contact a bug marshal in #asterisk-bugs and we can reopen this issue.  Thanks!