NetBSD Problem Report #46987

From www@NetBSD.org  Thu Sep 20 06:26:34 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id CFDAE63E3CC
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 20 Sep 2012 06:26:33 +0000 (UTC)
Message-Id: <20120920062632.E826F63B907@www.NetBSD.org>
Date: Thu, 20 Sep 2012 06:26:32 +0000 (UTC)
From: ano@bestmx.ru
Reply-To: ano@bestmx.ru
To: gnats-bugs@NetBSD.org
Subject: pkgsrc does not bootstrap under openSUSE
X-Send-Pr-Version: www-1.0

>Number:         46987
>Category:       pkg
>Synopsis:       pkgsrc does not bootstrap under openSUSE
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    joerg
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 20 06:30:00 +0000 2012
>Last-Modified:  Thu Sep 20 20:10:07 +0000 2012
>Originator:     Andrey N. Oktyabrski
>Release:        openSUSE 12.2
>Organization:
>Environment:
$ uname -a
Linux thinkpot.ano 3.4.6-2.10-default #1 SMP Thu Jul 26 09:36:26 UTC 2012 (641c197) x86_64 x86_64 x86_64 GNU/Linux
>Description:
Bootstrap fails with this error:
gcc -O2 -Wno-error -Wno-error  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wreturn-type -Wcast-qual -Wpointer-arith -Wwrite-strings -Wswitch -Wshadow -Werror  -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -DDEF_UMASK=022 -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/bzip2 -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libarchive/libarchive -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libfetch -DHAVE_NBCOMPAT_H=1 -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libnbcompat -I. -D_LARGEFILE_SOURCE -D_LARGE_FILES -DINET6 -DFTP_COMBINE_CWDS -c ftp.c
ftp.c: In function ‘unmappedaddr’:
ftp.c:149:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
cc1: all warnings being treated as errors
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libfetch
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/pkgtools/pkg_install
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/pkgtools/pkg_install
===> exited with status 1
aborted.
>How-To-Repeat:
$ cd /usr/pkgsrc/bootstrap
$ sudo ./bootstrap
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->joerg
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Thu, 20 Sep 2012 06:34:28 +0000
Responsible-Changed-Why:
Over to libfetch maintainer.


From: "Andrey N. Oktyabrski" <ano@bestmx.ru>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/46987 (pkgsrc does not bootstrap under openSUSE)
Date: Thu, 20 Sep 2012 22:41:25 +0400

 I have a patch (thanks to my friend arn):

 --- ftp.c.orig  2012-09-20 22:37:54.270558121 +0400
 +++ ftp.c       2012-09-20 22:37:33.174453472 +0400
 @@ -146,7 +146,10 @@
              !IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr))
                  return;
          sin4 = (struct sockaddr_in *)sin6;
 -       addr = *(uint32_t *)&sin6->sin6_addr.s6_addr[12];
 +       addr = (((uint32_t)sin6->sin6_addr.s6_addr[12] & 0xff) << 24)
 +            | (((uint32_t)sin6->sin6_addr.s6_addr[13] & 0xff) << 16)
 +            | (((uint32_t)sin6->sin6_addr.s6_addr[14] & 0xff) <<  8)
 +            |  ((uint32_t)sin6->sin6_addr.s6_addr[15] & 0xff);
          port = sin6->sin6_port;
          memset(sin4, 0, sizeof(struct sockaddr_in));
          sin4->sin_addr.s_addr = addr;

 Is this patch correct?

From: "Andrey N. Oktyabrski" <ano@bestmx.ru>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/46987: pkgsrc does not bootstrap under openSUSE
Date: Thu, 20 Sep 2012 23:12:49 +0400

 I have a patch (thanks to my friend arn):

 --- ftp.c.orig  2012-09-20 22:37:54.270558121 +0400
 +++ ftp.c       2012-09-20 22:37:33.174453472 +0400
 @@ -146,7 +146,10 @@
              !IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr))
                  return;
          sin4 = (struct sockaddr_in *)sin6;
 -       addr = *(uint32_t *)&sin6->sin6_addr.s6_addr[12];
 +       addr = (((uint32_t)sin6->sin6_addr.s6_addr[12] & 0xff) << 24)
 +            | (((uint32_t)sin6->sin6_addr.s6_addr[13] & 0xff) << 16)
 +            | (((uint32_t)sin6->sin6_addr.s6_addr[14] & 0xff) <<  8)
 +            |  ((uint32_t)sin6->sin6_addr.s6_addr[15] & 0xff);
          port = sin6->sin6_port;
          memset(sin4, 0, sizeof(struct sockaddr_in));
          sin4->sin_addr.s_addr = addr;

 Is this patch correct?

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.