Void Linux discussion
 help / color / mirror / Atom feed
From: Chris Brannon <ch...@the-brannons.com>
To: voidlinux@googlegroups.com
Subject: strange linking issue with libjack on armv6hf-musl
Date: Sun, 14 Jun 2015 20:11:27 -0700	[thread overview]
Message-ID: <87mw013bts.fsf@mushroom.localdomain> (raw)

Hello,
Earlier today, I built the espeak package and its dependencies for my
armv6hf-musl system, a Raspberry Pi.
On the Pi, I tried to build a program that uses espeak.
I got a bunch of errors like the following:

/lib/libjack.so.0: undefined reference to `vtable for
std::basic_streambuf<char, std::char_traits<char> >@GLIBCXX_3.4'
/lib/libjack.so.0: undefined reference to
`__cxa_allocate_exception@CXXABI_1.3'
/lib/libjack.so.0: undefined reference to
`std::basic_ios<char,
std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*)@GLIBCXX_3.4'
*snip more like this*
/lib/libjack.so.0: undefined reference to
`std::string::append(std::string const&)@GLIBCXX_3.4'
*and more of the same*

espeak links against libjack indirectly, via portaudio.

Here's a very tiny program that reproduces the problem:

#include <espeak/speak_lib.h>

int main(void) {
  int rate = 	espeak_Initialize(AUDIO_OUTPUT_PLAYBACK, 50, NULL, 0);
  return 0;
}

It should compile with gcc example.c -lespeak

I also see the same errors when trying to build an example program from
the portaudio distribution.

I made a package of my original program that uses espeak, and that built
just fine with xbps-src -a armv6hf-musl on an x86_64 machine.
So the question is, why does libjack give all these undefined reference
errors when I'm building natively on the Pi, but not when
cross-compiling via xbps-src?
My suspicion is that it has something to do with the libjack package
being cross-compiled originally, but I don't know enough about cross
compilation to prove it.

-- Chris

             reply	other threads:[~2015-06-15  3:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15  3:11 Chris Brannon [this message]
2015-06-15 15:34 ` Juan RP
2015-06-15 21:07   ` Chris Brannon

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=87mw013bts.fsf@mushroom.localdomain \
    --to="ch..."@the-brannons.com \
    --cc=voidlinux@googlegroups.com \
    /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).