Skip to contentSkip to conversation

1.0.13rc3: relocation error: mocp: symbol snd_pcm_hw_params_get_channels_min ..

DISCUSSION Elimar Riesebieter 5 participants 27 messages Sep 26, 2006 – Sep 29, 2006

lore
Share & tools
lore
#0 lore raw

Hi all,

I am testing 1.0.13rc3 (lib/driver/utils) on PPC/2.6.18

Starting a soundapp like moc gives:

"relocation error: mocp: symbol snd_pcm_hw_params_get_channels_min, version ALSA_0.9.0rc4 not defined in file libasound.so.2 with link time reference"

Any hints?

Elimar

Signature · 2 lines
  On the keyboard of life you have always
  to keep a finger at the escape key;-)

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#1 lore raw
Quoted 4 lines · Elimar Riesebieter

Hi all,

I am testing 1.0.13rc3 (lib/driver/utils) on PPC/2.6.18

Quoted 8 lines

Starting a soundapp like moc gives:

"relocation error: mocp: symbol snd_pcm_hw_params_get_channels_min, version ALSA_0.9.0rc4 not defined in file libasound.so.2 with link time reference"

Any hints?

Application was compiled against a different alsa-lib version than is present.

Lee

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#2 lore raw

On Tue, 26 Sep 2006 the mental interface of
Lee Revell told:

Quoted 11 lines · Elimar Riesebieter
Quoted 10 lines

Hi all,

I am testing 1.0.13rc3 (lib/driver/utils) on PPC/2.6.18

Starting a soundapp like moc gives:

"relocation error: mocp: symbol snd_pcm_hw_params_get_channels_min, version ALSA_0.9.0rc4 not defined in file libasound.so.2 with link time reference"

Quoted 5 lines
Quoted 2 lines

Any hints?

Application was compiled against a different alsa-lib version than is present.

This was my idea as well, but apps compiled with versions << 1.0.12 are running with 1.0.13rc2?

Elimar

Signature · 10 lines
    .~.
    /V\   L   I   N   U   X
   /( )\ >Phear the Penguin<
   ^^-^^

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
#3 lore raw
Quoted 14 lines · Elimar Riesebieter

On Tue, 26 Sep 2006 the mental interface of
Lee Revell told:

Quoted 11 lines · Elimar Riesebieter
Quoted 10 lines

Hi all,

I am testing 1.0.13rc3 (lib/driver/utils) on PPC/2.6.18

Starting a soundapp like moc gives:

"relocation error: mocp: symbol snd_pcm_hw_params_get_channels_min, version ALSA_0.9.0rc4 not defined in file libasound.so.2 with link time reference"

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Any hints?

Application was compiled against a different alsa-lib version than is present.

This was my idea as well, but apps compiled with versions << 1.0.12 are running with 1.0.13rc2?

It's not guaranteed that using a wrong library version won't work. It may or may not. Just use the same version.

Lee

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#4 lore raw

On Tue, 26 Sep 2006 the mental interface of
Lee Revell told:

Quoted 18 lines · Elimar Riesebieter
Quoted 17 lines

On Tue, 26 Sep 2006 the mental interface of
Lee Revell told:

Quoted 14 lines · Elimar Riesebieter
Quoted 12 lines

Hi all,

I am testing 1.0.13rc3 (lib/driver/utils) on PPC/2.6.18

Starting a soundapp like moc gives:

"relocation error: mocp: symbol snd_pcm_hw_params_get_channels_min, version ALSA_0.9.0rc4 not defined in file libasound.so.2 with link time reference"

Any hints?

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Application was compiled against a different alsa-lib version than is present.

This was my idea as well, but apps compiled with versions << 1.0.12 are running with 1.0.13rc2?

It's not guaranteed that using a wrong library version won't work. It may or may not. Just use the same version.

It must be guaranteed!

Please notice: As a distributor you have to force all sond-app maintainers to rebuild their package against the new libasound headers. This is normaly done by ABI's which libasound doesn't use. In the past I've experienced never a behaviour descibed in the subject.

Elimar

Signature · 8 lines
  On the keyboard of life you have always
  to keep a finger at the escape key;-)

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
#5 lore raw
In reply to Lee Revell

At Tue, 26 Sep 2006 17:03:29 -0400,

Quoted 19 lines · Lee Revell
Quoted 17 lines · Elimar Riesebieter

On Tue, 26 Sep 2006 the mental interface of
Lee Revell told:

Quoted 14 lines · Elimar Riesebieter
Quoted 12 lines

Hi all,

I am testing 1.0.13rc3 (lib/driver/utils) on PPC/2.6.18

