From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5046 Path: news.gmane.org!not-for-mail From: Lance Fredrickson Newsgroups: gmane.linux.lib.musl.general Subject: Minimal asterisk compilation Date: Sun, 04 May 2014 01:23:02 -0600 Message-ID: <5365EAD6.504@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1399188209 18576 80.91.229.3 (4 May 2014 07:23:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 May 2014 07:23:29 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5050-gllmg-musl=m.gmane.org@lists.openwall.com Sun May 04 09:23:25 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Wgqle-0001sv-Sj for gllmg-musl@plane.gmane.org; Sun, 04 May 2014 09:23:22 +0200 Original-Received: (qmail 25809 invoked by uid 550); 4 May 2014 07:23:19 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 25795 invoked from network); 4 May 2014 07:23:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=Uiz8hkL3SC4CG2RRTb+ueaHJvD9+h1NfmPAnLXew02o=; b=tKBKJbp8vYSJHj1ZpV9RXgCERrrfK2FmrkmatrnyQj7kjsX0OZwCAU0N8ZHwK62TDw JvcBukDVMFQMRPgDyeMSkeJ0Jm1NhERSu92k9LyXfaQC0TOwbzI3Clpp9E3BZkqIUJ/a C0Sb/2/sdk5vYck4242IF8hdA3z+LJM+v6BXC0t1c+xVhVYFDimS+dSEhrxl2TtzwzO9 hn/NSnCqln/VZqHTCj0/+wEME5m6JwEFE6Gf49DykIqzYrZNs8DJ/PkHlkbuy0PPO/tp ARRRDdJLjoVjwLKJJwWieUVCT1bPeUYHezT/876K2ru2y6o+h4SnUrxV2lPrsZanAErk 7H9Q== X-Received: by 10.66.124.137 with SMTP id mi9mr56585413pab.111.1399188185698; Sun, 04 May 2014 00:23:05 -0700 (PDT) User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 Xref: news.gmane.org gmane.linux.lib.musl.general:5046 Archived-At: Musl has caught my eye, and I've compiled various one-off binaries, but wanted to compile a minimal asterisk setup for an embedded mipsel device (router). I've put my code here. https://github.com/lancethepants/asterisk-embedded-musl Sorry, I do things hacky. I later moved over libc.so, and created ld-musl-mipsel.so.1 All the binaries I've compiled so far work fine, but the modules in asterisk have issues. One example is # /opt/asterisk/bin/ldd ./codec_ulaw.so /opt/asterisk/bin/ldd (0x55550000) libc.so => /opt/asterisk/bin/ldd (0x55550000) Error relocating ./codec_ulaw.so: ast_format_set: symbol not found Error relocating ./codec_ulaw.so: __ast_mulaw: symbol not found Error relocating ./codec_ulaw.so: ast_unregister_file_version: symbol not found Error relocating ./codec_ulaw.so: ast_module_unregister: symbol not found Error relocating ./codec_ulaw.so: __ast_lin2mu: symbol not found Error relocating ./codec_ulaw.so: ast_unregister_translator: symbol not found Error relocating ./codec_ulaw.so: __ast_register_translator: symbol not found Error relocating ./codec_ulaw.so: ast_register_file_version: symbol not found Error relocating ./codec_ulaw.so: ast_module_register: symbol not found This happens for each module. The symbols look to be inside when looking at them with the readelf command. This breaks the all of asterisk. I tried throwing in -fPIC in the LDFLAGS but did nothing. In order to get it compile at all, I grabbed some patches from here. https://github.com/uggedal/aports/blob/master/main/asterisk/musl-glob-compat.patch and also did some cheating throwing in a cdefs file from the same repo mentioned, and some sed commands to fix some PTHREAD stuff. I thought I was home free once it compiled, but I can't figure out why the modules won't work. Maybe there's something simple I'm overlooking. Any suggestions are appreciated. cheers, Lance