[alsa-devel] developing audio with ALSA
Colin Guthrie
gmane at colin.guthr.ie
Mon Aug 18 12:34:40 CEST 2008
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
More information about the Alsa-devel
mailing list