Starting a soundapp like moc gives:

"relocation error: mocp: symbol snd_pcm_hw_params_get_channels_min, version ALSA_0.9.0rc4 not defined in file libasound.so.2 with link time reference"

Any hints?

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Application was compiled against a different alsa-lib version than is present.

This was my idea as well, but apps compiled with versions << 1.0.12 are running with 1.0.13rc2?

It's not guaranteed that using a wrong library version won't work.

The backward compatibility is guaranteed.
That's the very reason that such a versioned symbol was introduced. (And it was a big failure...)

Please don't mix up the things about config files and the library ABI compatibility. In a very rare case, the configuration file doesn't match with the driver version. This happend once on emu10k1 (and people now think that it's a frequent case, unforunately, although we've tried to keep the compatibility of config stuff since then). But, the ABI is kept backward-compatible for many years.

So, you don't have to use the same version of alsa-lib. In general, the newer version is always better. The newer one includes more bugfixes and new features.

BTW, the problem here looks like a build of alsa-lib with versioned symbols. Or, the app isn't linked to libasound at compile time, so it couldn't resolve the versioned symbols properly. It's a common problem with versioned symbols.

Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#6 lore raw

On Wed, 27 Sep 2006 the mental interface of
Takashi Iwai told:

Quoted 45 lines

At Tue, 26 Sep 2006 17:03:29 -0400,

Quoted 19 lines · Lee Revell
Quoted 17 lines · Elimar Riesebieter

On Tue, 26 Sep 2006 the mental interface of
Lee Revell told:

Quoted 14 lines · Elimar Riesebieter
Quoted 12 lines

Hi all,

I am testing 1.0.13rc3 (lib/driver/utils) on PPC/2.6.18

Starting a soundapp like moc gives:

"relocation error: mocp: symbol snd_pcm_hw_params_get_channels_min, version ALSA_0.9.0rc4 not defined in file libasound.so.2 with link time reference"

Any hints?

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Application was compiled against a different alsa-lib version than is present.

This was my idea as well, but apps compiled with versions << 1.0.12 are running with 1.0.13rc2?

It's not guaranteed that using a wrong library version won't work.

The backward compatibility is guaranteed.
That's the very reason that such a versioned symbol was introduced. (And it was a big failure...)

Please don't mix up the things about config files and the library ABI compatibility. In a very rare case, the configuration file doesn't match with the driver version. This happend once on emu10k1 (and people now think that it's a frequent case, unforunately, although we've tried to keep the compatibility of config stuff since then). But, the ABI is kept backward-compatible for many years.

So, you don't have to use the same version of alsa-lib. In general, the newer version is always better. The newer one includes more bugfixes and new features.

Quoted 4 lines

BTW, the problem here looks like a build of alsa-lib with versioned symbols. Or, the app isn't linked to libasound at compile time, so it couldn't resolve the versioned symbols properly. It's a common problem with versioned symbols.

The libs where build as follows:

../configure --prefix=/usr \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
--datadir=\$${prefix}/share \
--host=$(DEB_HOST_GNU_TYPE) \
--enable-static --disable-maintainer-mode

where --enable-shared[=PKGS] build shared libraries points by default to yes

Elimar

Quoted 1 line

what IMHO then?

IMHO - Inhalation of a Multi-leafed Herbal Opiate ;)
--posting from alex in debian-user--

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#7 lore raw
Quoted 62 lines · Elimar Riesebieter

On Wed, 27 Sep 2006 the mental interface of
Takashi Iwai told:

Quoted 45 lines

At Tue, 26 Sep 2006 17:03:29 -0400,

Quoted 19 lines · Lee Revell
Quoted 17 lines · Elimar Riesebieter

On Tue, 26 Sep 2006 the mental interface of
Lee Revell told:

Quoted 14 lines · Elimar Riesebieter
Quoted 12 lines

Hi all,

I am testing 1.0.13rc3 (lib/driver/utils) on PPC/2.6.18

Starting a soundapp like moc gives:

"relocation error: mocp: symbol snd_pcm_hw_params_get_channels_min, version ALSA_0.9.0rc4 not defined in file libasound.so.2 with link time reference"

Any hints?

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Application was compiled against a different alsa-lib version than is present.

This was my idea as well, but apps compiled with versions << 1.0.12 are running with 1.0.13rc2?

It's not guaranteed that using a wrong library version won't work.

The backward compatibility is guaranteed.
That's the very reason that such a versioned symbol was introduced. (And it was a big failure...)

