Solved make buildworld failed on aarch64

hpc

New Member

Reaction score: 1
Messages: 18

Hello, I've bought a new raspberry 4 / 8Gb of memory. I've installed FreeBSD 13.0-BETA3 without any problem.

I've tried to upgrade to FreeBSD BETA4 from sources using the standard way
* I've replaced svn by the new git :
Code:
git clone https://git.freebsd.org/src.git
git checkout stable/13

* For information, I use an nfs server for /usr/src/ & /usr/obj to avoid using the sd card

Build & install kernel is OK, but buildworld failed :
Code:
mkdir -p "/usr/obj/usr/src/arm64.aarch64/tmp/legacy//usr/include/rpc"
mkdir -p "/usr/obj/usr/src/arm64.aarch64/tmp/legacy//usr/include/crypto/chacha20"
cd /usr/src/tools/build;  make DIRPRFX=tools/build/ DESTDIR=/usr/obj/usr/src/arm64.aarch64/tmp/legacy host-symlinks
Linking host tools into /usr/obj/usr/src/arm64.aarch64/tmp/legacy/bin
cp: chflags: /usr/obj/usr/src/arm64.aarch64/tmp/legacy/bin/basename: Operation not supported
*** Error code 1

Stop.
make[2]: stopped in /usr/src/tools/build
*** Error code 1

Any idea of what's happen ?

Best
 

vigole

Daemon

Reaction score: 1,324
Messages: 1,192

Do you have customised src.conf and/or make.conf in your system? If so, delete them.

[EDIT]: I didn't read the question carefully. My answer is nonsense. Ignore it. Thanks.
 
OP
H

hpc

New Member

Reaction score: 1
Messages: 18

Do you have customised src.conf and/or make.conf in your system? If so, delete them.
No, I've no special customization. It's a fresh install with only rc.conf customization for ifconfig & needed services :
Code:
hostname="MyHostName.XXXX.XXXX"
ifconfig_DEFAULT="DHCP"
ifconfig_genet0="inet 192.168.1.7 netmask 255.255.255.0"
ifconfig_genet0_ipv6="inet6 accept_rtadv"
defaultrouter="192.168.1.254"
sshd_enable="YES"

keymap="fr.acc.kbd"
local_unbound_enable="YES"
ntpd_enable="YES"
ntpd_sync_on_start="YES"
powerd_enable="YES"
nfs_client_enable="YES"
#
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,559
Messages: 37,878

I've tried to upgrade to FreeBSD BETA4 from sources using the standard way
* I've replaced svn by the new git :
Code:
git clone https://git.freebsd.org/src.git
git checkout stable/13
You've switched to 13.0-STABLE. You need to track the releng/13.0 branch, which is now 13.0-BETA4 and will eventually become 13.0-RELEASE (there are a few RC releases in between).
 

Emrion

Aspiring Daemon

Reaction score: 208
Messages: 670

Isn't simply the NFS protocol or its implementation that doesn't allow chflag?
 
OP
H

hpc

New Member

Reaction score: 1
Messages: 18

You've switched to 13.0-STABLE. You need to track the releng/13.0 branch, which is now 13.0-BETA4 and will eventually become 13.0-RELEASE (there are a few RC releases in between).

Ha! yes, thanks for the typo. In the meantime, I've tried with releng/13.0. I get the very same error.

Isn't simply the NFS protocol or its implementation that doesn't allow chflag?

Yes, it seem that you've the right idea, I've found old messages saying that nfs does not support chflags... 😢 It's a surprise that buildworld use chflags,

I will retry with /usr/src/ & /usr/obj on the SDCard. Maybe only /usr/obj is sufficient ? I'll try

Thanks for your help
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,559
Messages: 37,878

Maybe only /usr/obj is sufficient ?
Only /usr/obj would be sufficient. Nothing is written to /usr/src/, you can even mount it read-only. The "intermediates", like object files and resulting executables, libraries, etc. are written to /usr/obj.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,559
Messages: 37,878

Oh, note that you might run out of memory during buildworld, at least that happened, twice, on my Pi3. Maybe with the Pi4 (which has more memory) this might not happen. In any case, restart the buildworld with the -DNO_CLEAN option if it happens or it's going to start it all over from the beginning again.

Be prepared for a long, long build time though. It took me two days to get buildworld done on a Pi3. So better start this in a screen(1) or tmux(1) session if you do this remotely.
 
OP
H

hpc

New Member

Reaction score: 1
Messages: 18

Oh, note that you might run out of memory during buildworld, at least that happened, twice, on my Pi3. Maybe with the Pi4 (which has more memory) this might not happen. In any case, restart the buildworld with the -DNO_CLEAN option if it happens or it's going to start it all over from the beginning again.
Yes, I had a similar experience on pi3. My assumption is that LLVM based on C++ is memory consuming. I never succeed on PI3.
Be prepared for a long, long build time though. It took me two days to get buildworld done on a Pi3. So better start this in a screen(1) or tmux(1) session if you do this remotely.
It succeeds, it took 6.7 hours for buildworld, 0.5 hour for buildkernel. Not bad for a so small machine using sdcard. I got a fresh "FreeBSD 13.0-BETA4 #0 releng/13.0-n244594-310ae6a0df3"

For the record wifi does not work as expected, the gigabit ethernet is OK using ipv4 & ipv6.
 
Top