From nobody Wed Jan 31 18:52:38 2024 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TQB4t0gMBz584TY; Wed, 31 Jan 2024 18:53:18 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TQB4s2bfNz4SvZ; Wed, 31 Jan 2024 18:53:17 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=Eg9MN5iR; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of marietto2008@gmail.com designates 2a00:1450:4864:20::632 as permitted sender) smtp.mailfrom=marietto2008@gmail.com Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a36597a3104so5460866b.2; Wed, 31 Jan 2024 10:53:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706727195; x=1707331995; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=s5hM4rhwevdxS0Ck8quXu0LRO2DJlbt4/acZMtTbmYk=; b=Eg9MN5iRaH8z2DINngDddaN0wbakW5FfiaZ0rb6O7WrChUnCA9OxRf8b1QGtf2Sxlt udi/VRgelBo0DtgVdGe+DSI72hW59Vl5d1quGL0PbAyf77UuV1wj4Vfk0GmP/WLpHidd 6HP8pO4FK1I/c2Asm3fBhVPQP33di2ItI5CrVdNhx/ogqc6qXw2mFBRuc+CEPqWt9bDy wPZGIE1NLRpybdxQFCFC8zEyQ7IDBYr2zaBEmbgZ6+CpoLX4HIKQe8YqA5ij9su0xTyT tGs5U/BuqaIQOD5i8nHziZhfGSj242H0eebiYNWBHAigIJELc8AdL7Zk2Ekek7Qi88mp 416A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706727195; x=1707331995; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=s5hM4rhwevdxS0Ck8quXu0LRO2DJlbt4/acZMtTbmYk=; b=f461Vp99KVlSqe+3J7PDbhAD0150b1+ka36KSD9qsv2DSopHt/iVdKQ8PnYwzivhE/ EuEm9bwfofF0BrMR8BrQ+otVCD5SI+xddl6zAyodP29x2G+xQCRMdsBnzhOkeh/fne1t npfRi2+P7nEudvxuC8QoLaL/540brfWxFrZVBGZwk3vl+X7DOZzgMbLGp4Ghh32bykpL deheiwTtli4JNzRsQshS+efGiI1KACe3UhPs61EKU90UpgOrpgqygOQSZlxFTeU1DTCj UJYgT7obsmUQTzUz6UAnoIUrERAQC6M/enBnWZpGv0AFeQlp4N6U7nd27vHrgxEgrCzr Ymvw== X-Gm-Message-State: AOJu0YzbsR/qxtU+kOf3o3O4kgSxpJ4FbLJhjmCjsizJ0TT4zlDE+axF 0VWhSGCZM9UtZ0MD/p2B3DiumeD3XKzcpkGQOn3DFs2T3acmCxYXP50li7XZlNiGBt//4vEmI3z EYUkE3rywQlh5kJVdfipWr9HZ9Rk= X-Google-Smtp-Source: AGHT+IHZZn5zkOmanmtabVZq2VzNjToI+FzLT+Qxm5QMSugVMRCEGTlxhKbpx0o60rJPADdsDt7p3HjBJu/XBvgVerA= X-Received: by 2002:a17:906:4154:b0:a36:70ce:31ba with SMTP id l20-20020a170906415400b00a3670ce31bamr1605444ejk.5.1706727195267; Wed, 31 Jan 2024 10:53:15 -0800 (PST) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: <80d527f-df83-5657-6a2a-262156e08440@puchar.net> <202401311216.40VCGZSo001051@donotpassgo.dyslexicfish.net> In-Reply-To: From: Mario Marietto Date: Wed, 31 Jan 2024 19:52:38 +0100 Message-ID: Subject: Re: set : illegal option -o pipefail error while trying to upgrade pkg. To: Jamie Landeg-Jones Cc: wojtek@puchar.net, freebsd-questions@freebsd.org, freebsd-hackers@freebsd.org Content-Type: multipart/alternative; boundary="00000000000033d78606104264fd" X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.22 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.22)[-0.222]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MISSING_XM_UA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::632:from]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org,freebsd-hackers@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+] X-Rspamd-Queue-Id: 4TQB4s2bfNz4SvZ --00000000000033d78606104264fd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Jamie. Your script didn't work,but I get your idea and I've backed up the directory /mnt/da0p2/usr/ports/Mk/Scripts to /mnt/da0p2/usr/ports/Mk/Scripts-old ; then I have upgraded the ports tree with the commands : # portsnap fetch extract # portsnap fetch update At this point I have renamed the directory Scripts-old to Scripts and I tried to compile a port. This is what happened : Invoked as: ./configure --prefix=3D/usr/local Tclsh: /usr/ports/ports-mgmt/pkg/work/pkg-1.20.9/jimsh0 Failed: cc -O2 -pipe -Wno-error -fstack-protector-strong -fno-strict-aliasing -c conftest__.c -o conftest__.o cc: error: unknown argument: '-fstack-protector-strong' =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The failed code was: #include int main(void) { return 0; } =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D On Wed, Jan 31, 2024 at 3:45=E2=80=AFPM Mario Marietto wrote: > Can you tell me where should be stored the references to pipefail ? Maybe > I will try to remove them manually. Maybe your command does not work out = of > the box. > > On Wed, Jan 31, 2024 at 3:31=E2=80=AFPM Mario Marietto > wrote: > >> Jamie, >> >> I ran your script and it gave no error message,BUT I still got the error >> : >> >> root@marietto:/usr/ports/ports-mgmt/pkg # make >> set: illegal option -o pipefail.... >> >> ? >> >> On Wed, Jan 31, 2024 at 1:16=E2=80=AFPM Jamie Landeg-Jones >> wrote: >> >>> Mario Marietto wrote: >>> >>> > What I haven't understood is why you are talking about newer ports >>> when the >>> > only thing I do is to update ports using the same FreeBSD version,in >>> this >>> > case 10.4. I mean,upgrading ports without upgrading the version of >>> > FreeBSD,can't mean to use newer ports,since I don't use a newer >>> version of >>> > the OS. >>> >>> The ports infrastucture (under /usr/ports/Mk) now contains scripts that >>> set >>> the "pipefail" option - these scripts are updated when you update the >>> ports >>> tree. >>> >>> I had an old out-of-date box for a while, and used this quick hack to g= et >>> it to work. >>> >>> You need to run this after you update the ports tree: >>> >>> sed -i.bak '/^[[:space:]]*set [+-]o pipefail/d' /usr/ports/Mk/Scripts/* >>> >>> It removes the references to pipefail. This can mean that some build >>> errors >>> are potentially not trapped, but if that's the case you're likely to >>> notice >>> the failure anyway. >>> >>> Still best to update your system or your /bin/sh though! >>> >>> Cheers, Jamie >>> >> >> >> -- >> Mario. >> > > > -- > Mario. > --=20 Mario. --00000000000033d78606104264fd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Jamie. Your script didn't work,but I get your ide= a and I've backed up the directory /mnt/da0p2/usr/ports/Mk/Scripts to /= mnt/da0p2/usr/ports/Mk/Scripts-old ; then I have upgraded the ports tree wi= th the commands :