Please don't mix up the things about config files and the library ABI compatibility. In a very rare case, the configuration file doesn't match with the driver version. This happend once on emu10k1 (and people now think that it's a frequent case, unforunately, although we've tried to keep the compatibility of config stuff since then). But, the ABI is kept backward-compatible for many years.

So, you don't have to use the same version of alsa-lib. In general, the newer version is always better. The newer one includes more bugfixes and new features.

Quoted 4 lines

BTW, the problem here looks like a build of alsa-lib with versioned symbols. Or, the app isn't linked to libasound at compile time, so it couldn't resolve the versioned symbols properly. It's a common problem with versioned symbols.

The libs where build as follows:

../configure --prefix=/usr \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
--datadir=\$${prefix}/share \
--host=$(DEB_HOST_GNU_TYPE) \
--enable-static --disable-maintainer-mode

Quoted 2 lines

where --enable-shared[=PKGS] build shared libraries points by default to yes

I would follow this paragraph from the INSTALL file:

Compilation of static library
-----------------------------

If you would like to use the static ALSA library, you need to use these options for the configure script:

        ./configure --enable-shared=no --enable-static=yes

Unfortunately, due to bug in the libtool script, the shared and static library cannot be built together.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#8 lore raw
In reply to Elimar Riesebieter
Quoted 3 lines · Elimar Riesebieter

The libs where build as follows:

../configure

i dont see how 1.0.13rc3 or older would work out of the box with this ... it doesnt include my build-out-of-tree patches

you'd see fun things like:
checking for aload* device file directory... /dev/ ../configure: line 20271: src/pcm/pcm_symbols_list.c: No such file or directory
../configure: line 20271: src/pcm/pcm_symbols_list.c: No such file or directory
../configure: line 20271: src/pcm/pcm_symbols_list.c: No such file or directory
../configure: line 20271: src/pcm/pcm_symbols_list.c: No such file or directory
-mike

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#9 lore raw
In reply to Elimar Riesebieter
Quoted 11 lines · Elimar Riesebieter

Hi all,

I am testing 1.0.13rc3 (lib/driver/utils) on PPC/2.6.18

Starting a soundapp like moc gives:

"relocation error: mocp: symbol snd_pcm_hw_params_get_channels_min, version ALSA_0.9.0rc4 not defined in file libasound.so.2 with link time reference"

Any hints?

What is output from commands 'nm /usr/lib/libasound.so.2 | grep snd_pcm_hw_params_get_channels_min' and 'nm mocp | grep snd_pcm_hw_params_get_channels_min'?

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#10 lore raw

On Wed, 27 Sep 2006 the mental interface of
Jaroslav Kysela told:

Quoted 8 lines · Elimar Riesebieter
Quoted 7 lines

Hi all,

I am testing 1.0.13rc3 (lib/driver/utils) on PPC/2.6.18

Starting a soundapp like moc gives:

Quoted 8 lines
Quoted 5 lines

"relocation error: mocp: symbol snd_pcm_hw_params_get_channels_min, version ALSA_0.9.0rc4 not defined in file libasound.so.2 with link time reference"

Any hints?

What is output from commands 'nm /usr/lib/libasound.so.2 | grep snd_pcm_hw_params_get_channels_min'

nm: /usr/lib/libasound.so.2: no symbols

Quoted 2 lines

and 'nm mocp | grep
snd_pcm_hw_params_get_channels_min'?

nm: /usr/bin/mocp: no symbols

Elimar

Signature · 2 lines
  Experience is something you don't get until 
  just after you need it!

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#11 lore raw

At Wed, 27 Sep 2006 20:07:56 +0200,

Quoted 21 lines · Elimar Riesebieter

On Wed, 27 Sep 2006 the mental interface of
Jaroslav Kysela told:

Quoted 8 lines · Elimar Riesebieter
Quoted 7 lines

Hi all,

I am testing 1.0.13rc3 (lib/driver/utils) on PPC/2.6.18

Starting a soundapp like moc gives:

Quoted 8 lines
Quoted 5 lines

"relocation error: mocp: symbol snd_pcm_hw_params_get_channels_min, version ALSA_0.9.0rc4 not defined in file libasound.so.2 with link time reference"

Any hints?

What is output from commands 'nm /usr/lib/libasound.so.2 | grep snd_pcm_hw_params_get_channels_min'

Quoted 6 lines

nm: /usr/lib/libasound.so.2: no symbols

Quoted 2 lines

and 'nm mocp | grep
snd_pcm_hw_params_get_channels_min'?

nm: /usr/bin/mocp: no symbols

The symbols are stripped.
Use objdump, e.g. with -T option, instead.

Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#12 lore raw

On Wed, 27 Sep 2006 the mental interface of
Takashi Iwai told:

Quoted 25 lines

At Wed, 27 Sep 2006 20:07:56 +0200,

Quoted 23 lines · Elimar Riesebieter

On Wed, 27 Sep 2006 the mental interface of
Jaroslav Kysela told:

Quoted 8 lines · Elimar Riesebieter
Quoted 7 lines

Hi all,

I am testing 1.0.13rc3 (lib/driver/utils) on PPC/2.6.18

Starting a soundapp like moc gives:

Quoted 8 lines
Quoted 5 lines

"relocation error: mocp: symbol snd_pcm_hw_params_get_channels_min, version ALSA_0.9.0rc4 not defined in file libasound.so.2 with link time reference"

Any hints?

What is output from commands 'nm /usr/lib/libasound.so.2 | grep snd_pcm_hw_params_get_channels_min'

nm: /usr/lib/libasound.so.2: no symbols

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

and 'nm mocp | grep
snd_pcm_hw_params_get_channels_min'?

nm: /usr/bin/mocp: no symbols

The symbols are stripped.
Use objdump, e.g. with -T option, instead.

root@samweis ~ # objdump -T which mocp | grep snd_pcm_hw_params_get_channels_min
1005ca20 DF *UND* 0000002c ALSA_0.9.0rc4 \
snd_pcm_hw_params_get_channels_min
root@samweis ~ # objdump -T /usr/lib/libasound.so.2 | grep snd_pcm_hw_params_get_channels_min
00057aa0 g DF .text 0000002c ALSA_0.9 \
__snd_pcm_hw_params_get_channels_min
00057aa0 w DF .text 0000002c ALSA_0.9 \
snd_pcm_hw_params_get_channels_min

Hmmm, why there are different versions? 1.0.13rc2 works fine.

Elimar

Signature · 1 line
  Do you smell something burning or ist it me?

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#13 lore raw

At Wed, 27 Sep 2006 21:48:40 +0200,

Quoted 37 lines · Elimar Riesebieter

On Wed, 27 Sep 2006 the mental interface of
Takashi Iwai told:

Quoted 25 lines

At Wed, 27 Sep 2006 20:07:56 +0200,

Quoted 23 lines · Elimar Riesebieter

On Wed, 27 Sep 2006 the mental interface of
Jaroslav Kysela told:

Quoted 8 lines · Elimar Riesebieter
Quoted 7 lines

Hi all,

I am testing 1.0.13rc3 (lib/driver/utils) on PPC/2.6.18

Starting a soundapp like moc gives:

Quoted 8 lines
Quoted 5 lines

"relocation error: mocp: symbol snd_pcm_hw_params_get_channels_min, version ALSA_0.9.0rc4 not defined in file libasound.so.2 with link time reference"

Any hints?

What is output from commands 'nm /usr/lib/libasound.so.2 | grep snd_pcm_hw_params_get_channels_min'

nm: /usr/lib/libasound.so.2: no symbols

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

and 'nm mocp | grep
snd_pcm_hw_params_get_channels_min'?

nm: /usr/bin/mocp: no symbols

The symbols are stripped.
Use objdump, e.g. with -T option, instead.

Quoted 10 lines

root@samweis ~ # objdump -T which mocp | grep snd_pcm_hw_params_get_channels_min
1005ca20 DF *UND* 0000002c ALSA_0.9.0rc4 \
snd_pcm_hw_params_get_channels_min
root@samweis ~ # objdump -T /usr/lib/libasound.so.2 | grep snd_pcm_hw_params_get_channels_min
00057aa0 g DF .text 0000002c ALSA_0.9 \
__snd_pcm_hw_params_get_channels_min
00057aa0 w DF .text 0000002c ALSA_0.9 \
snd_pcm_hw_params_get_channels_min

Hm, the versions are not seen here.

Quoted 1 line

Hmmm, why there are different versions? 1.0.13rc2 works fine.

If 1.0.13rc2 works, a skeptical change is the prefix check below. Could you revert this patch and try whether it works?

Also, what is defined as __SYMBOL_PREFIX in config.h?

Takashi

# HG changeset patch
# User tiwai
# Date 1158682071 -7200
# Node ID aea9a680d2825ad040aa8a427d6c55d643a75f56 # Parent 8bdd686087881ce878ab56be3768f2077308a00d add support for hosts that have custom symbol prefixes

From: Mike Frysinger <[email protected]>

some architectures, like Blackfin, have a prefix added to all symbols (in our case it's historical baggage)

while normally packages shouldnt care, when code starts mixing assembler with C (like symbol versioning), you need to dip down into the inner details. find attached a patch which queries gcc for the prefix (all gcc toolchains have a builtin define of __USER_LABEL_PREFIX__) and then automatically has asm() constructs utilize this

since most targets define __USER_LABEL_PREFIX__ to nothing, hopefully this shouldnt cause any problems :)

