NetBSD Problem Report #53710
From www@NetBSD.org Thu Nov 8 17:04:49 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id E9A5B7A1AC
for <gnats-bugs@gnats.NetBSD.org>; Thu, 8 Nov 2018 17:04:49 +0000 (UTC)
Message-Id: <20181108170448.944957A1F8@mollari.NetBSD.org>
Date: Thu, 8 Nov 2018 17:04:48 +0000 (UTC)
From: scole_mail@gmx.com
Reply-To: scole_mail@gmx.com
To: gnats-bugs@NetBSD.org
Subject: xlint fails to compile using 32 bit host with 64 bit target
X-Send-Pr-Version: www-1.0
>Number: 53710
>Category: toolchain
>Synopsis: xlint fails to compile using 32 bit host with 64 bit target
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 08 17:05:00 +0000 2018
>Closed-Date: Fri Nov 30 18:13:16 +0000 2018
>Last-Modified: Fri Nov 30 18:13:16 +0000 2018
>Originator: scole_mail
>Release: current
>Organization:
none
>Environment:
NetBSD dstar 8.0_STABLE NetBSD 8.0_STABLE (GENERIC) #0: Mon Oct 22 14:40:16 PDT 2018 scole@dstar:/home/scole/nbsd/cvs/8_0/obj/sys/arch/i386/compile/GENERIC i386
>Description:
When I try to compile ia64 src/usr.bin/xlint on my i386 host, I get this error:
# compile lint1/scan.lo
cc -O -I/home/scole/nbsd/cvs/src/obj/tooldir.NetBSD-8.0_STABLE-i386/include/compat -I/home/scole/nbsd/cvs/src/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -I/home/scole/nbsd/cvs/src/tools/lint1/../../usr.bin/xlint/lint1 -I. -DPASS=\"lint1.h\" -I/home/scole/nbsd/cvs/src/tools/lint1/../../usr.bin/xlint/lint1/../arch/ia64 -I/home/scole/nbsd/cvs/src/tools/lint1/../../usr.bin/xlint/lint1/../common -c -o scan.lo.o scan.c
/home/scole/nbsd/cvs/src/tools/lint1/../../usr.bin/xlint/lint1/scan.l: In function 'icon':
/home/scole/nbsd/cvs/src/tools/lint1/../../usr.bin/xlint/lint1/scan.l:562:2: error: unknown type name '__uint128_t'
__uint128_t uq = 0;
^
In file included from /home/scole/nbsd/cvs/src/tools/lint1/../../usr.bin/xlint/lint1/../arch/ia64/targparam.h:38:0,
from /home/scole/nbsd/cvs/src/tools/lint1/../../usr.bin/xlint/lint1/../common/param.h:62,
from /home/scole/nbsd/cvs/src/tools/lint1/../../usr.bin/xlint/lint1/../common/lint.h:46,
from /home/scole/nbsd/cvs/src/tools/lint1/../../usr.bin/xlint/lint1/lint1.h:35,
from /home/scole/nbsd/cvs/src/tools/lint1/../../usr.bin/xlint/lint1/scan.l:49:
/home/scole/nbsd/cvs/src/tools/lint1/../../usr.bin/xlint/lint1/../common/lp64.h:72:28: error: '__int128_t' undeclared (first use in this function)
#define TARG_INT128_MAX ((__int128_t) (((__uint128_t) -1) >> 1))
There seems be an issue with int128/uit128 types not getting defined or configured properly on a 32 bit host.
>How-To-Repeat:
./build.sh -j 6 -U -u -m ia64 release
on a i386 host
>Fix:
Unknown, but if I revert to version 1.82 of src/usr.bin/xlint/lint1/scan.l instead of the latest 1.84 it seems to build
Reverting to 1.82 actually doesn't fix the build, though it does seem to get farther along
>Release-Note:
>Audit-Trail:
From: scole_mail <scole_mail@gmx.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: toolchain/53710 : xlint fails to compile using 32 bit host with 64 bit target
Date: Fri, 16 Nov 2018 11:01:53 -0800
Here is a patch, which is probably not correct, but it at least lets me
complete a build on my machine.
Thanks
Summary of changes: (A/? = New, R/D = Removed, M = Modified)
=============================================================
M lp64.h
Apply patch with "cd .../src/usr.bin/xlint/common ; patch -s -p0 < .../patchfile"
Index: lp64.h
===================================================================
RCS file: /cvsroot/src/usr.bin/xlint/common/lp64.h,v
retrieving revision 1.6
diff -b -u -r1.6 lp64.h
--- lp64.h 7 Oct 2018 14:20:01 -0000 1.6
+++ lp64.h 16 Nov 2018 18:54:08 -0000
@@ -45,7 +45,9 @@
#define LONG_SIZE (8 * CHAR_BIT)
#define QUAD_SIZE (8 * CHAR_BIT)
#define PTR_SIZE (8 * CHAR_BIT)
+#ifdef _LP64
#define INT128_SIZE (16 * CHAR_BIT)
+#endif
#define TARG_SCHAR_MAX ((signed char) (((unsigned char) -1) >> 1))
#define TARG_SCHAR_MIN ((-TARG_CHAR_MAX) - 1)
@@ -67,7 +69,7 @@
#define TARG_QUAD_MIN ((-TARG_QUAD_MAX) - 1)
#define TARG_UQUAD_MAX ((uint64_t) -1)
-#ifndef _LP64
+#ifdef _LP64
/* XXX on a 32 build for a 64 build host we skip these */
#define TARG_INT128_MAX ((__int128_t) (((__uint128_t) -1) >> 1))
#define TARG_INT128_MIN ((-TARG_INT128_MAX) - 1)
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, toolchain-manager@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, scole_mail@gmx.com
Cc:
Subject: Re: toolchain/53710 : xlint fails to compile using 32 bit host with 64 bit target
Date: Fri, 16 Nov 2018 14:25:20 -0500
On Nov 16, 7:05pm, scole_mail@gmx.com (scole_mail) wrote:
-- Subject: Re: toolchain/53710 : xlint fails to compile using 32 bit host wi
| The following reply was made to PR toolchain/53710; it has been noted by GNATS.
|
| From: scole_mail <scole_mail@gmx.com>
| To: gnats-bugs@NetBSD.org
| Cc:
| Subject: Re: toolchain/53710 : xlint fails to compile using 32 bit host with 64 bit target
| Date: Fri, 16 Nov 2018 11:01:53 -0800
|
| Here is a patch, which is probably not correct, but it at least lets me
| complete a build on my machine.
|
| Thanks
|
| Summary of changes: (A/? = New, R/D = Removed, M = Modified)
| =============================================================
| M lp64.h
|
| Apply patch with "cd .../src/usr.bin/xlint/common ; patch -s -p0 < .../patchfile"
Commit it :-)
christos
From: "Sean Cole" <scole@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/53710 CVS commit: src/usr.bin/xlint/common
Date: Fri, 16 Nov 2018 20:49:08 +0000
Module Name: src
Committed By: scole
Date: Fri Nov 16 20:49:08 UTC 2018
Modified Files:
src/usr.bin/xlint/common: lp64.h
Log Message:
PR toolchain/53710
allow 64bit target to compile on 32bit host
Ok'ed by <christos>
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/xlint/common/lp64.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: scole@NetBSD.org
State-Changed-When: Fri, 30 Nov 2018 10:13:16 -0800
State-Changed-Why:
fixed checked into current
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.