Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2024 19:52:38 +0100
From:      Mario Marietto <marietto2008@gmail.com>
To:        Jamie Landeg-Jones <jamie@catflap.org>
Cc:        wojtek@puchar.net, freebsd-questions@freebsd.org,  freebsd-hackers@freebsd.org
Subject:   Re: set : illegal option -o pipefail error while trying to upgrade pkg.
Message-ID:  <CA%2B1FSigVJGX7k7oh3SbGmTs1_6egj8S=6yWkmaSWGcgVDY-4uw@mail.gmail.com>
In-Reply-To: <CA%2B1FSiiVgEBfuyKPT37c=4CA4e7sqy4kQ9D5DXue1yJ0Krsdkw@mail.gmail.com>
References:  <CA%2B1FSijXJUDtkmf0KKEtCJ_cFhg4Htc_a=q1BWt9mtGV1T7oLw@mail.gmail.com> <80d527f-df83-5657-6a2a-262156e08440@puchar.net> <CA%2B1FSihN7RpC9Wsh5pPnzX1dJHJgFQPsF=dRA6zQoJ5WiBdChQ@mail.gmail.com> <202401311216.40VCGZSo001051@donotpassgo.dyslexicfish.net> <CA%2B1FSiifR-oyq%2BF=uG-6Lu_meRGvbPSqoKBYeqa3VjBn-1JJmA@mail.gmail.com> <CA%2B1FSiiVgEBfuyKPT37c=4CA4e7sqy4kQ9D5DXue1yJ0Krsdkw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--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 <stdlib.h>
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 <marietto2008@gmail.=
com>
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 <marietto2008@gmai=
l.com>
> 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 <jamie@catfla=
p.org>
>> wrote:
>>
>>> 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
>>> 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

<div dir=3D"ltr"><div>Jamie. Your script didn&#39;t work,but I get your ide=
a and I&#39;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 :</div><div><br></div><div><code style=3D"background-color:=
rgb(222,227,231);padding:0.2px;margin:0.1em;display:inline-block">  <kbd># =
portsnap fetch extract</kbd></code> <br>
<code style=3D"background-color:rgb(222,227,231);padding:0.2px;margin:0.1em=
;display:inline-block"># <kbd>portsnap fetch update <br></kbd></code></div>=
<div><code style=3D"background-color:rgb(222,227,231);padding:0.2px;margin:=
0.1em;display:inline-block"><kbd><br></kbd></code></div><div>At this point =
I have renamed the directory Scripts-old to Scripts and I tried to compile =
a port. This is what happened :</div><div><br></div><div>Invoked as: ./conf=
igure --prefix=3D/usr/local<br>Tclsh: /usr/ports/ports-mgmt/pkg/work/pkg-1.=
20.9/jimsh0<br>Failed: cc -O2 -pipe -Wno-error -fstack-protector-strong -fn=
o-strict-aliasing -c conftest__.c -o conftest__.o<br>cc: error: unknown arg=
ument: &#39;-fstack-protector-strong&#39;<br>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D<br>The failed code was:<br>#include &lt;stdlib.h&gt;<br>int main(voi=
d) {<br><br>return 0;<br>}<br>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br> </di=
v></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr=
">On Wed, Jan 31, 2024 at 3:45=E2=80=AFPM Mario Marietto &lt;<a href=3D"mai=
lto:marietto2008@gmail.com">marietto2008@gmail.com</a>&gt; wrote:<br></div>=
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">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.=
 <br></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_a=
ttr">On Wed, Jan 31, 2024 at 3:31=E2=80=AFPM Mario Marietto &lt;<a href=3D"=
mailto:marietto2008@gmail.com" target=3D"_blank">marietto2008@gmail.com</a>=
&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px =
0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div=
 dir=3D"ltr"><div>Jamie,</div><div><br></div><div>I ran your script and it =
gave no error message,BUT I still got the error :=C2=A0</div><div><br></div=
><div>root@marietto:/usr/ports/ports-mgmt/pkg # make<br></div><div>set: ill=
egal option -o pipefail....</div><div><br></div><div>?<br></div></div><br><=
div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Jan=
 31, 2024 at 1:16=E2=80=AFPM Jamie Landeg-Jones &lt;<a href=3D"mailto:jamie=
@catflap.org" target=3D"_blank">jamie@catflap.org</a>&gt; wrote:<br></div><=
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 &lt;<a href=
=3D"mailto:marietto2008@gmail.com" target=3D"_blank">marietto2008@gmail.com=
</a>&gt; wrote:<br>
<br>
&gt; What I haven&#39;t understood is why you are talking about newer ports=
 when the<br>
&gt; only thing I do is to update ports using the same FreeBSD version,in t=
his<br>
&gt; case 10.4. I mean,upgrading ports without upgrading the version of<br>
&gt; FreeBSD,can&#39;t mean to use newer ports,since I don&#39;t use a newe=
r version of<br>
&gt; the OS.<br>
<br>
The ports infrastucture (under /usr/ports/Mk) now contains scripts that set=
<br>
the &quot;pipefail&quot; option - these scripts are updated when you update=
 the ports<br>
tree.<br>
<br>
I had an old out-of-date box for a while, and used this quick hack to get<b=
r>
it to work.<br>
<br>
You need to run this after you update the ports tree:<br>
<br>
sed -i.bak &#39;/^[[:space:]]*set [+-]o pipefail/d&#39; /usr/ports/Mk/Scrip=
ts/*<br>
<br>
It removes the references to pipefail. This can mean that some build errors=
<br>
are potentially not trapped, but if that&#39;s the case you&#39;re likely t=
o notice<br>
the failure anyway.<br>
<br>
Still best to update your system or your /bin/sh though!<br>
<br>
Cheers, Jamie<br>
</blockquote></div><br clear=3D"all"><br><span class=3D"gmail_signature_pre=
fix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature">Mario.<br></d=
iv>
</blockquote></div><br clear=3D"all"><br><span class=3D"gmail_signature_pre=
fix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature">Mario.<br></d=
iv>
</blockquote></div><br clear=3D"all"><br><span class=3D"gmail_signature_pre=
fix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature">Mario.<br></d=
iv>

--00000000000033d78606104264fd--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B1FSigVJGX7k7oh3SbGmTs1_6egj8S=6yWkmaSWGcgVDY-4uw>