Discussion:
set : illegal option -o pipefail error while trying to upgrade pkg.
(too old to reply)
Mario Marietto
2024-01-28 00:11:15 UTC
Permalink
Hello.

I'm trying to upgrade as much as I can FreeBSD 10.4 because it is the only
one version that can compile some of the old arm 32 bit code I need to use
for one of my projects. As you already know,packages don't work at all,but
ports almost work. I was trying to install xfce4 from ports,but the
compilation stopped when it didn't accept this file :


http://distcache.FreeBSD.org/ports-distfiles/trousers-0.3.14.tar.gz


at this point,I decided to upgrade the system with :


# freebsd-update fetch
# freebsd-update install


and the ports tree with :


# portsnap fetch extract
# portsnap fetch update


At this point it asked me to update pkg,so I did :


# cd /usr/ports/ports-mgmt/pkg
# make


but unfortunately I got this error that I'm not able to fix :


set : illegal option -o pipefail


and I can't do anything anymore. I'm stuck here. Can someone help me to fix
it ? thanks.
--
Mario.
Warner Losh
2024-01-28 00:54:03 UTC
Permalink
Post by Mario Marietto
Hello.
I'm trying to upgrade as much as I can FreeBSD 10.4 because it is the only
one version that can compile some of the old arm 32 bit code I need to use
for one of my projects. As you already know,packages don't work at all,but
ports almost work. I was trying to install xfce4 from ports,but the
http://distcache.FreeBSD.org/ports-distfiles/trousers-0.3.14.tar.gz
# freebsd-update fetch
# freebsd-update install
# portsnap fetch extract
# portsnap fetch update
# cd /usr/ports/ports-mgmt/pkg
# make
set : illegal option -o pipefail
and I can't do anything anymore. I'm stuck here. Can someone help me to
fix it ? thanks.
Save a copy of /bin/sh. Check out stable/13 (or 12 if the following fails).
Cd to src/bin/sh. Type make all. You may need -m /path/to/src/share/mk if
make complains. Create a test area, I'll call it /destdir. Also mkdir
/destdir/bin too. Then make install DESTDIR=/destdir. You may need to do
this as root. Ignore the failures for the man pages and maybe tests. You
should have a /destdir/bin/sh. See if it runs. If so copy it to /bin and
try the upgrade again.

I think 12 has pipefail. I dont think 11 does. 13 definitely has it. The
error message is from the shell.

Warner
Warner Losh
2024-01-28 04:42:51 UTC
Permalink
Post by Warner Losh
Post by Mario Marietto
Hello.
I'm trying to upgrade as much as I can FreeBSD 10.4 because it is the
only one version that can compile some of the old arm 32 bit code I need to
use for one of my projects. As you already know,packages don't work at
all,but ports almost work. I was trying to install xfce4 from ports,but the
http://distcache.FreeBSD.org/ports-distfiles/trousers-0.3.14.tar.gz
# freebsd-update fetch
# freebsd-update install
# portsnap fetch extract
# portsnap fetch update
# cd /usr/ports/ports-mgmt/pkg
# make
set : illegal option -o pipefail
and I can't do anything anymore. I'm stuck here. Can someone help me to
fix it ? thanks.
Save a copy of /bin/sh. Check out stable/13 (or 12 if the following
fails). Cd to src/bin/sh. Type make all. You may need -m
/path/to/src/share/mk if make complains. Create a test area, I'll call it
/destdir. Also mkdir /destdir/bin too. Then make install DESTDIR=/destdir.
You may need to do this as root. Ignore the failures for the man pages and
maybe tests. You should have a /destdir/bin/sh. See if it runs. If so copy
it to /bin and try the upgrade again.
I think 12 has pipefail. I dont think 11 does. 13 definitely has it. The
error message is from the shell.
The command "set -o pipefail" is how you'll know if it will work.... or
stands a good chance of working.


