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

[-- Attachment #1 --]
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=/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'
============
The failed code was:
#include <stdlib.h>
int main(void) {

return 0;
}
============

On Wed, Jan 31, 2024 at 3:45 PM 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 PM Mario Marietto <marietto2008@gmail.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 PM Jamie Landeg-Jones <jamie@catflap.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 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/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.
>


-- 
Mario.

[-- Attachment #2 --]
<div dir="ltr"><div>Jamie. Your script didn&#39;t work,but I get your idea 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 with the commands :</div><div><br></div><div><code style="background-color:rgb(222,227,231);padding:0.2px;margin:0.1em;display:inline-block">  <kbd># portsnap fetch extract</kbd></code> <br>
<code style="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="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: ./configure --prefix=/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 -fno-strict-aliasing -c conftest__.c -o conftest__.o<br>cc: error: unknown argument: &#39;-fstack-protector-strong&#39;<br>============<br>The failed code was:<br>#include &lt;stdlib.h&gt;<br>int main(void) {<br><br>return 0;<br>}<br>============<br> </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 31, 2024 at 3:45 PM Mario Marietto &lt;<a href="mailto:marietto2008@gmail.com">marietto2008@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">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. <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 31, 2024 at 3:31 PM Mario Marietto &lt;<a href="mailto:marietto2008@gmail.com" target="_blank">marietto2008@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Jamie,</div><div><br></div><div>I ran your script and it gave no error message,BUT I still got the error : </div><div><br></div><div>root@marietto:/usr/ports/ports-mgmt/pkg # make<br></div><div>set: illegal option -o pipefail....</div><div><br></div><div>?<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 31, 2024 at 1:16 PM Jamie Landeg-Jones &lt;<a href="mailto:jamie@catflap.org" target="_blank">jamie@catflap.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Mario Marietto &lt;<a href="mailto:marietto2008@gmail.com" target="_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 this<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 newer 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<br>
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/Scripts/*<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 to 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="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Mario.<br></div>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Mario.<br></div>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Mario.<br></div>

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