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 Mariettonothing 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 MariettoHello 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 Loshfails). 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 LoshPost by Warner LoshPost by Mario MariettoHello.
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.