Warner
Mario Marietto
2024-01-28 08:47:00 UTC
Permalink
# set -o pipefail
set : variable name must begin with a letter.
Post by Warner Losh
Post by Warner Losh
Post by Mario Marietto
Hello.
I'm trying to upgrade as much as I can FreeBSD 10.4 because it is the
only one version that can compile some of the old arm 32 bit code I need to
use for one of my projects. As you already know,packages don't work at
all,but ports almost work. I was trying to install xfce4 from ports,but the
http://distcache.FreeBSD.org/ports-distfiles/trousers-0.3.14.tar.gz
# freebsd-update fetch
# freebsd-update install
# portsnap fetch extract
# portsnap fetch update
# cd /usr/ports/ports-mgmt/pkg
# make
set : illegal option -o pipefail
and I can't do anything anymore. I'm stuck here. Can someone help me to
fix it ? thanks.
Save a copy of /bin/sh. Check out stable/13 (or 12 if the following
fails). Cd to src/bin/sh. Type make all. You may need -m
/path/to/src/share/mk if make complains. Create a test area, I'll call it
/destdir. Also mkdir /destdir/bin too. Then make install DESTDIR=/destdir.
You may need to do this as root. Ignore the failures for the man pages and
maybe tests. You should have a /destdir/bin/sh. See if it runs. If so copy
it to /bin and try the upgrade again.
I think 12 has pipefail. I dont think 11 does. 13 definitely has it. The
error message is from the shell.
The command "set -o pipefail" is how you'll know if it will work.... or
stands a good chance of working.
Warner
--
Mario.
Mario Marietto
2024-01-28 13:04:20 UTC
Permalink
Hello Warner,

Thanks for your help. But unfortunately your solution didn't work. After
having followed your instructions carefully :

Save a copy of /bin/sh. Check out stable/13 (or 12 if the following fails).
Post by Warner Losh
Cd to src/bin/sh. Type make all. You may need -m /path/to/src/share/mk if
it makes complaints. Create a test area, I'll call it /destdir. Also mkdir
/destdir/bin too. Then make install DESTDIR=/destdir. You may need to do
this as root. Ignore the failures for the man pages and maybe tests. You
should have a /destdir/bin/sh. See if it runs. If so, copy it to /bin and
try the upgrade again.
It asked me to copy some new libraries from FreeBSD 14.0 to the /usr/lib32
and /lib directories of the FreeBSD 10.4 system. I copied all the libraries
requested and at the end,it gave the following error :

/lib/libc.so.7: version FBSD_1.6 required by /bin/sh not found

so,I have changed the flag that does not allow me to rename it with the
command :

# chflags noschg libc.so.7

and I've copied the libc.so.7 file that's on the directory /lib of the
FreeBSD 14 to the same directory of the FreeBSD 10.4 system and I've
rebooted. Unfortunately it hasn't been accepted. The error is the following
one :

/lib/libc.so.7 : unsupported relocation type 37 in non-PLT relocations

What has been my mistake ? Maybe using FreeBSD 14 is wrong ?
Post by Warner Losh
# set -o pipefail
set : variable name must begin with a letter.
Post by Warner Losh
Post by Warner Losh
Post by Mario Marietto
Hello.
I'm trying to upgrade as much as I can FreeBSD 10.4 because it is the
only one version that can compile some of the old arm 32 bit code I need to
use for one of my projects. As you already know,packages don't work at
all,but ports almost work. I was trying to install xfce4 from ports,but the
http://distcache.FreeBSD.org/ports-distfiles/trousers-0.3.14.tar.gz
# freebsd-update fetch
# freebsd-update install
# portsnap fetch extract
# portsnap fetch update
# cd /usr/ports/ports-mgmt/pkg
# make
set : illegal option -o pipefail
and I can't do anything anymore. I'm stuck here. Can someone help me to
fix it ? thanks.
Save a copy of /bin/sh. Check out stable/13 (or 12 if the following
fails). Cd to src/bin/sh. Type make all. You may need -m
/path/to/src/share/mk if make complains. Create a test area, I'll call it
/destdir. Also mkdir /destdir/bin too. Then make install DESTDIR=/destdir.
You may need to do this as root. Ignore the failures for the man pages and
maybe tests. You should have a /destdir/bin/sh. See if it runs. If so copy
it to /bin and try the upgrade again.
I think 12 has pipefail. I dont think 11 does. 13 definitely has it. The
error message is from the shell.
The command "set -o pipefail" is how you'll know if it will work.... or
stands a good chance of working.
Warner
--
Mario.
--
Mario.
Mario Marietto
2024-01-28 14:17:12 UTC
Permalink
I've used FreeBSD 13.2 and I've got the same error message :