configure.in +11 -0
diff -r 8bdd68608788 -r aea9a680d282 configure.in
@@ -34,6 +34,7 @@ fi
 	    
 
 AC_PROG_CC
+AC_PROG_CPP
 AC_PROG_INSTALL
 AC_PROG_LN_S 
 AC_DISABLE_STATIC
@@ -104,6 +105,16 @@ else
   AC_MSG_RESULT(no)
 fi
 AM_CONDITIONAL(VERSIONED_SYMBOLS, test x$versioned = xyes)
+
+dnl See if toolchain has a custom prefix for symbols ...
+AC_MSG_CHECKING(for custom symbol prefixes)
+SYMBOL_PREFIX=` \
+	echo "PREFIX=__USER_LABEL_PREFIX__" \
+		| ${CPP-${CC-gcc} -E} - 2>&1 \
+		| ${EGREP-grep} "^PREFIX=" \
+		| ${SED-sed} "s:^PREFIX=::"`
+AC_DEFINE_UNQUOTED([__SYMBOL_PREFIX], "$SYMBOL_PREFIX", [Toolchain Symbol Prefix])
+AC_MSG_RESULT($SYMBOL_PREFIX)
 
 dnl Check for debug...
 AC_MSG_CHECKING(for debug)
include/alsa-symbols.h +14 -14
diff -r 8bdd68608788 -r aea9a680d282 include/alsa-symbols.h
@@ -31,16 +31,16 @@
 
 #ifdef __powerpc64__
 # define symbol_version(real, name, version) 			\
