[opus] libopus cross compile for bf537 runtime error releated to "-lopus"

David A. Bardsley dbardsley at pantelintl.com
Fri Apr 29 23:13:20 UTC 2016


Hello all!

I'm having trouble with a cross compiled libopus for an embedded 
application and would like some help.

preamble:
     embedded details:
         processor: bf537
         kernel: Linux release 3.0.8-ADI-2011R1-svn4693, build #2834 Fri 
Apr 22 12:35:34 ADT 2016
         toolchain: bfin-linux-uclibc-gcc release gcc version 4.3.5 
(ADI-2011R1-RC4)
         audio interface: ALSA
     opus:
         version: 1.1.2
         build process:
             export 
CC=/opt/uClinux/bfin-linux-uclibc/bin/bfin-linux-uclibc-gcc
             export CFLAGS=-funroll-loops\ -ffast-math\ -mfast-fp\ 
-DFLOAT_APPROX\ -O3
             export LDFLAGS=-isystem\ 
/home/dab/Pantel/svn/blackfin_env/2011r1/main/blackfin-linux-dist/staging/usr/include\ 
-L/home/dab/Pantel/svn/blackfin_env/2011r1/main/blackfin-linux-dist/staging/usr/lib
             export 
STRIP=/opt/uClinux/bfin-linux-uclibc/bin/bfin-linux-uclibc-strip
             ./configure --enable-fixed-point --host=blackfin
             make

After populating the headers and library to the needed staging areas the 
appplication build appears to run fine.  When the program executes, 
after only having the library linked during the make (LDFLAGS += 
-lopus), the ALSA setup becomes very upse at run time:

ALSA lib 
/home/dab/Pantel/svn/blackfin_env/2011r1/main/blackfin-linux-dist/lib/alsa-lib/alsa-lib-1.0.24/src/dlmisc.c:124:(snd_dlsym_verify) 
unable to verify version for symbol _snd_ctl_hw_open
ALSA lib 
/home/dab/Pantel/svn/blackfin_env/2011r1/main/blackfin-linux-dist/lib/alsa-lib/alsa-lib-1.0.24/src/dlmisc.c:246:(snd1_dlobj_cache_get) 
symbol _snd_ctl_hw_open is not defined inside [builtin]
ALSA lib 
/home/dab/Pantel/svn/blackfin_env/2011r1/main/blackfin-linux-dist/lib/alsa-lib/alsa-lib-1.0.24/src/confmisc.c:674:(snd_determine_driver) 
could not open control for card 0
ALSA lib 
/home/dab/Pantel/svn/blackfin_env/2011r1/main/blackfin-linux-dist/lib/alsa-lib/alsa-lib-1.0.24/src/conf.c:3326:(snd_config_hooks_call) 
function snd_config_hook_load_for_all_cards returned error: No such 
device or address
ALSA lib 
/home/dab/Pantel/svn/blackfin_env/2011r1/main/blackfin-linux-dist/lib/alsa-lib/alsa-lib-1.0.24/src/dlmisc.c:124:(snd_dlsym_verify) 
unable to verify version for symbol _snd_ctl_hw_open
ALSA lib 
/home/dab/Pantel/svn/blackfin_env/2011r1/main/blackfin-linux-dist/lib/alsa-lib/alsa-lib-1.0.24/src/dlmisc.c:246:(snd1_dlobj_cache_get) 
symbol _snd_ctl_hw_open is not defined inside [builtin]
ALSA lib 
/home/dab/Pantel/svn/blackfin_env/2011r1/main/blackfin-linux-dist/lib/alsa-lib/alsa-lib-1.0.24/src/confmisc.c:674:(snd_determine_driver) 
could not open control for card 0
ALSA lib 
/home/dab/Pantel/svn/blackfin_env/2011r1/main/blackfin-linux-dist/lib/alsa-lib/alsa-lib-1.0.24/src/conf.c:4184:(_snd_config_evaluate) 
function snd_func_card_driver returned error: No such device or address
ALSA lib 
/home/dab/Pantel/svn/blackfin_env/2011r1/main/blackfin-linux-dist/lib/alsa-lib/alsa-lib-1.0.24/src/confmisc.c:392:(snd_func_concat) 
error evaluating strings
ALSA lib 
/home/dab/Pantel/svn/blackfin_env/2011r1/main/blackfin-linux-dist/lib/alsa-lib/alsa-lib-1.0.24/src/conf.c:4184:(_snd_config_evaluate) 
function snd_func_concat returned error: No such device or address
ALSA lib 
/home/dab/Pantel/svn/blackfin_env/2011r1/main/blackfin-linux-dist/lib/alsa-lib/alsa-lib-1.0.24/src/confmisc.c:1251:(snd_func_refer) 
error evaluating name
ALSA lib 
/home/dab/Pantel/svn/blackfin_env/2011r1/main/blackfin-linux-dist/lib/alsa-lib/alsa-lib-1.0.24/src/conf.c:4184:(_snd_config_evaluate) 
function snd_func_refer returned error: No such device or address
ALSA lib 
/home/dab/Pantel/svn/blackfin_env/2011r1/main/blackfin-linux-dist/lib/alsa-lib/alsa-lib-1.0.24/src/conf.c:4663:(snd_config_expand) 
Evaluate error: No such device or address
ALSA lib 
/home/dab/Pantel/svn/blackfin_env/2011r1/main/blackfin-linux-dist/lib/alsa-lib/alsa-lib-1.0.24/src/pcm/pcm.c:2212:(snd_pcm_open_noupdate) 
Unknown PCM cards.pcm.default

Simply adding/removing the LDFLAGS member -lopus causes/removes the 
complaints at run time.  To be clear simply commenting out "LDFLAGS += 
-lopus" from the make file silences the complaints.

Where have I gone astray?  Am I making a huge blunder during the library 
cross compile and somehow smashing my ALSA?  I should note that when I 
perform a straight-up build for my appllication for my i7 GNU/Linux 
machine (the build environment) the application works fine (the library 
linking and then somthing useful as well) so clearly I've broken the 
cross compile or link somehow.

Any assistance in pointing me to where I may have gone astray would be 
greatly apprecieated.

Dave

-- 
David A. Bardsley | Electrical Engineer
*Pantel International* |
125 Joseph Zatzman Drive | Dartmouth, Nova Scotia | B3B 1W1
Phone: (902)468-5998 | Fax: (902)468-6577
pantelintl.com <http://pantelintl.com/>

Pantel Sig

/Please consider the environment before printing this e-mail 
The 
information contained in this e-mail message, together with any 
attachments thereto, are intended only for the personal and confidential 
use of the addressee(s) named above. The message and the attachments are 
or may be a privileged or protected communication. If you are not the 
intended recipient of this message, or authorized to receive it for the 
intended recipient, you have received this message in error. If you 
received this message in error, you are not to review, use, disseminate, 
distribute or copy it or any attachments and are requested to 
immediately notify us by return e-mail message, and delete the original 
message./
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/opus/attachments/20160429/9edb8142/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pantel_email_sig.png
Type: image/png
Size: 2399 bytes
Desc: not available
URL: <http://lists.xiph.org/pipermail/opus/attachments/20160429/9edb8142/attachment.png>


More information about the opus mailing list