/lib/libc.so.7: version FBSD_1.6 required by /bin/sh not found

Let's see with FreeBSD 12.04...
Post by Mario Marietto
Hello Warner,
Thanks for your help. But unfortunately your solution didn't work. After
Save a copy of /bin/sh. Check out stable/13 (or 12 if the following
Post by Warner Losh
fails). Cd to src/bin/sh. Type make all. You may need -m
/path/to/src/share/mk if it makes complaints. Create a test area, I'll call
it /destdir. Also mkdir /destdir/bin too. Then make install
DESTDIR=/destdir. You may need to do this as root. Ignore the failures for
the man pages and maybe tests. You should have a /destdir/bin/sh. See if it
runs. If so, copy it to /bin and try the upgrade again.
It asked me to copy some new libraries from FreeBSD 14.0 to the /usr/lib32
and /lib directories of the FreeBSD 10.4 system. I copied all the libraries
/lib/libc.so.7: version FBSD_1.6 required by /bin/sh not found
so,I have changed the flag that does not allow me to rename it with the
# chflags noschg libc.so.7
and I've copied the libc.so.7 file that's on the directory /lib of the
FreeBSD 14 to the same directory of the FreeBSD 10.4 system and I've
rebooted. Unfortunately it hasn't been accepted. The error is the following
/lib/libc.so.7 : unsupported relocation type 37 in non-PLT relocations
What has been my mistake ? Maybe using FreeBSD 14 is wrong ?
Post by Warner Losh
# set -o pipefail
set : variable name must begin with a letter.
Post by Warner Losh
Post by Warner Losh
Post by Mario Marietto
Hello.
I'm trying to upgrade as much as I can FreeBSD 10.4 because it is the
only one version that can compile some of the old arm 32 bit code I need to
use for one of my projects. As you already know,packages don't work at
all,but ports almost work. I was trying to install xfce4 from ports,but the
http://distcache.FreeBSD.org/ports-distfiles/trousers-0.3.14.tar.gz
# freebsd-update fetch
# freebsd-update install
# portsnap fetch extract
# portsnap fetch update
# cd /usr/ports/ports-mgmt/pkg
# make
set : illegal option -o pipefail
and I can't do anything anymore. I'm stuck here. Can someone help me
to fix it ? thanks.
Save a copy of /bin/sh. Check out stable/13 (or 12 if the following
fails). Cd to src/bin/sh. Type make all. You may need -m
/path/to/src/share/mk if make complains. Create a test area, I'll call it
/destdir. Also mkdir /destdir/bin too. Then make install DESTDIR=/destdir.
You may need to do this as root. Ignore the failures for the man pages and
maybe tests. You should have a /destdir/bin/sh. See if it runs. If so copy
it to /bin and try the upgrade again.
I think 12 has pipefail. I dont think 11 does. 13 definitely has it.
The error message is from the shell.
The command "set -o pipefail" is how you'll know if it will work.... or
stands a good chance of working.
Warner
--
Mario.
--
Mario.
--
Mario.
Warner Losh
2024-01-28 17:53:53 UTC
Permalink
OK. On your 10.x arm system, you need to build /bin/sh using sources from
FreeBSD 13.
Binaries from 12 or 13 won't work on your 10.x system: libc doesn't have
the right symbols.
But source build against a 10.x system should work. That was my suggestion.
Too bad
pipefail didn't arrive until 14. So you'll need to build that on your 14
system.

But it turns out that's a bit of a hassle. Well, not a huge hassle, I had
to do the following.
First, set up a FreeBSD 10.4 armv6 chroot and install qemu-user-static. See
https://gist.github.com/bsdimp/0f2f294c7441ebf68a8ffebab935bd2c for details.
Or you could just run the RPI-B image on a real RPI-B. It would be more of
a hassle and only marginally faster.