-	__asm__ (".symver " #real "," #name "@" #version);	\
-	__asm__ (".symver ." #real ",." #name "@" #version)
+	__asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@" #version);	\
+	__asm__ (".symver ." ASM_NAME(#real) ",." ASM_NAME(#name) "@" #version)
 # define default_symbol_version(real, name, version) 		\
-	__asm__ (".symver " #real "," #name "@@" #version);	\
-	__asm__ (".symver ." #real ",." #name "@@" #version)
+	__asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@@" #version);	\
+	__asm__ (".symver ." ASM_NAME(#real) ",." ASM_NAME(#name) "@@" #version)
 #else
 # define symbol_version(real, name, version) \
-	__asm__ (".symver " #real "," #name "@" #version)
+	__asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@" #version)
 # define default_symbol_version(real, name, version) \
-	__asm__ (".symver " #real "," #name "@@" #version)
+	__asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@@" #version)
 #endif
 
 #ifdef USE_VERSIONED_SYMBOLS
@@ -52,19 +52,19 @@
 #define use_symbol_version(real, name, version) /* nothing */
 #ifdef __powerpc64__
 #define use_default_symbol_version(real, name, version) \
-	__asm__ (".weak " #name); 			\
-	__asm__ (".weak ." #name); 			\
-	__asm__ (".set " #name "," #real);		\
-	__asm__ (".set ." #name ",." #real)
+	__asm__ (".weak " ASM_NAME(#name)); 			\
+	__asm__ (".weak ." ASM_NAME(#name)); 			\
+	__asm__ (".set " ASM_NAME(#name) "," ASM_NAME(#real));		\
+	__asm__ (".set ." ASM_NAME(#name) ",." ASM_NAME(#real))
 #else
 #if defined(__alpha__) || defined(__mips__)
 #define use_default_symbol_version(real, name, version) \
-        __asm__ (".weak " #name); \
-        __asm__ (#name " = " #real)
+        __asm__ (".weak " ASM_NAME(#name)); \
+        __asm__ (ASM_NAME(#name) " = " ASM_NAME(#real))
 #else
 #define use_default_symbol_version(real, name, version) \
-	__asm__ (".weak " #name); \
-	__asm__ (".set " #name "," #real)
+	__asm__ (".weak " ASM_NAME(#name)); \
+	__asm__ (".set " ASM_NAME(#name) "," ASM_NAME(#real))
 #endif
 #endif
 #endif
include/local.h +8 -5
diff -r 8bdd68608788 -r aea9a680d282 include/local.h
@@ -192,6 +192,9 @@ extern snd_lib_error_handler_t snd_err_m
 
 /* When a reference to SYMBOL is encountered, the linker will emit a
    warning message MSG.  */
+
+#define ASM_NAME(name) __SYMBOL_PREFIX name
+
 #ifdef HAVE_GNU_LD
 # ifdef HAVE_ELF
 
@@ -210,19 +213,19 @@ extern snd_lib_error_handler_t snd_err_m
    section attributes on what looks like a comment to the assembler.  */
 #  ifdef HAVE_SECTION_QUOTES
 #   define link_warning(symbol, msg) \
-  __make_section_unallocated (".gnu.warning." #symbol) \
+  __make_section_unallocated (".gnu.warning." ASM_NAME(#symbol)) \
   static const char __evoke_link_warning_##symbol[]	\
-    __attribute__ ((section (".gnu.warning." #symbol "\"\n\t#\""))) = msg;
+    __attribute__ ((section (".gnu.warning." ASM_NAME(#symbol) "\"\n\t#\""))) = msg;
 #  else
 #   define link_warning(symbol, msg) \
-  __make_section_unallocated (".gnu.warning." #symbol) \
+  __make_section_unallocated (".gnu.warning." ASM_NAME(#symbol)) \
   static const char __evoke_link_warning_##symbol[]	\
-    __attribute__ ((section (".gnu.warning." #symbol "\n\t#"))) = msg;
+    __attribute__ ((section (".gnu.warning." ASM_NAME(#symbol) "\n\t#"))) = msg;
 #  endif
 # else
 #  define link_warning(symbol, msg)		\
   asm (".stabs \"" msg "\",30,0,0,0\n\t"	\
-       ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n");
+       ".stabs \"" ASM_NAME(#symbol) "\",1,0,0,0\n");
 # endif
 #else
 /* We will never be heard; they will all die horribly.  */

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#14 lore raw
Quoted 1 line · Takashi Iwai

Hm, the versions are not seen here.

here's what i'm getting on my ppc with 1.0.13rc3:

$ tar xf alsa-lib-1.0.13rc3.tar.bz2
$ cd alsa-lib-1.0.13rc3
$ ./configure --enable-static
$ make -j6
$ objdump -T src/.libs/libasound.so | grep snd_pcm_hw_params_get_channels_min
00054fd4 g    DF .text  0000002c  ALSA_0.9    
__snd_pcm_hw_params_get_channels_min
00055000 g    DF .text  00000034 (ALSA_0.9)   
snd_pcm_hw_params_get_channels_min
00054fd4 g    DF .text  0000002c  ALSA_0.9.0rc4 
snd_pcm_hw_params_get_channels_min
Quoted 1 line

Also, what is defined as __SYMBOL_PREFIX in config.h?

$ grep __SYMBOL_PREFIX include/config.h
include/config.h:#define __SYMBOL_PREFIX ""
-mike

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#15 lore raw
In reply to Takashi Iwai

On Thu, 28 Sep 2006 the mental interface of
Takashi Iwai told:

Quoted 50 lines

At Wed, 27 Sep 2006 21:48:40 +0200,

Quoted 37 lines · Elimar Riesebieter

On Wed, 27 Sep 2006 the mental interface of
Takashi Iwai told:

Quoted 25 lines

At Wed, 27 Sep 2006 20:07:56 +0200,

Quoted 23 lines · Elimar Riesebieter

On Wed, 27 Sep 2006 the mental interface of
Jaroslav Kysela told:

Quoted 8 lines · Elimar Riesebieter
Quoted 7 lines

Hi all,

I am testing 1.0.13rc3 (lib/driver/utils) on PPC/2.6.18

Starting a soundapp like moc gives:

Quoted 8 lines
Quoted 5 lines

"relocation error: mocp: symbol snd_pcm_hw_params_get_channels_min, version ALSA_0.9.0rc4 not defined in file libasound.so.2 with link time reference"

Any hints?

What is output from commands 'nm /usr/lib/libasound.so.2 | grep snd_pcm_hw_params_get_channels_min'

nm: /usr/lib/libasound.so.2: no symbols

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

and 'nm mocp | grep
snd_pcm_hw_params_get_channels_min'?

nm: /usr/bin/mocp: no symbols

The symbols are stripped.
Use objdump, e.g. with -T option, instead.

Quoted 10 lines

root@samweis ~ # objdump -T which mocp | grep snd_pcm_hw_params_get_channels_min
1005ca20 DF *UND* 0000002c ALSA_0.9.0rc4 \
snd_pcm_hw_params_get_channels_min
root@samweis ~ # objdump -T /usr/lib/libasound.so.2 | grep snd_pcm_hw_params_get_channels_min
00057aa0 g DF .text 0000002c ALSA_0.9 \
__snd_pcm_hw_params_get_channels_min
00057aa0 w DF .text 0000002c ALSA_0.9 \
snd_pcm_hw_params_get_channels_min

Quoted 6 lines

Hm, the versions are not seen here.

Quoted 1 line

Hmmm, why there are different versions? 1.0.13rc2 works fine.

If 1.0.13rc2 works, a skeptical change is the prefix check below. Could you revert this patch and try whether it works?

No changes.

Quoted 1 line

Also, what is defined as __SYMBOL_PREFIX in config.h?

grep __SYMBOL_PREFIX include/config.h

#define __SYMBOL_PREFIX ""

# readelf -W -s /usr/lib/libasound.so.2 | grep snd_pcm_hw_params_get_channels_min
141: 00057aa0    44 FUNC    GLOBAL DEFAULT   10 __snd_pcm_hw_params_get_channels_min@@ALSA_0.9
614: 00057aa0    44 FUNC    WEAK   DEFAULT   10 snd_pcm_hw_params_get_channels_min@@ALSA_0.9
# readelf -W -s /usr/bin/mocp | grep snd_pcm_hw_params_get_channels_min
201: 1005c8c0    44 FUNC    GLOBAL DEFAULT  UND snd_pcm_hw_params_get_channels_min@ALSA_0.9.0rc4 (11)
141: 00057aa0    44 FUNC    GLOBAL DEFAULT   10 __snd_pcm_hw_params_get_channels_min@@ALSA_0.9

Elimar

Signature · 8 lines
  It's a good thing we don't get all 
  the government we pay for.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
#16 lore raw
Quoted 3 lines · Elimar Riesebieter
# readelf -W -s /usr/lib/libasound.so.2 | ...
__snd_pcm_hw_params_get_channels_min@@ALSA_0.9
snd_pcm_hw_params_get_channels_min@@ALSA_0.9

so the question is where did your 0.9.0rc4 go ... unpacked 1.0.12 and 1.0.13rc3 and both give me the same list with the rc4 in it ...

what version binutils ? can you capture the entire configure & make output into a log file and compress it and post it ?
-mike

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#17 lore raw

On Thu, 28 Sep 2006 the mental interface of
Mike Frysinger told:

Quoted 9 lines · Elimar Riesebieter
Quoted 3 lines
# readelf -W -s /usr/lib/libasound.so.2 | ...
__snd_pcm_hw_params_get_channels_min@@ALSA_0.9
snd_pcm_hw_params_get_channels_min@@ALSA_0.9

so the question is where did your 0.9.0rc4 go ... unpacked 1.0.12 and 1.0.13rc3 and both give me the same list with the rc4 in it ...

what version binutils ?

$ ld -v
GNU ld version 2.17 Debian GNU/Linux
Quoted 2 lines

can you capture the entire configure & make output into a log file and compress it and post it ?

The output of
./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--datadir=/usr/share \
--build=powerpc-linux-gnu \
--enable-static=yes \
--enable--shared=no \
--disable-maintainer-mode \

Quoted 1 line

config.log

is attached.

THX
Elimar

Signature · 2 lines
  The path to source is always uphill!
                                -unknown-

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#18 lore raw
Quoted 1 line · Elimar Riesebieter

--enable--shared=no \

Was this typo pasted from your actual build script?

Lee

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#19 lore raw

On Thu, 28 Sep 2006 the mental interface of
Lee Revell told:

Quoted 4 lines · Elimar Riesebieter
Quoted 1 line

--enable--shared=no \

Was this typo pasted from your actual build script?

Why is that a typo? This I've done as adviced from Jaroslav:

"If you would like to use the static ALSA library, you need to use these options for the configure script:

        ./configure --enable-shared=no --enable-static=yes

Unfortunately, due to bug in the libtool script, the shared and static library cannot be built together."

Elimar

Signature · 8 lines
  On the keyboard of life you have always
  to keep a finger at the escape key;-)

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
#20 lore raw
Quoted 7 lines · Elimar Riesebieter

On Thu, 28 Sep 2006 the mental interface of Lee Revell told:

Quoted 4 lines · Elimar Riesebieter
Quoted 1 line

--enable--shared=no \

Was this typo pasted from your actual build script?

Why is that a typo?

you have too many dashes in there

and the point here is to check out versioned symbols in the shared library; symbol versioning has no value in static libraries
-mike

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#21 lore raw
In reply to Elimar Riesebieter
Quoted 1 line · Elimar Riesebieter

is attached.

ok, but that doesnt have:
make >& log
-mike

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#22 lore raw

On Thu, 28 Sep 2006 the mental interface of
Mike Frysinger told:

Quoted 5 lines · Elimar Riesebieter
Quoted 1 line

is attached.

ok, but that doesnt have:
make >& log

Please find attached the complete Debian buildlog.

THX
Elimar

Signature · 3 lines
  Planung:
  Ersatz des Zufalls durch den Irrtum.
                                -unknown-

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#23 lore raw

why dont you try building it by hand first and see if you have the same problem

the build looked ok, but i'm still suspicious of the fact you're building out of tree

another thing you could try is to copy & paste that final link which produces the libasound.so with the Versions file and stick -Wl,-M and review the output ... you should see something like:
.text 0x000000000004d394 0xb574 pcm/.libs/libpcm.a(pcm.o)

	0x0000000000054f9c	 __snd_pcm_hw_params_get_channels_min
	0x0000000000054fc8	snd_pcm_hw_params_get_channels_min@ALSA_0.9
	0x0000000000054f9c	snd_pcm_hw_params_get_channels_min@@ALSA_0.9.0rc4

there is of course a lot more output; i just snipped a ton

i'd also wager that this symbol isnt your only problem ... in your readelf, grep for 0.9.0rc4 and make sure you have a whole bunch of symbols ... -mike

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#24 lore raw
In reply to Elimar Riesebieter

At Thu, 28 Sep 2006 20:02:07 +0200,

Quoted 54 lines · Elimar Riesebieter

On Thu, 28 Sep 2006 the mental interface of
Takashi Iwai told:

Quoted 50 lines

At Wed, 27 Sep 2006 21:48:40 +0200,

Quoted 47 lines · Elimar Riesebieter

On Wed, 27 Sep 2006 the mental interface of
Takashi Iwai told:

Quoted 25 lines

At Wed, 27 Sep 2006 20:07:56 +0200,

Quoted 23 lines · Elimar Riesebieter

On Wed, 27 Sep 2006 the mental interface of
Jaroslav Kysela told:

Quoted 8 lines · Elimar Riesebieter
Quoted 7 lines

Hi all,

I am testing 1.0.13rc3 (lib/driver/utils) on PPC/2.6.18

Starting a soundapp like moc gives:

Quoted 8 lines
Quoted 5 lines

"relocation error: mocp: symbol snd_pcm_hw_params_get_channels_min, version ALSA_0.9.0rc4 not defined in file libasound.so.2 with link time reference"

Any hints?

What is output from commands 'nm /usr/lib/libasound.so.2 | grep snd_pcm_hw_params_get_channels_min'

nm: /usr/lib/libasound.so.2: no symbols

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

and 'nm mocp | grep
snd_pcm_hw_params_get_channels_min'?

nm: /usr/bin/mocp: no symbols

The symbols are stripped.
Use objdump, e.g. with -T option, instead.

root@samweis ~ # objdump -T which mocp | grep snd_pcm_hw_params_get_channels_min
1005ca20 DF *UND* 0000002c ALSA_0.9.0rc4 \
snd_pcm_hw_params_get_channels_min
root@samweis ~ # objdump -T /usr/lib/libasound.so.2 | grep snd_pcm_hw_params_get_channels_min
00057aa0 g DF .text 0000002c ALSA_0.9 \
__snd_pcm_hw_params_get_channels_min
00057aa0 w DF .text 0000002c ALSA_0.9 \
snd_pcm_hw_params_get_channels_min

Quoted 8 lines
Quoted 6 lines

Hm, the versions are not seen here.

Quoted 1 line

Hmmm, why there are different versions? 1.0.13rc2 works fine.

If 1.0.13rc2 works, a skeptical change is the prefix check below. Could you revert this patch and try whether it works?

No changes.

There are only three changes in between 1.0.13rc2 and rc3. The patch I attached in my last mail was one of them. Other two are definitely irrelevant with build stuff. So, I suspect the fact it worked with 1.0.13rc2 now.

Could you recheck whether rc2 works and the patched rc3 really doesn't work again?

Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#25 lore raw

On Fri, 29 Sep 2006 the mental interface of
Takashi Iwai told:

[...]

Quoted 2 lines

Could you recheck whether rc2 works and the patched rc3 really doesn't work again?

My apologies. I reworked all Debian patches. One has to relibtoolize which I created wrong. rc3 works _*without*_ rediff the sym patch.

Sorry for the noise and thank you very much for cooperation.

Elimar

Signature · 8 lines
  Experience is something you don't get until 
  just after you need it!

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
#26 lore raw
In reply to Jaroslav Kysela
Quoted 3 lines · Jaroslav Kysela

What is output from commands 'nm /usr/lib/libasound.so.2 | grep snd_pcm_hw_params_get_channels_min' and 'nm mocp | grep snd_pcm_hw_params_get_channels_min'?

readelf -W -s is nicer i think
-mike

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel