Fwd: Fwd: [uClinux-dev] asterisk with uClinux error

Jamie Lokier jamie at shareable.org
Fri May 7 09:22:58 EDT 2010

Zaya Kh wrote:
>    our cross compiler tool chain is Petalinux, we use it,
>    I want create Petalinux with Asterisk PBX,
>    And i used "find" command this result
>    ./lib/libatm/config.log
>    ./user/thttpd/config.log
>    ./user/traceroute/config.log
>    ./user/at/config.log
>    ./user/w3cam/config.log
>    ./user/tcpdump/config.log
>    ./user/asterisk/editline/config.log
>    ./user/mawk/config.log
>    ./user/smtpclient/config.log
>    ./user/python/config.log
>    ./user/boa/src/config.log
>    ./user/lrzsz/config.log
>    then i can see ./user/asterisk/editline/config.log:
>    [root at localhost petalinux-dist]# more
>    ./user/asterisk/editline/config.log
>    This file contains any messages produced by compilers while
>    running configure, to aid debugging if configure makes a mistake.
>    configure:534: checking for gcc
>    configure:647: checking whether the C compiler (ucfront-gcc
>    microblaze-uclinux-g
>    cc  -Os -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall
>    -mno-xl-so
>    ft-mul -mno-xl-soft-div -mxl-barrel-shift -mcpu=v6.00.b   -DEMBED
>    -Dlinux -D__li
>    nux__ -Dunix -D__uClinux__ -DLINUX -pipe  -Wall -Wstrict-prototypes
>    -Wmissing-pr
>    ototypes -Wmissing-declarations -g  -Iinclude -I../include
>    OURCE  -O6
>    -I/opt/petalinux-v0.40-final/software/petalinux-dist/user/asterisk/ti
>    nytcap -DASTERISK_VERSION="1.0.7" -DASTETCDIR="/etc/config/asterisk"
>    ="/lib/asterisk" -DASTVARLIBDIR="/var/lib/asterisk"
>    -DASTVARRUNDIR="/var/run" -D
>    ASTSPOOLDIR="/var/spool/asterisk" -DASTLOGDIR="/var/log/asterisk"
>    "/etc/config/asterisk/asterisk.conf"
>    -DASTMODDIR="/lib/asterisk/modules" -DASTAG
>    IDIR="/agi-bin"     -DBUSYDETECT_MARTIN        -mno-xl-soft-mul
>    -mno-xl-soft-div
>     -mxl-barrel-shift -mcpu=v6.00.b  -Wl,-elf2flt -L../tinytcap) works
>    configure:663: ucfront-gcc microblaze-uclinux-gcc  -Os -g
>    -fomit-frame-pointer -
>    pipe -fno-common -fno-builtin -Wall  -mno-xl-soft-mul -mno-xl-soft-div
>    -mxl-barr
>    el-shift -mcpu=v6.00.b   -DEMBED -Dlinux -D__linux__ -Dunix
>    -D__uClinux__ -DLINU
>    X -pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes
>    -Wmissing-declarations -
>    g  -Iinclude -I../include -D_REENTRANT -D_GNU_SOURCE  -O6
>    -I/opt/petalinux-v0.40
>    -final/software/petalinux-dist/user/asterisk/tinytcap
>     -DASTETCDIR="/etc/config/asterisk" -DASTLIBDIR="/lib/asterisk"
>    /var/lib/asterisk" -DASTVARRUNDIR="/var/run"
>    -DASTSPOOLDIR="/var/spool/asterisk"
>     -DASTLOGDIR="/var/log/asterisk"
>    -DASTCONFPATH="/etc/config/asterisk/[1]asterisk.co
>    nf" -DASTMODDIR="/lib/asterisk/modules" -DASTAGIDIR="/agi-bin"
>    MARTIN      -o conftest    -mno-xl-soft-mul -mno-xl-soft-div
>    -mxl-barrel-shift -
>    mcpu=v6.00.b  -Wl,-elf2flt -L../tinytcap conftest.c  -Wl,-Bstatic
>    -lssl -Wl,-Bdy
>    namic -Wl,-Bstatic -lcrypto -Wl,-Bdynamic -lpthread -lm -ldl  1>&5
>    configure:660: warning: return type defaults to `int'
>    configure:660: warning: function declaration isn't a prototype
>    /opt/petalinux-v0.40-final/tools/linux-i386/microblaze-uclinux-tools/b
>    in/../lib/

>    gcc/microblaze-uclinux/3.4.1/../../../../microblaze-uclinux/bin/ld.real: cannot find -lssl
>    collect2: ld returned 1 exit status
>    configure: failed program was:
>    #line 658 "configure"
>    #include "confdefs.h"
>    main(){return(0);}

That's the problem: it cannot find -lssl.

Somehow -lssl has been included in the LIBS environment variable, but
it's not installed in your toolchain or built by your uClinux build process,
or if it is built, it's not added to the library path in LDFLAGS or LIBS.

Probably it has been passed to ./user/asterisk/editline/configure by
another script, or by a Makefule.  You should be able to see what's
passed near the beginning of config.log.  I seems unlikely that a
sub-package called "editline" would add -lssl on purpose.

If you're lucky, it will be enough to enable openSSL in the uClinux
build configuration.

-- Jamie

More information about the uClinux-dev mailing list