From mboxrd@z Thu Jan 1 00:00:00 1970 X-Received: by 10.68.91.162 with SMTP id cf2mr34790745pbb.2.1434337889576; Sun, 14 Jun 2015 20:11:29 -0700 (PDT) X-BeenThere: voidlinux@googlegroups.com Received: by 10.50.41.8 with SMTP id b8ls445770igl.33.gmail; Sun, 14 Jun 2015 20:11:29 -0700 (PDT) X-Received: by 10.50.128.40 with SMTP id nl8mr21814355igb.4.1434337889269; Sun, 14 Jun 2015 20:11:29 -0700 (PDT) Return-Path: Received: from hurricane.the-brannons.com (hurricane.the-brannons.com. [64.62.188.119]) by gmr-mx.google.com with ESMTP id w7si856280pdq.0.2015.06.14.20.11.29 for ; Sun, 14 Jun 2015 20:11:29 -0700 (PDT) Received-SPF: pass (google.com: domain of ch...@the-brannons.com designates 64.62.188.119 as permitted sender) client-ip=64.62.188.119; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ch...@the-brannons.com designates 64.62.188.119 as permitted sender) smtp.mail=ch...@the-brannons.com Received: from localhost (75-164-228-9.ptld.qwest.net [75.164.228.9]) by hurricane.the-brannons.com (Postfix) with ESMTPSA id 1006277AA7 for ; Sun, 14 Jun 2015 20:10:05 -0700 (PDT) From: Chris Brannon To: voidlinux@googlegroups.com Subject: strange linking issue with libjack on armv6hf-musl Date: Sun, 14 Jun 2015 20:11:27 -0700 Message-ID: <87mw013bts.fsf@mushroom.localdomain> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 >@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 >::init(std::basic_streambuf >*)@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 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