NetBSD Problem Report #58315
From www@netbsd.org Wed Jun 5 15:42:03 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 0A6591A9238
for <gnats-bugs@gnats.NetBSD.org>; Wed, 5 Jun 2024 15:42:03 +0000 (UTC)
Message-Id: <20240605154201.DB5551A923A@mollari.NetBSD.org>
Date: Wed, 5 Jun 2024 15:42:01 +0000 (UTC)
From: zhouzeechung@qq.com
Reply-To: zhouzeechung@qq.com
To: gnats-bugs@NetBSD.org
Subject: pkgsrc reports "object format ``PE'' which differs from ``ELF''" in cygwin
X-Send-Pr-Version: www-1.0
>Number: 58315
>Category: pkg
>Synopsis: pkgsrc reports "object format ``PE'' which differs from ``ELF''" in cygwin
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: riastradh
>State: feedback
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jun 05 15:45:01 +0000 2024
>Closed-Date:
>Last-Modified: Thu Jul 11 01:55:01 +0000 2024
>Originator: Zeechung
>Release: pkgsrc branch on June the 5th, 2024
>Organization:
None
>Environment:
CYGWIN_NT-10.0-22631 DESKTOP-PI0RAE9 3.5.3-1.x86_64 2024-04-03 17:25 UTC x86_64 Cygwin
>Description:
Hello. I'm new to pkgsrc, and I've just bootstraped it in the cygwin environment. When I tried to build some program, almost every packages output this error:
```
ZeeChung@DESKTOP-PI0RAE9 ~/pkgsrc/games/openrct2
$ bmake
ERROR: [depends.mk] Installed package digest-20220214 has an
ERROR: object format ``PE'' which differs from ``ELF''. Please
ERROR: update the digest-20220214 package to ELF.
*** Error code 1
```
>How-To-Repeat:
① Install cygwin. Install basic utils like gcc, make, wget, etc. with cygwin installer.
② Download current pkgsrc branch and bootstrap. You might meet an error of bcrypt.h when compiling libarchive, just turn off HAVE_BCRYPT_H marco and all.
③ Try to compile a program. Almost every packages output the error above.
>Fix:
Maybe simply skip the format checking in depends.mk?
>Release-Note:
>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58315 CVS commit: pkgsrc/mk
Date: Wed, 5 Jun 2024 17:17:21 +0000
Module Name: pkgsrc
Committed By: riastradh
Date: Wed Jun 5 17:17:21 UTC 2024
Modified Files:
pkgsrc/mk: bsd.prefs.mk
Log Message:
bsd.prefs.mk: Work around Cygwin OBJECT_FMT mistake in bsd.own.mk.
We should maybe isolate this OBJECT_FMT detection in a way that it
can be written down once, not 2-3 times in bsd.prefs.mk and
bsd.own.mk.
Part of the reason it is duplicated now is because it is done
separately for NATIVE_OBJECT_FMT (the object format used by native
packages we're running) and OBJECT_FMT (the object format used by
packages we're building, which may be cross-built).
The same treatment may be required for AIX, OSF/1, and HP-UX, for
which bsd.prefs.mk sets a non-ELF OBJECT_FMT, but for which
bsd.own.mk appears to incorrectly set OBJECT_FMT=ELF too like it does
for Cygwin and Darwin.
No functional change intended on non-Cygwin platforms because this is
conditional on ${NATIVE_OPSYS} == "Cygwin".
PR pkg/58315: pkgsrc reports "object format ``PE'' which differs from ``ELF''" in cygwin
To generate a diff of this commit:
cvs rdiff -u -r1.448 -r1.449 pkgsrc/mk/bsd.prefs.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: pkg-manager->riastradh
Responsible-Changed-By: riastradh@NetBSD.org
Responsible-Changed-When: Wed, 05 Jun 2024 17:36:37 +0000
Responsible-Changed-Why:
I broke it, probably
State-Changed-From-To: open->pending-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Wed, 05 Jun 2024 17:36:37 +0000
State-Changed-Why:
Candidate fix committed to HEAD -- can you try pkgsrc-current and see
if you make more progress?
pullup-pkgsrc #6856 requested for pkgsrc-2024Q1:
https://releng.NetBSD.org/cgi-bin/req-pkgsrc.cgi?show=6856
State-Changed-From-To: pending-pullups->feedback
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Sat, 08 Jun 2024 13:23:39 +0000
State-Changed-Why:
Fix has been committed to HEAD and pulled up to pkgsrc-2024Q1.
Can you see if it works better now?
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58315 CVS commit: pkgsrc/mk
Date: Thu, 11 Jul 2024 01:50:10 +0000
Module Name: pkgsrc
Committed By: riastradh
Date: Thu Jul 11 01:50:10 UTC 2024
Modified Files:
pkgsrc/mk: bsd.prefs.mk
Log Message:
bsd.prefs.mk: Work around broken bsd.own.mk OBJECT_FMT on AIX too.
PR pkg/58315: pkgsrc reports "object format ``PE'' which differs from ``ELF''" in cygwin
To generate a diff of this commit:
cvs rdiff -u -r1.450 -r1.451 pkgsrc/mk/bsd.prefs.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.