Re: set : illegal option -o pipefail error while trying to upgrade pkg.
Date: Wed, 31 Jan 2024 18:52:38 UTC
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.