# = portsnap fetch extract
# portsnap fetch update
=

At this point = I have renamed the directory Scripts-old to Scripts and I tried to compile = a port. This is what happened :

Invoked as: ./conf= igure --prefix=3D/usr/local
Tclsh: /usr/ports/ports-mgmt/pkg/work/pkg-1.= 20.9/jimsh0
Failed: cc -O2 -pipe -Wno-error -fstack-protector-strong -fn= o-strict-aliasing -c conftest__.c -o conftest__.o
cc: error: unknown arg= ument: '-fstack-protector-strong'
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D
The failed code was:
#include <stdlib.h>
int main(voi= d) {

return 0;
}
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

On Wed, Jan 31, 2024 at 3:45=E2=80=AFPM Mario Marietto <marietto2008@gmail.com> wrote:
=
Can you = tell me where should be stored the references to pipefail ? Maybe I will tr= y to remove them manually. Maybe your command does not work out of the box.=

On Wed, Jan 31, 2024 at 3:31=E2=80=AFPM Mario Marietto <marietto2008@gmail.com= > wrote:
Jamie,

I ran your script and it = gave no error message,BUT I still got the error :=C2=A0

root@marietto:/usr/ports/ports-mgmt/pkg # make
set: ill= egal option -o pipefail....

?

<= div class=3D"gmail_quote">
On Wed, Jan= 31, 2024 at 1:16=E2=80=AFPM Jamie Landeg-Jones <jamie@catflap.org> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">Mario Marietto <marietto2008@gmail.com= > wrote:

> What I haven't understood is why you are talking about newer ports= when the
> only thing I do is to update ports using the same FreeBSD version,in t= his
> case 10.4. I mean,upgrading ports without upgrading the version of
> FreeBSD,can't mean to use newer ports,since I don't use a newe= r version of
> the OS.

The ports infrastucture (under /usr/ports/Mk) now contains scripts that set=
the "pipefail" option - these scripts are updated when you update= the ports
tree.

I had an old out-of-date box for a while, and used this quick hack to get it to work.

You need to run this after you update the ports tree:

sed -i.bak '/^[[:space:]]*set [+-]o pipefail/d' /usr/ports/Mk/Scrip= ts/*

It removes the references to pipefail. This can mean that some build errors=
are potentially not trapped, but if that's the case you're likely t= o notice
the failure anyway.

Still best to update your system or your /bin/sh though!

Cheers, Jamie


--
Mario.


--
Mario.


--
Mario.
--00000000000033d78606104264fd--