Next, I created a worktree and a side branch (using the same paths in the
gist
above, note my origin is freebsd but the default is origin):
% cd git/freebsd-src
% mkdir ~/arm10/imp
% git worktree add -b arm10-14 ~/arm10/imp/stable-14 freebsd/stable/14
I then had to apply these patches:
https://people.freebsd.org/~imp/14-sh-on-10.diff
which coped with history / libedit overhaul and O_VERIFY being added to
the system. OK, truth be told I iterated a bunch to get the patch... I had
no
reason to think these changes were needed before I started...

Next, I got into the emulated arm tree:
% sudo chroot ~/arm10 /bin/sh
# cd /imp/stable-14/
# patch -p1 < 14-sh-on-10.diff
# make SSP_CFLAGS= WITHOUT_TESTS=t WITHOUT_MAN=t DEBUG_FILES_CFLAGS= WARNS=0
.. lots of output, ignore the warnings
# set -o pipefail
set: Illegal option -o pipefail
# /usr/obj/imp/stable-14/arm.armv6/bin/sh/sh
# set -o pipefail
# ^D
#

So success! But all that's a hassle, so I also uploaded the sh to
https://people.freebsd.org/~imp/sh14-on-10.armv6
so you can just try it. I don't know if this will fix the problem that put
us down
this rabbit hole in the first place or not. But maybe some of the above is
helpful
or useful for other reasons.

Hope this helps.

Warner
Post by Mario Marietto
nothing to do.
Post by Mario Marietto
/lib/libc.so.7: version FBSD_1.6 required by /bin/sh not found
Let's see with FreeBSD 12.04...
Post by Mario Marietto
Hello Warner,
Thanks for your help. But unfortunately your solution didn't work. After
Save a copy of /bin/sh. Check out stable/13 (or 12 if the following
Post by Warner Losh
fails). Cd to src/bin/sh. Type make all. You may need -m
/path/to/src/share/mk if it makes complaints. Create a test area, I'll call
it /destdir. Also mkdir /destdir/bin too. Then make install
DESTDIR=/destdir. You may need to do this as root. Ignore the failures for
the man pages and maybe tests. You should have a /destdir/bin/sh. See if it
runs. If so, copy it to /bin and try the upgrade again.
It asked me to copy some new libraries from FreeBSD 14.0 to the
/usr/lib32 and /lib directories of the FreeBSD 10.4 system. I copied all
/lib/libc.so.7: version FBSD_1.6 required by /bin/sh not found
so,I have changed the flag that does not allow me to rename it with the
# chflags noschg libc.so.7
and I've copied the libc.so.7 file that's on the directory /lib of the
FreeBSD 14 to the same directory of the FreeBSD 10.4 system and I've
rebooted. Unfortunately it hasn't been accepted. The error is the following
/lib/libc.so.7 : unsupported relocation type 37 in non-PLT relocations
What has been my mistake ? Maybe using FreeBSD 14 is wrong ?
Post by Warner Losh
# set -o pipefail
set : variable name must begin with a letter.
Post by Warner Losh
Post by Warner Losh
Post by Mario Marietto
Hello.
I'm trying to upgrade as much as I can FreeBSD 10.4 because it is
the only one version that can compile some of the old arm 32 bit code I
need to use for one of my projects. As you already know,packages don't work
at all,but ports almost work. I was trying to install xfce4 from ports,but
http://distcache.FreeBSD.org/ports-distfiles/trousers-0.3.14.tar.gz
# freebsd-update fetch
# freebsd-update install
# portsnap fetch extract
# portsnap fetch update
# cd /usr/ports/ports-mgmt/pkg
# make
set : illegal option -o pipefail
and I can't do anything anymore. I'm stuck here. Can someone help me
to fix it ? thanks.
Save a copy of /bin/sh. Check out stable/13 (or 12 if the following
fails). Cd to src/bin/sh. Type make all. You may need -m
/path/to/src/share/mk if make complains. Create a test area, I'll call it
/destdir. Also mkdir /destdir/bin too. Then make install DESTDIR=/destdir.
You may need to do this as root. Ignore the failures for the man pages and
maybe tests. You should have a /destdir/bin/sh. See if it runs. If so copy
it to /bin and try the upgrade again.
I think 12 has pipefail. I dont think 11 does. 13 definitely has it.
The error message is from the shell.
The command "set -o pipefail" is how you'll know if it will work....
or stands a good chance of working.
Warner
--
Mario.
--
Mario.
--
Mario.
--
Mario.
Warner Losh
2024-01-28 18:18:47 UTC
Permalink
Post by Warner Losh
OK. On your 10.x arm system, you need to build /bin/sh using sources
from FreeBSD 13.
Binaries from 12 or 13 won't work on your 10.x system: libc doesn't
have the right symbols.
But source build against a 10.x system should work. That was my
suggestion. Too bad
pipefail didn't arrive until 14. So you'll need to build that on
your 14 system.
... need to build stable/14 on your 10.x system this should say. Rather
an important
detail I didn't catch on first proofreading.
What about just copying /rescue/sh from a new enough system?
My build server is 13.2 but it has a 14.0-RELEASE-p4 poudriere jail and
the sh from that runs on 13.2 at least (and has pipefail). I tried to
test with an older version of FreeBSD but it looks like my spare machine
is too new for its usb keyboard to work with FreeBSD 10 or 11...
/rescue/sh will have system calls embedded in it that the old FreeBSD 10
kernel will not understand. Between FreeBSD 11 and 12 we moved to
64bit inode sizes, adding a bunch of system calls that we don't fall back
to the old versions of. Plus we've added a bunch of *at system calls that
we now use always (they are more general than the old system calls, so
those have changed into library routines that call the *at function in the
right way).

