From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2281 Path: news.gmane.org!not-for-mail From: Paul Schutte Newsgroups: gmane.linux.lib.musl.general Subject: Re: A few issues on MIPS and now on ARMEL Date: Fri, 16 Nov 2012 00:21:11 +0200 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8f503bf68d915704ce9011d5 X-Trace: ger.gmane.org 1353018091 8989 80.91.229.3 (15 Nov 2012 22:21:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Nov 2012 22:21:31 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2282-gllmg-musl=m.gmane.org@lists.openwall.com Thu Nov 15 23:21:42 2012 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 1TZ7oU-0001kn-Km for gllmg-musl@plane.gmane.org; Thu, 15 Nov 2012 23:21:34 +0100 Original-Received: (qmail 24328 invoked by uid 550); 15 Nov 2012 22:21:24 -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 24317 invoked from network); 15 Nov 2012 22:21:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=ISjCwpZH/sU31ymeRnPwn5tyQ2xeW+ro1wpRujjweOM=; b=w1njzfwmoLhSHAyW0u13x4NZRF7hMg4I+kuRaFLBBvZZTXOujH6SLF6Twr26UYxQyb xrMy9wQfr4fVhuvZbaoHTTMLA1fBflKOT3o26UolZ0TkyPpEC//BXvMAZiH9arlv2yre 1swELuLaWD2twZAF0O90x5D2Sv9JeBcnAmyuGFVlZyxRB/Sz3dvW4Yn8gwTcG1ynvL/T u8XtJ4twmr+Apn2U0A3fxcq/41f2K7jZVBdsXc7cNsUcNCnlRV+kDr/+n1xsoYHC4X8A G21V/DkU3nYiDVm06aEbpd/SSZh0sebjxc+TxyiGHNHgyxnaa+aAHmFtsWXElMBV5+RM 64eg== Xref: news.gmane.org gmane.linux.lib.musl.general:2281 Archived-At: --e89a8f503bf68d915704ce9011d5 Content-Type: text/plain; charset=ISO-8859-1 Hi guys, I am now hitting a similar problem on armel. I am cross-compiling "dnsmasq" Glibc strace: ---snip--- socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 5 fcntl64(5, F_GETFL) = 0x2 (flags O_RDWR) fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0 setsockopt(5, SOL_IP, IP_MTU_DISCOVER, [0], 4) = 0 setsockopt(5, SOL_IP, IP_PKTINFO, [1], 4) = 0 setsockopt(5, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0 setsockopt(5, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 Musl strace: socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 5 fcntl64(5, F_GETFL) = 0x2 (flags O_RDWR) fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK|O_LARGEFILE) = 0 setsockopt(5, SOL_IP, IP_MTU_DISCOVER, [0], 4) = 0 setsockopt(5, SOL_IP, IP_PKTINFO, [1], 4) = 0 setsockopt(5, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0 setsockopt(5, SOL_SOCKET, *0xf /* SO_??? */*, [1], 4) = -1 ENOPROTOOPT (Protocol not available) Regards Paul On Mon, Nov 5, 2012 at 7:31 PM, Rich Felker wrote: > On Mon, Nov 05, 2012 at 07:27:44PM +0200, Paul Schutte wrote: > > Thanks for the reply. > > > > I suspected something like you mention and therefore I made sure that I > > installed the correct kernel headers before I compiled musl or any of the > > other software. > > Kernel headers are completely irrelevant; they're not used anywhere. > nsz's analysis is right. I have a patch I'm about to commit. In case > you'd like to try it directly without using git, I'm attaching it > here. > > There may be more fixes still needed. MIPS has A LOT of gratuitous > differences in constant definitions and I thought I'd caught all of > them before, but apparently some slipped through. The fcntl part of > the patch has been tested and seems correct. The socket parts should > be right, but they're untested; I'm working on a test for them now. > > Rich > --e89a8f503bf68d915704ce9011d5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi guys,

I am now hitting a similar problem on armel.

I am cr= oss-compiling "dnsmasq"

Glibc strace:

---snip---socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) =3D 5
fcntl64(5, F_GETFL)=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D 0x2 (flags O_= RDWR)
fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK)=A0 =3D 0
setsockopt(5, SOL_IP, IP= _MTU_DISCOVER, [0], 4) =3D 0
setsockopt(5, SOL_IP, IP_PKTINFO, [1], 4) = =3D 0
setsockopt(5, SOL_SOCKET, SO_BROADCAST, [1], 4) =3D 0
setsockop= t(5, SOL_SOCKET, SO_REUSEADDR, [1], 4) =3D 0


Musl strace:

socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) =3D 5<= br>fcntl64(5, F_GETFL)=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 =3D 0x2 (flags O_RDWR)
fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK|O= _LARGEFILE) =3D 0
setsockopt(5, SOL_IP, IP_MTU_DISCOVER, [0], 4) =3D 0 setsockopt(5, SOL_IP, IP_PKTINFO, [1], 4) =3D 0
setsockopt(5, SOL_SOCKET= , SO_BROADCAST, [1], 4) =3D 0
setsockopt(5, SOL_SOCKET, 0xf /* SO_???= */, [1], 4) =3D -1 ENOPROTOOPT (Protocol not available)

Regards=
Paul

On Mon, Nov 5, 2012 at 7:31 PM, Rich= Felker <dalias@aerifal.cx> wrote:
On Mon, Nov 05, 2012 at 07:27:44PM +0200, Paul Schutte wrote:
> Thanks for the reply.
>
> I suspected something like you mention and therefore I made sure that = I
> installed the correct kernel headers before I compiled musl or any of = the
> other software.

Kernel headers are completely irrelevant; they're not used anywhere. nsz's analysis is right. I have a patch I'm about to commit. In cas= e
you'd like to try it directly without using git, I'm attaching it here.

There may be more fixes still needed. MIPS has A LOT of gratuitous
differences in constant definitions and I thought I'd caught all of
them before, but apparently some slipped through. The fcntl part of
the patch has been tested and seems correct. The socket parts should
be right, but they're untested; I'm working on a test for them now.=

Rich

--e89a8f503bf68d915704ce9011d5--