All of lore.kernel.org
 help / color / mirror / Atom feed
* developing audio with ALSA
@ 2008-08-13  6:48 Henry Ho
  2008-08-13  8:19 ` Colin Guthrie
  0 siblings, 1 reply; 5+ messages in thread
From: Henry Ho @ 2008-08-13  6:48 UTC (permalink / raw)
  To: alsa-devel

Hi

I'm developing audio application using ALSA library. My target platform is ARM 
platform baseboard. I use GNU toolchain cross compiler as you can see from 
the following message:

arm-none-linux-gnueabi-gcc -lasound -g -O2 -I./alsa-lib-1.0.17rc2/include -o pcm pcm.c
/usr/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lasound
collect2: ld returned 1 exit status
make: *** [versatile] Error 1

I know that is because the linker cannot find the asound library. Should I cross compiling 
ALSA driver/lib/utils first?

Henry
=====================================================================================================================================
The privileged confidential information  contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of RichWave is strictly prohibited; and any information in this email irrelevant to the official business of RichWave shall be deemed as neither given nor endorsed by RichWave. 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: developing audio with ALSA
  2008-08-13  6:48 Henry Ho
@ 2008-08-13  8:19 ` Colin Guthrie
  0 siblings, 0 replies; 5+ messages in thread
From: Colin Guthrie @ 2008-08-13  8:19 UTC (permalink / raw)
  To: alsa-devel

Henry Ho wrote:
> Hi
> 
> I'm developing audio application using ALSA library. My target platform is ARM 
> platform baseboard. I use GNU toolchain cross compiler as you can see from 
> the following message:
> 
> arm-none-linux-gnueabi-gcc -lasound -g -O2 -I./alsa-lib-1.0.17rc2/include -o pcm pcm.c
> /usr/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lasound
> collect2: ld returned 1 exit status
> make: *** [versatile] Error 1
> 
> I know that is because the linker cannot find the asound library. Should I cross compiling 
> ALSA driver/lib/utils first?

The drivers will possibly already be in your kernel, and the utils will 
help you initialise your sound hardware properly (set volumes, switches 
etc.).

And the library, well, you defo need that  :)

Col

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: developing audio with ALSA
@ 2008-08-18  9:15 Henry Ho
  2008-08-18  9:57 ` Alan Horstmann
  2008-08-18 10:34 ` Colin Guthrie
  0 siblings, 2 replies; 5+ messages in thread
From: Henry Ho @ 2008-08-18  9:15 UTC (permalink / raw)
  To: alsa-devel

Hi

After reading the cross-compilation instruction in INSTALL file, 
I already successfully configured the alsa-lib-2.0.17. I also 
successfully made the library. Adding --prefix=xxx during 
configuration can set the output directory to xxx.

I also modify my Makefile for application, including the search 
path of libasound.so.2.***. Now I can successfully make it.

However, when I run my application on the target, I got the following 
error message:

******************************************************************************************
./pcm: error while loading shared libraries: libasound.so.2: cannot open 
shared object file: No such file or directory
******************************************************************************************

I have put libasound.so.2.0.0 in /tmp of the target. I also modified 
/etc/ld.so.conf, adding /tmp in ld.so.conf file. However, I cannot 
find ldconfig on the target. Is anyone can tell me how to solve it?
Should I rebuild a busybox with this command?

Henry


=====================================================================================================================================
The privileged confidential information  contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of RichWave is strictly prohibited; and any information in this email irrelevant to the official business of RichWave shall be deemed as neither given nor endorsed by RichWave. 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: developing audio with ALSA
  2008-08-18  9:15 developing audio with ALSA Henry Ho
@ 2008-08-18  9:57 ` Alan Horstmann
  2008-08-18 10:34 ` Colin Guthrie
  1 sibling, 0 replies; 5+ messages in thread
From: Alan Horstmann @ 2008-08-18  9:57 UTC (permalink / raw)
  To: Henry Ho; +Cc: ALSA devel

On Monday 18 August 2008 10:15, Henry Ho wrote:
> Hi
>
> After reading the cross-compilation instruction in INSTALL file,
> I already successfully configured the alsa-lib-2.0.17. I also
> successfully made the library. Adding --prefix=xxx during
> configuration can set the output directory to xxx.
>
> I also modify my Makefile for application, including the search
> path of libasound.so.2.***. Now I can successfully make it.
>
> However, when I run my application on the target, I got the following
> error message:
>
> ***************************************************************************
>*************** ./pcm: error while loading shared libraries: libasound.so.2:
> cannot open shared object file: No such file or directory
> ***************************************************************************
>***************
>
> I have put libasound.so.2.0.0 in /tmp of the target. I also modified
> /etc/ld.so.conf, adding /tmp in ld.so.conf file. However, I cannot
> find ldconfig on the target. Is anyone can tell me how to solve it?
> Should I rebuild a busybox with this command?

(I'm no expert); is there a link on the target from libasound.so.2 > 
libasound.so.2.0.0 ?  That should be needed to find the actual version you 
have.

Alan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: developing audio with ALSA
  2008-08-18  9:15 developing audio with ALSA Henry Ho
  2008-08-18  9:57 ` Alan Horstmann
@ 2008-08-18 10:34 ` Colin Guthrie
  1 sibling, 0 replies; 5+ messages in thread
From: Colin Guthrie @ 2008-08-18 10:34 UTC (permalink / raw)
  To: alsa-devel

Henry Ho wrote:
> Hi
> 
> After reading the cross-compilation instruction in INSTALL file, 
> I already successfully configured the alsa-lib-2.0.17. I also 
> successfully made the library. Adding --prefix=xxx during 
> configuration can set the output directory to xxx.
> 
> I also modify my Makefile for application, including the search 
> path of libasound.so.2.***. Now I can successfully make it.
> 
> However, when I run my application on the target, I got the following 
> error message:
> 
> ******************************************************************************************
> ./pcm: error while loading shared libraries: libasound.so.2: cannot open 
> shared object file: No such file or directory
> ******************************************************************************************
> 
> I have put libasound.so.2.0.0 in /tmp of the target. I also modified 
> /etc/ld.so.conf, adding /tmp in ld.so.conf file. However, I cannot 
> find ldconfig on the target. Is anyone can tell me how to solve it?
> Should I rebuild a busybox with this command?

I'm wondering if you are mixing up --prefix and DESTDIR...

--prefix is the location that should be the *running systems* path on 
normal use. Even if you have a folder on your development machine that 
is different to that. e.g. say you are booting from compact flash: on 
your dev machine this may be mounted as /media/cf, but when you use it 
to boot it is actually the / of that system.

In this case I'd recommend you do:
./configure --prefix=/usr ....
make
sudo make DESTDIR=/media/cf install

That will install things in /media/cf.

You then need to modify other parts of your build to look in /media/cf 
for stuff and to strip out /media/cf from the linking, but that's 
another story.


All that said, I'd imagine you just didn't copy the symlinks that 
accoumpany the file libasound.so.2.0.0 ... it should come sith some 
symlinks that give it the name libasound.so.2 as well. (i.e. 
libasound.so.2 is a symlink to libasound.so.2.0.0)


Col

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-08-18 10:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-18  9:15 developing audio with ALSA Henry Ho
2008-08-18  9:57 ` Alan Horstmann
2008-08-18 10:34 ` Colin Guthrie
  -- strict thread matches above, loose matches on Subject: below --
2008-08-13  6:48 Henry Ho
2008-08-13  8:19 ` Colin Guthrie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.