Warner
Mario Marietto
2024-01-28 22:04:26 UTC
Permalink
Thanks.

You gave me the instructions about how to upgrade pkg on FreeBSD 10 for
armV6 ? This will be useful when I will install FreeBSD 10.04 (but I see
that I can even install 12.04) on my Chromebook. But at the moment I'm
trying to compile the only revision which allows to install FreeBSD on the
Chromebook :


# svnlite co http://svn.freebsd.org/base/***@269385 /usr/src

directly on my old Intel I5 CPU PC,where I have installed FreeBSD 10.4 x64 bit.

So,I would need to understand how to fix the pipefail error necessary
to upgrade pkg

and to install xfce4 as well as some other useful ports.

The idea of using the sh statically linked didn't work. I get a lot of
errors and

I doubt that I can fix them.


Thanks.
Post by Warner Losh
Post by Warner Losh
OK. On your 10.x arm system, you need to build /bin/sh using sources
from FreeBSD 13.
Binaries from 12 or 13 won't work on your 10.x system: libc doesn't
have the right symbols.
But source build against a 10.x system should work. That was my
suggestion. Too bad
pipefail didn't arrive until 14. So you'll need to build that on
your 14 system.
... need to build stable/14 on your 10.x system this should say. Rather
an important
detail I didn't catch on first proofreading.
What about just copying /rescue/sh from a new enough system?
My build server is 13.2 but it has a 14.0-RELEASE-p4 poudriere jail and
the sh from that runs on 13.2 at least (and has pipefail). I tried to
test with an older version of FreeBSD but it looks like my spare machine
is too new for its usb keyboard to work with FreeBSD 10 or 11...
/rescue/sh will have system calls embedded in it that the old FreeBSD 10
kernel will not understand. Between FreeBSD 11 and 12 we moved to
64bit inode sizes, adding a bunch of system calls that we don't fall back
to the old versions of. Plus we've added a bunch of *at system calls that
we now use always (they are more general than the old system calls, so
those have changed into library routines that call the *at function in the
right way).
Warner
--
Mario.
Warner Losh
2024-01-28 17:55:14 UTC
Permalink
Post by Warner Losh
OK. On your 10.x arm system, you need to build /bin/sh using sources from
FreeBSD 13.
Binaries from 12 or 13 won't work on your 10.x system: libc doesn't have
the right symbols.
But source build against a 10.x system should work. That was my
suggestion. Too bad
pipefail didn't arrive until 14. So you'll need to build that on your 14
system.
.. need to build stable/14 on your 10.x system this should say. Rather an
important
detail I didn't catch on first proofreading.
Post by Warner Losh
But it turns out that's a bit of a hassle. Well, not a huge hassle, I had
to do the following.
First, set up a FreeBSD 10.4 armv6 chroot and install qemu-user-static. See
https://gist.github.com/bsdimp/0f2f294c7441ebf68a8ffebab935bd2c for details.
Or you could just run the RPI-B image on a real RPI-B. It would be more of
a hassle and only marginally faster.
Next, I created a worktree and a side branch (using the same paths in the
gist
% cd git/freebsd-src
% mkdir ~/arm10/imp
% git worktree add -b arm10-14 ~/arm10/imp/stable-14 freebsd/stable/14
https://people.freebsd.org/~imp/14-sh-on-10.diff
which coped with history / libedit overhaul and O_VERIFY being added to
the system. OK, truth be told I iterated a bunch to get the patch... I had
no
reason to think these changes were needed before I started...
% sudo chroot ~/arm10 /bin/sh
# cd /imp/stable-14/
# patch -p1 < 14-sh-on-10.diff
# make SSP_CFLAGS= WITHOUT_TESTS=t WITHOUT_MAN=t DEBUG_FILES_CFLAGS= WARNS=0
... lots of output, ignore the warnings
# set -o pipefail
set: Illegal option -o pipefail
# /usr/obj/imp/stable-14/arm.armv6/bin/sh/sh
# set -o pipefail
# ^D
#
So success! But all that's a hassle, so I also uploaded the sh to
https://people.freebsd.org/~imp/sh14-on-10.armv6
so you can just try it. I don't know if this will fix the problem that put
us down
this rabbit hole in the first place or not. But maybe some of the above is
helpful
or useful for other reasons.
Hope this helps.
Warner
Post by Mario Marietto
nothing to do.
Post by Mario Marietto
/lib/libc.so.7: version FBSD_1.6 required by /bin/sh not found
Let's see with FreeBSD 12.04...
Post by Mario Marietto
Hello Warner,
Thanks for your help. But unfortunately your solution didn't work.
Save a copy of /bin/sh. Check out stable/13 (or 12 if the following
Post by Warner Losh
fails). Cd to src/bin/sh. Type make all. You may need -m
/path/to/src/share/mk if it makes complaints. Create a test area, I'll call
it /destdir. Also mkdir /destdir/bin too. Then make install
DESTDIR=/destdir. You may need to do this as root. Ignore the failures for
the man pages and maybe tests. You should have a /destdir/bin/sh. See if it
runs. If so, copy it to /bin and try the upgrade again.
It asked me to copy some new libraries from FreeBSD 14.0 to the
/usr/lib32 and /lib directories of the FreeBSD 10.4 system. I copied all
/lib/libc.so.7: version FBSD_1.6 required by /bin/sh not found
so,I have changed the flag that does not allow me to rename it with the
# chflags noschg libc.so.7
and I've copied the libc.so.7 file that's on the directory /lib of the
FreeBSD 14 to the same directory of the FreeBSD 10.4 system and I've
rebooted. Unfortunately it hasn't been accepted. The error is the following
/lib/libc.so.7 : unsupported relocation type 37 in non-PLT relocations
What has been my mistake ? Maybe using FreeBSD 14 is wrong ?
Post by Warner Losh
# set -o pipefail
set : variable name must begin with a letter.
Post by Warner Losh
Post by Warner Losh
Post by Mario Marietto
Hello.
I'm trying to upgrade as much as I can FreeBSD 10.4 because it is
the only one version that can compile some of the old arm 32 bit code I
need to use for one of my projects. As you already know,packages don't work
at all,but ports almost work. I was trying to install xfce4 from ports,but
http://distcache.FreeBSD.org/ports-distfiles/trousers-0.3.14.tar.gz
# freebsd-update fetch
# freebsd-update install
# portsnap fetch extract
# portsnap fetch update
# cd /usr/ports/ports-mgmt/pkg
# make
set : illegal option -o pipefail
and I can't do anything anymore. I'm stuck here. Can someone help
me to fix it ? thanks.
Save a copy of /bin/sh. Check out stable/13 (or 12 if the following
fails). Cd to src/bin/sh. Type make all. You may need -m
/path/to/src/share/mk if make complains. Create a test area, I'll call it
/destdir. Also mkdir /destdir/bin too. Then make install DESTDIR=/destdir.
You may need to do this as root. Ignore the failures for the man pages and
maybe tests. You should have a /destdir/bin/sh. See if it runs. If so copy
it to /bin and try the upgrade again.
I think 12 has pipefail. I dont think 11 does. 13 definitely has it.
The error message is from the shell.
The command "set -o pipefail" is how you'll know if it will work....
or stands a good chance of working.
Warner
--
Mario.
--
Mario.
--
Mario.
--
Mario.
Mario Marietto
2024-01-28 14:33:19 UTC
Permalink
Using sh of FreeBSD 12.04 :

/bin/sh : Undefined symbol "***@FBSD_1.5"

nothing to do.
Post by Mario Marietto
/lib/libc.so.7: version FBSD_1.6 required by /bin/sh not found
Let's see with FreeBSD 12.04...
Post by Mario Marietto
Hello Warner,
Thanks for your help. But unfortunately your solution didn't work. After
Save a copy of /bin/sh. Check out stable/13 (or 12 if the following
Post by Warner Losh
fails). Cd to src/bin/sh. Type make all. You may need -m
/path/to/src/share/mk if it makes complaints. Create a test area, I'll call
it /destdir. Also mkdir /destdir/bin too. Then make install
DESTDIR=/destdir. You may need to do this as root. Ignore the failures for
the man pages and maybe tests. You should have a /destdir/bin/sh. See if it
runs. If so, copy it to /bin and try the upgrade again.
It asked me to copy some new libraries from FreeBSD 14.0 to the
/usr/lib32 and /lib directories of the FreeBSD 10.4 system. I copied all
/lib/libc.so.7: version FBSD_1.6 required by /bin/sh not found
so,I have changed the flag that does not allow me to rename it with the
# chflags noschg libc.so.7
and I've copied the libc.so.7 file that's on the directory /lib of the
FreeBSD 14 to the same directory of the FreeBSD 10.4 system and I've
rebooted. Unfortunately it hasn't been accepted. The error is the following
/lib/libc.so.7 : unsupported relocation type 37 in non-PLT relocations
What has been my mistake ? Maybe using FreeBSD 14 is wrong ?
Post by Warner Losh
# set -o pipefail
set : variable name must begin with a letter.
Post by Warner Losh
Post by Warner Losh
Post by Mario Marietto
Hello.
I'm trying to upgrade as much as I can FreeBSD 10.4 because it is the
only one version that can compile some of the old arm 32 bit code I need to
use for one of my projects. As you already know,packages don't work at
all,but ports almost work. I was trying to install xfce4 from ports,but the
http://distcache.FreeBSD.org/ports-distfiles/trousers-0.3.14.tar.gz
# freebsd-update fetch
# freebsd-update install
# portsnap fetch extract
# portsnap fetch update
# cd /usr/ports/ports-mgmt/pkg
# make
set : illegal option -o pipefail
and I can't do anything anymore. I'm stuck here. Can someone help me
to fix it ? thanks.
Save a copy of /bin/sh. Check out stable/13 (or 12 if the following
fails). Cd to src/bin/sh. Type make all. You may need -m
/path/to/src/share/mk if make complains. Create a test area, I'll call it
/destdir. Also mkdir /destdir/bin too. Then make install DESTDIR=/destdir.
You may need to do this as root. Ignore the failures for the man pages and
maybe tests. You should have a /destdir/bin/sh. See if it runs. If so copy
it to /bin and try the upgrade again.
I think 12 has pipefail. I dont think 11 does. 13 definitely has it.
The error message is from the shell.
The command "set -o pipefail" is how you'll know if it will work.... or
stands a good chance of working.
Warner
--
Mario.
--
Mario.
--
Mario.
--
Mario.
Wojciech Puchar
2024-01-31 10:29:36 UTC
Permalink
quick dirty fix is to install bash and link /bin/sh to /usr/local/bin/bash
(it may break something)
other - manually compile later /bin/sh and replace.

the problem is that newer ports needs newer /bin/sh


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Mario Marietto
2024-01-31 11:35:02 UTC
Permalink
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.
Post by Wojciech Puchar
quick dirty fix is to install bash and link /bin/sh to /usr/local/bin/bash
(it may break something)
other - manually compile later /bin/sh and replace.
the problem is that newer ports needs newer /bin/sh
--
Mario.
Mario Marietto
2024-01-31 14:31:11 UTC
Permalink
Jamie,

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

***@marietto:/usr/ports/ports-mgmt/pkg # make
set: illegal option -o pipefail....

?
Post by Jamie Landeg-Jones
Post by Mario Marietto
What I haven't understood is why you are talking about newer ports when
the
Post by Mario Marietto
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
Post by Mario Marietto
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.
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.
Jamie Landeg-Jones
2024-02-01 11:41:52 UTC
Permalink
Post by Mario Marietto
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.
I juat tested it on an old 11.1 box and it worked. The various files are the
ones listed in the command, under /usr/ports/Mk/Scripts - there are about 22
that contain mentions of pipefail, though not all will be relevent to your
particilar cases.

Yes, you can manually just delete the "set +o pipefail" and "set -o pipefail"
commands as you find them, not forgetting the caveat mentioned in the
previous mail that you may miss some errors that may occur during building.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Mario Marietto
2024-02-01 12:07:49 UTC
Permalink
Hello Jamie,

thanks. I don't know if you read my last email,but I have cut the problem
at the root,by using the old version of the Mk Scripts,to be sure that it
didn't have the pipefail parameter. I did like this because your script
probably didn't remove some of those references and I got the same error.
Unfortunately,when I tried to upgrade the port "pkg" to 1.20.9 I got a
compilation error. I'm not able to upgrade the whole system until I'm not
able to upgrade it. The error that I need to fix is :

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;
}
============
Post by Mario Marietto
Post by Mario Marietto
Can you tell me where should be stored the references to pipefail ?
Maybe I
Post by Mario Marietto
will try to remove them manually. Maybe your command does not work out of
the box.
I juat tested it on an old 11.1 box and it worked. The various files are the
ones listed in the command, under /usr/ports/Mk/Scripts - there are about 22
that contain mentions of pipefail, though not all will be relevent to your
particilar cases.
Yes, you can manually just delete the "set +o pipefail" and "set -o pipefail"
commands as you find them, not forgetting the caveat mentioned in the
previous mail that you may miss some errors that may occur during building.
--
Mario.
Jamie Landeg-Jones
2024-01-31 12:16:35 UTC
Permalink
Post by Mario Marietto
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


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Mario Marietto
2024-01-31 14:45:29 UTC
Permalink
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.
Post by Mario Marietto
Jamie,
set: illegal option -o pipefail....
?
Post by Jamie Landeg-Jones
Post by Mario Marietto
What I haven't understood is why you are talking about newer ports when
the
Post by Mario Marietto
only thing I do is to update ports using the same FreeBSD version,in
this
Post by Mario Marietto
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
Post by Mario Marietto
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.
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.
Jamie Landeg-Jones
2024-02-01 12:13:58 UTC
Permalink
Post by Mario Marietto
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
# portsnap fetch extract
# portsnap fetch update
At this point I have renamed the directory Scripts-old to Scripts and I
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'
============
#include <stdlib.h>
int main(void) {
return 0;
}
============
Ah ok, so you've got around the pipefail issue. This is a different issue.

stack-protection got added to the clang compiler long after the freebsd version
you are using.

I think you can disable this by adding SSP_CFLAGS="" to your make command line,

e.g.

make SSP_CFLAGS=""

But then, you're likely to get build errors due to the old version of "make" on
that system, so unless you know how to remove the problem in the makefile, you'll
need a more recent version of "make" too...





--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Mario Marietto
2024-01-31 18:52:38 UTC
Permalink
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;
}
============
Post by Mario Marietto
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.
Post by Mario Marietto
Jamie,
set: illegal option -o pipefail....
?
Post by Mario Marietto
Post by Mario Marietto
What I haven't understood is why you are talking about newer ports
when the
Post by Mario Marietto
only thing I do is to update ports using the same FreeBSD version,in
this
Post by Mario Marietto
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
Post by Mario Marietto
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.
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.
Loading...