From: "Jörg Krause" <joerg.krause@embedded.rocks>
To: alsa-devel@alsa-project.org
Subject: ALSA hooks: dlopen failed: snd_dlsym_start: symbol not found
Date: Fri, 26 Aug 2016 04:11:08 +0200 [thread overview]
Message-ID: <1472177468.19908.28.camel@embedded.rocks> (raw)
Hi,
I am trying to build a custom hook library. The minimal hook is:
#include <alsa/asoundlib.h>
int _snd_pcm_hook_audio_status_install(snd_pcm_t *pcm, snd_config_t
*conf)
{
return 0;
}
SND_DLSYM_BUILD_VERSION(_snd_pcm_hook_audio_status_install,
SND_CONFIG_DLSYM_VERSION_HOOK);
I compile this as a shared library:
$(CC) -fPIC -lasound -shared -Wl,-soname,lib$(NAME).so $^ -o $@
If I try to load this library using aplay I get the following error:
dlopen failed: Error relocating /usr/lib/alsa-lib/libaudiostatus.so:
snd_dlsym_start: symbol not found
This is the output of the preprocessor:
int _snd_pcm_hook_audio_status_install(snd_pcm_t *pcm, snd_config_t
*conf)
{
return 0;
}
static struct snd_dlsym_link
_snd_dlsym__snd_pcm_hook_audio_status_install_dlsym_config_hook_001;
void
_snd_dlsym_constructor__snd_pcm_hook_audio_status_install_dlsym_conf
ig_hook_001 (void) __attribute__ ((constructor));
void
_snd_dlsym_constructor__snd_pcm_hook_audio_status_install_dlsym_conf
ig_hook_001 (void) {
_snd_dlsym__snd_pcm_hook_audio_status_install_dlsym_config_hook
_001.next = snd_dlsym_start;
_snd_dlsym__snd_pcm_hook_audio_status_install_dlsym_config_hook
_001.dlsym_name = "_snd_pcm_hook_audio_status_install";
_snd_dlsym__snd_pcm_hook_audio_status_install_dlsym_config_hook
_001.dlsym_ptr = (void *)&_snd_pcm_hook_audio_status_install;
snd_dlsym_start =
&_snd_dlsym__snd_pcm_hook_audio_status_install_dlsym_config_hook_001
;
};
What do I miss?
Best regards
Jörg Krause
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
reply other threads:[~2016-08-26 2:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1472177468.19908.28.camel@embedded.rocks \
--to=joerg.krause@embedded.rocks \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).