Package: libupnp2
Version: 1.4.3-2
Severity: serious

Hello.

I was looking at the wmaloader FTBFS on mips and mipsel, which fails
with:

  gcc -lixml -lupnp -lthreadutil -L/usr/lib  wmaloader.o image_transfer.o 
common.o   -o wmaloader
  wmaloader.o: In function `initialise_sync_variables':
  wmaloader.c:(.text+0x3c4): undefined reference to `sem_init'
  wmaloader.o: In function `initialise_image_transfer':
  wmaloader.c:(.text+0x464): undefined reference to `pthread_create'
  wmaloader.o: In function `LoaderCallbackFunc':
  wmaloader.c:(.text+0x7e4): undefined reference to `sem_post'
  wmaloader.o: In function `main':
  wmaloader.c:(.text+0x118c): undefined reference to `sem_wait'
  /usr/lib/libthreadutil.so: undefined reference to `pthread_detach'
  collect2: ld returned 1 exit status
  make[1]: *** [wmaloader] Error 1

On IRC I received some help in diagnosing the problem:

  <dato> does this mips buildd failure ring a bell to anybody about a toolchain 
bug?:
        
http://buildd.debian.org/fetch.cgi?pkg=wmaloader;ver=0.1-3%2Bb1;arch=mips;stamp=1178762221
  <broonie> dato: Looks more like it should be linking with pthreads and rt but 
isn't.
  <vorlon> dato: looks like a straightforward missing linker option, yeah?
  <vorlon> doesn't look like a toolchain bug at all to me
  <dato> aha; I asked because all other arches built it just fine...
  <dato> (with the same flags)
  <vorlon> dunno why they would have, but even if they did, I still think it's 
the package's mistake
  <dato> okay then, thanks
  <broonie> I suspect that oon other platforms libthreadutil pulls in pthreads 
but on MIPS the linker isn't seeing the
            exported symbols for some reason.
  <broonie> (just guessing by the name)
  <vorlon> ah, then it's a bug in both libthreadutil and wmaloader
  <vorlon> well
  <vorlon> rather, libthreadutil doesn't account for the known, different 
behavior of the -pthread flag when linking DSOs
          on mips*
  <vorlon> and wmaloader should be linking -lpthread directly anyway
  <broonie> Besides, the app is using the symbols directly.
  <broonie> snap
  <vorlon> dato: so if libthreadutil also uses pthread, it's mislinked on mips* 
because -shared -pthread does not imply
                -lpthread on those archs (longstanding toolchain bug, AIUI)

  /usr/lib/libthreadutil.so.2:
          libc.so.6 => /lib/libc.so.6 (0x2aaf8000)
          /lib/ld.so.1 => /lib/ld.so.1 (0x55550000)
  undefined symbol: pthread_detach        (/usr/lib/libthreadutil.so.2)
  undefined symbol: pthread_create        (/usr/lib/libthreadutil.so.2)

Cheers,

-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
Man: Wow, that woman looks exactly the way Nina is going to look in
about ten years... Oh shit, it is Nina. Don't tell her what I said, okay?
                -- http://www.overheardinnewyork.com/archives/003086.html



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to