From: Takashi Iwai Subject: Re: Compiling an Alsa plugin with Intel compiler. Date: Thu, 25 Sep 2008 15:09:44 +0200 Message-ID: References: <48DB643A.9080909@waves.com> <48DB75A0.8080306@waves.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (ns.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 196451037F0 for ; Thu, 25 Sep 2008 15:09:45 +0200 (CEST) In-Reply-To: <48DB75A0.8080306@waves.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Motti Daniel Cc: "alsa-devel@alsa-project.org" List-Id: alsa-devel@alsa-project.org At Thu, 25 Sep 2008 14:27:28 +0300, Motti Daniel wrote: > > Takashi Iwai wrote: > > At Thu, 25 Sep 2008 13:13:14 +0300, > Motti Daniel wrote: > > Hello people! > > I'm working on an Alsa plugin for the Xandros Linux distribution > my plugin runs very well except it consume about 20% of resources > from the target machine (eee pc at 1.6Ghz) > I'm trying to compile the same code with Intel Compiler (version 10.1.017) > (before that it was compiled with gcc 4.1.2) > the plugin compiles well but when I try to play music it tells me that > the plugin library (the .so file in /usr/lib/alsa-lib/ is not there. > > What exactly is the error message? > It's a big difference between non-existing file and non-defined > symbol. > > This is the error: > > /home/user> aplay aint.wav > ALSA lib pcm.c:2106:(snd_pcm_open_conf) Cannot open shared library /usr/lib/ > alsa-lib/libasound_module_pcm_maxxaudio.so > aplay: main:550: audio open error: No such file or directory > /home/user> ls -la /usr/lib/alsa-lib/libasound_module_pcm_maxxaudio.so > -rw-r--r-- 1 root root 14944 2008-09-23 23:31 /usr/lib/alsa-lib/ > libasound_module_pcm_maxxaudio.so > /home/user> sudo rm /usr/lib/alsa-lib/libasound_module_pcm_maxxaudio.so > /home/user> aplay aint.wav > ALSA lib pcm.c:2106:(snd_pcm_open_conf) Cannot open shared library /usr/lib/ > alsa-lib/libasound_module_pcm_maxxaudio.so > aplay: main:550: audio open error: No such file or directory > > as you can see the file exist and when I erased it I get the same message Then it's the error from snd_dlopen(). Likely missing ifdef or so... > I tried to analyze the symbols in the executable and found that the > difference between gcc and Intel compiler is a list of symbols with > a suffix __FUNCTION__ or __PRETTY_FUNCTION__ > is this the problem? > > I don't think so. These should be replaced at compile time, and you > must get relevant compile errors/warnings. > > The only warning I get it about unused variables. Then these were handled properly. > any suggestions? > can you tell me what are the minimum alsa requirements from a dynamic > library so it can be loaded and run as an Alsa plugin? > > First, check whether your plugin was properly opened and symbol > resolution worked. The alsa-lib calls snd_dlopen() to open the > plugin, and call snd_dlsym() for symbols. Catch them via gdb or so. > > There are configure checks for dlopen, etc, defining > CONFIG_HAVE_LIBDL. Make sure that this passed in your case. > > Thanks! I'll try that... Also make sure that you compile with -DPIC. Usually configure checks it, but I'm not sure whether it works for icc. Takashi