I try to build an aarch64 version for my rpi on an odroidC4 Ubuntu 22.04 mini. Building glibc fails with a this result.Tried the common workflow without any changes
- INSTALL /usr/local/share/man/man8/tzselect.8
- INSTALL /usr/local/share/man/man8/zdump.8
- INSTALL /usr/local/share/man/man8/zic.8
make[1]: Leaving directory '/usr/src/man-pages-5.13'
cd /usr/src/man-pages-5.13 && make install
make[1]: Entering directory '/usr/src/man-pages-5.13'
make[1]: Leaving directory '/usr/src/man-pages-5.13'
Updating linker cache...
Install done; saving file list to /usr/src/log/man-pages-5.13 ...
Apr 26 11:15:10: Building glibc glibc-2.37.tar.xz checksum OK
+ cd /usr/src/lfs
+ make -f glibc LFS_BASEDIR=/usr/src install
====================================== Installing glibc-2.37 ...
Install started; saving file list to /usr/src/lsalr ...
cd /usr/src/glibc-2.37 && patch -Np1 < /usr/src/src/patches/glibc-localedef-no-archive.patch
patching file localedata/Makefile
Hunk #1 succeeded at 466 with fuzz 1 (offset 243 lines).
cd /usr/src/glibc-build && \
CFLAGS="-O2 -pipe -Wall -fexceptions -fPIC -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -Wno-error=maybe-uninitialized -fno-asynchronous-unwind-tables" \
/usr/src/glibc-2.37/configure --build=aarch64-pc-linux-gnu --prefix=/usr --libexecdir=/usr/lib/glibc --enable-stack-protector=strong --disable-profile --enable-kernel=4.14.0 --enable-add-ons --without-selinux --enable-experimental-malloc --enable-bind-now --disable-crypt --enable-memory-tagging
ls: cannot access '.': Function not implemented
configure: error: working directory cannot be determined
make: *** [glibc:114: /usr/src/log/glibc-2.37] Error 2
Entering the build chroot shell (sudo ./make.sh shell) shows indeed a strange env, in my opinion:
odroid@odroid:/mnt/ipfire/ipfire-2.x$ sudo ./make.sh shell
Checking for necessary space on disk [ DONE ]
Set cache size limit to 2.0 GB
Entering to a shell inside LFS chroot, go out with exit
ipfire build chroot (aarch64) root:/$ ls -la
ls: cannot access 'home': Function not implemented
ls: cannot access 'var': Function not implemented
ls: cannot access 'boot': Function not implemented
ls: cannot access 'root': Function not implemented
ls: cannot access 'bin': Function not implemented
ls: cannot access 'tmp': Function not implemented
ls: cannot access 'tools_aarch64': Function not implemented
ls: cannot access 'lib': Function not implemented
ls: cannot access '..': Function not implemented
ls: cannot access 'run': Function not implemented
ls: cannot access 'media': Function not implemented
ls: cannot access 'sys': Function not implemented
ls: cannot access 'dev': Function not implemented
ls: cannot access 'proc': Function not implemented
ls: cannot access 'lib64': Function not implemented
ls: cannot access 'etc': Function not implemented
ls: cannot access 'usr': Function not implemented
ls: cannot access 'opt': Function not implemented
ls: cannot access 'sbin': Function not implemented
ls: cannot access 'srv': Function not implemented
ls: cannot access '.': Function not implemented
ls: cannot access 'mnt': Function not implemented
total 0
d????????? ? ? ? ? ? .
d????????? ? ? ? ? ? ..
d????????? ? ? ? ? ? bin
d????????? ? ? ? ? ? boot
d????????? ? ? ? ? ? dev
d????????? ? ? ? ? ? etc
d????????? ? ? ? ? ? home
d????????? ? ? ? ? ? lib
l????????? ? ? ? ? ? lib64
d????????? ? ? ? ? ? media
d????????? ? ? ? ? ? mnt
d????????? ? ? ? ? ? opt
d????????? ? ? ? ? ? proc
d????????? ? ? ? ? ? root
d????????? ? ? ? ? ? run
d????????? ? ? ? ? ? sbin
d????????? ? ? ? ? ? srv
d????????? ? ? ? ? ? sys
d????????? ? ? ? ? ? tmp
d????????? ? ? ? ? ? tools_aarch64
d????????? ? ? ? ? ? usr
d????????? ? ? ? ? ? var
ipfire build chroot (aarch64) root:/$ ls -la bin
ls: cannot access 'bin': Function not implemented
ipfire build chroot (aarch64) root:/$
Is there a hint where the trouble comes from? Is there something special depending the chroot env?
Looking in the wiki it mentions about needing to make a symlink with ubuntu otherwise you will have problems compiling glibc. Did you follow those instructions?
Thank you, but I already tried this.
It doesn’t work with or without modifing the symlink.
In my opinion the wiki also say, that the mod is not needed with 22.04, isn’t it?
I aslo tested a build on my i5 for x86 target with Ubuntu 22.04 and without mod and this build was fine.
On the odriod I also tested running the build on sdcard and usb stick, both tests with the same result.
You are correct. I read through it very quickly yesterday before I sent my response. Sorry.
The error is indicating that it couldn’t find the function ls which comes from coreutils.
In the buildbase part of IPFIre, coreutils is built after glibc. Therefore the ls command is made available from the pre-compiled toolchain.
Did you run the ./make gettoolchain command to download the pre-compiled toolchain before running the ./make clean and ./make build commands?
The toolchain, if downloaded, will be in ipfire-2.x/cache/toolchains/
with a file similar to ipfire-2.27-toolchain-20230210-x86_64.tar.zst
but with x86_64 replaced with aarch64
It is saying that it can’t access anything in the current directory because the function is not implemented and the only function I can think of that it means is ls.
If when you are in the /ipfire-2.x/ directory what happens if you do ls -la and sudo ls -la
Can you see the directories and their permissions/ownerships or do you see the same thing as when you were in the shell.
but from inside the shell don’t (sse above)
I also cleaned up all directories and restarted from the biginning 2 or 3 times, but always with the exact same result.
I think your best bet is going to be to join the development mailing list, see the wiki under Development and ask the question there. There are people better placed to be able to figure out what is going on.
Is seems not at the moment. looking to the wiki shows, that 4.9 seems the most common version for odroid boards. There is also a 5.4 kernel source on github but not with a C4 config.
I’ll ask the community there for a possibility.