[asterisk-bugs] [Asterisk 0016845]: Incorrect linker flags used on OpenSolaris

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Mar 23 14:21:08 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16845 
====================================================================== 
Reported By:                bklang
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16845
Category:                   Addons/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     acknowledged
Asterisk Version:           SVN 
JIRA:                       SWP-928 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.2 
SVN Revision (number only!): 1091 
Request Review:              
====================================================================== 
Date Submitted:             2010-02-16 13:15 CST
Last Modified:              2010-03-23 14:21 CDT
====================================================================== 
Summary:                    Incorrect linker flags used on OpenSolaris
Description: 
While Asterisk itself builds cleanly on OpenSolaris, asterisk-addons does
not due to invalid linker flags.

gmake[1]: Entering directory
`/export/home/admin/asterisk-addons-1.6.2.svn/cdr'
   [CC] cdr_addon_mysql.c -> cdr_addon_mysql.o
   [LD] cdr_addon_mysql.o -> cdr_addon_mysql.so
usage: ld [-6:abc:d:e:f:h:il:mo:p:rstu:z:B:CD:F:GI:L:M:N:P:Q:R:S:VW:Y:?]
file(s)
<...ld usage output removed...>

I can still manually link the objects with the following commands:
gcc -pg -shared -o cdr_addon_mysql.so -L/opt/SUNWspro/lib -lCrun -lrt
-L/usr/mysql/5.0/lib/mysql -R/usr/mysql/5.0/lib/mysql -lmysqlclient -lz
-lgen -lsocket -lnsl -lm cdr_addon_mysql.o
====================================================================== 

---------------------------------------------------------------------- 
 (0119760) bklang (reporter) - 2010-03-23 14:21
 https://issues.asterisk.org/view.php?id=16845#c119760 
---------------------------------------------------------------------- 
Here is the output from NOISY_BUILD when linking:

gcc  -o cdr_addon_mysql.so   -shared -Xlinker -x cdr_addon_mysql.o 
usage: ld [-6:abc:d:e:f:h:il:mo:p:rstu:z:B:CD:F:GI:L:M:N:P:Q:R:S:VW:Y:?]
file(s)
... lots of "ld" output removed ...

I note a couple things here:
1) It's not using the MySQL client library information from makeopts.  My
makeopts has
MYSQLCLIENT_LIB=-L/opt/SUNWspro/lib -lCrun -lrt -L/usr/mysql/5.0/lib/mysql
-R/usr/mysql/5.0/lib/mysql -lmysqlclient -lz -lgen -lsocket -lnsl -lm

2) As noted originally, these linker flags are not valid for Solaris' ld
(specifically -Xlinker and -x) 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-03-23 14:21 bklang         Note Added: 0119760                          
======================================================================




More information about the asterisk-bugs mailing list