Building Haiku OS 32Bit exceeds inodes limit

Hi there.

For the last couple of days, I am trying to build locally the full OS, 32Bit, inside a VMware VM (Windows 11 host), following the offical documentation. Installed latests nightly (32Bit), Python 3.10, Genio, and others. ./configure (from the terminal), then build (pressed the button from Genio)… And after like 30 mins… “No space left on device”.

Basically, I’ve got no more free inodes (while there is plenty of physical space available). Tried to format with blocksize 1024 (instead of 2048), the same. Tried to attach a different disk, to use it for the build, BFS, same. Tried with EXT4. I gues because of a bug (or something I’ve missed), after reboot, it becomes readonly (despite mounting it explicitly in R/W mode). Same with FAT32, and same with NTFS formatted disk.

So how am I supposed to build the full OS locally? Is there a specific document/page I’ve missed, which describes how to do it the right way? Am I not supposed to build it locally? I guess installing the OS on bare metal (as opposed to a VM), wouldn’t make much difference, as the filesystem would be the same, with the same inodes limitations. Can someone point me please in the right direction?

Thank you.

Where did you find this documentation? I don’t think we have any docs about using genio… and i doubt that is tested either.

Maybe try with a normal build first?

How did you arrive at the conclusion that the problem is with inodes?

You’re correct, the documentation doesn’t mention Genio at all (rather Pe, Koder, microbe and Paladin), but the underlying command that it runs, should be the same, as the one I would run manually from a terminal, shouldn’t it?

Ok, I will try to run the build manually, and come back with an update in that regard.

The free space available (reported by df in terminal, as well as DiskUsage from the UI) is over 90GB on the disk, while during build (OK, from Genio), I’ve got this error:

Error while writing to file `/myfs/system/packages/noto_sans_cjk_jp-2.004-1-any.hpkg': No space left on device
Error: Command failed: No space left on device
Error: Command was:
  cp -f :generated/download/noto_sans_cjk_jp-2.004-1-any.hpkg /myfs/system/packages
export imagePath="generated/haiku.image"
export isImage="1"
export isVMwareImage=""
build/scripts/build_haiku_image /BuildOS/src/haiku/generated/haiku.image-init-vars /BuildOS/src/haiku/generated/haiku.image-make-dirs /BuildOS/src/haiku/generated/haiku.image-copy-files /BuildOS/src/haiku/generated/haiku.image-extract-files
...failed BuildHaikuImage1 generated/haiku.image ...
...removing generated/haiku.image
BUILD FAILURE:
...failed updating 1 target(s)...
...updated 17714 target(s)...

This lead me to believe, it’s about inode exhaustion. If it’s not, and the error hints to a different fault, than my bad I guess. I know only what I see, it’s the first time I am trying this.

Are you sure that path exists and is the correct one ? With necessary permissions, of course.

Haiku BFS do not use fixed inode table like EXT filesystem, inodes are allocated dynamically. So there are no inode limit.

No space left on device error may be caused by fragmentation or inaccurate free space indication.

What is a size of your BFS partition?

1 Like

I don’t know where you’ve gotten this idea from, as others have pointed out it’s just not the case here.

This path is on the generated image. So, it means the image size is too small.

Have you built with the correct profile specified? If not, that may be the problem; you’re trying to use a configuration with rather large packages, but not enough space on the generated image. Try using the nightly profile, e.g. @nightly-raw (or -anyboot, or -vmware, etc.). Thus the full command line will be something like jam -q -jN @nightly-raw.

1 Like

The default profile (if you don’t specify any profile on the command line) used to work fine, but it has not been maintained for years. We should either fix it (make it do the same as nightly-raw I guess?), or make sure the build fails quickly with a clear message if you don’t specify a profile.

Thank you for clarifying this. All the VMs I use get a 100GB disk, without pre-allocating the space (meaning, they are dynamically growing to the max. 100GB, as the gues OS needs it.

Thank you for the explanation. It makes sense, and my original assesment was quite wrong, it seems. However, this is still not working.

I have rigorously followed every steps, multiple times, both from the official guides, and from the ReadMe.Compiling.md from the github repo. In every case, the build failed, but now with a different error (different from the one I’ve got using Genio). So what I did exactly…

cd /BuildMe
mkdir src
cd src
git clone https://review.haiku-os.org/haiku.git
git clone https://review.haiku-os.org/buildtools.git
cd haiku
mkdir generated.x86gcc2
cd generated.x86gcc2
../configure --target-arch x86_gcc2 --target-arch x86
jam -j8 -q @nightly-anyboot

I’ve tried to build the anyboot.iso, as I need it to be able to install on my netbook. After a while, errored out:

C++ objects/haiku/x86_gcc2/release/kits/app/TypeConstants.o 
C++ objects/haiku/x86_gcc2/release/kits/app/Key.o 
C++ objects/haiku/x86_gcc2/release/kits/app/KeyStore.o 
ResComp1 objects/haiku/x86_gcc2/common/kits/Icons.rsrc 
ResComp1 objects/haiku/x86_gcc2/common/kits/LanguageFlags.rsrc 
C++ objects/haiku/x86_gcc2/release/kits/shared/AboutMenuItem.o 
/BuildMe/src/haiku/src/kits/app/TokenSpace.cpp: In method `int32 BPrivate::BTokenSpace::NewToken(short int, void *)':
/BuildMe/src/haiku/src/kits/app/TokenSpace.cpp:58: Internal compiler error.
/BuildMe/src/haiku/src/kits/app/TokenSpace.cpp:58: Please submit info to Oliver Tappe <gcc@hirschkaefer.de>.
C++ objects/haiku/x86_gcc2/release/kits/shared/ArgumentVector.o 

gcc -c "../src/kits/app/TokenSpace.cpp" -O2 -Wall -Wno-multichar -Wpointer-arith -Wsign-compare -Wno-ctor-dtor-privacy -Woverloaded-virtual -Werror -Wno-unknown-pragmas -march=pentium -nostdinc -DARCH_x86 -D__HAIKU_PRIMARY_PACKAGING_ARCH=\"x86_gcc2\" -DHAIKU_DISTRO_COMPATIBILITY_DEFAULT -DHAIKU_TARGET_PLATFORM_HAIKU -DHAIKU_REGULAR_BUILD -I../build/user_config_headers -I../build/config_headers -I../src/kits/app -Iobjects/common/kits/app -Iobjects/haiku_host/x86/common/kits/app -Iobjects/haiku/x86_gcc2/common/kits/app -I- -I../headers/libs/icon -I../headers/private/shared -I../headers/private/app -I../headers/private/interface -I../headers/private/kernel -I../headers/private/libroot -I../headers/private/locale -I../headers/private/notification -I../headers/private/. -I../headers/private/system -I../headers/private/system/arch/x86 -I../headers/cpp -I../headers/glibc -I../headers/posix -I../headers/build/gcc-2.95.3 -I../headers -I../headers/os -I../headers/os/add-ons -I../headers/os/add-ons/file_system -I../headers/os/add-ons/graphics -I../headers/os/add-ons/input_server -I../headers/os/add-ons/registrar -I../headers/os/add-ons/screen_saver -I../headers/os/add-ons/tracker -I../headers/os/app -I../headers/os/device -I../headers/os/drivers -I../headers/os/game -I../headers/os/interface -I../headers/os/kernel -I../headers/os/locale -I../headers/os/media -I../headers/os/mail -I../headers/os/midi -I../headers/os/midi2 -I../headers/os/net -I../headers/os/storage -I../headers/os/support -I../headers/os/translation -I../headers/private/. -o "objects/haiku/x86_gcc2/release/kits/app/TokenSpace.o"

...failed C++ objects/haiku/x86_gcc2/release/kits/app/TokenSpace.o ...
Archive objects/haiku/x86_gcc2/release/kits/shared/libshared.a 
ar: objects/haiku/x86_gcc2/release/kits/shared/AttributeUtilities.o: No such file or directory

rm -f objects/haiku/x86_gcc2/release/kits/shared/libshared.a
ar cru objects/haiku/x86_gcc2/release/kits/shared/libshared.a objects/haiku/x86_gcc2/release/kits/shared/AboutMenuItem.o objects/haiku/x86_gcc2/release/kits/shared/ArgumentVector.o objects/haiku/x86_gcc2/release/kits/shared/AttributeUtilities.o objects/haiku/x86_gcc2/release/kits/shared/BarberPole.o objects/haiku/x86_gcc2/release/kits/shared/BitmapButton.o objects/haiku/x86_gcc2/release/kits/shared/CalendarView.o objects/haiku/x86_gcc2/release/kits/shared/ColorItem.o objects/haiku/x86_gcc2/release/kits/shared/ColorListView.o objects/haiku/x86_gcc2/release/kits/shared/ColorPreview.o objects/haiku/x86_gcc2/release/kits/shared/ColorQuantizer.o objects/haiku/x86_gcc2/release/kits/shared/CommandPipe.o objects/haiku/x86_gcc2/release/kits/shared/DateTimeEdit.o objects/haiku/x86_gcc2/release/kits/shared/DragTrackingFilter.o objects/haiku/x86_gcc2/release/kits/shared/DriverSettingsMessageAdapter.o objects/haiku/x86_gcc2/release/kits/shared/HSL.o objects/haiku/x86_gcc2/release/kits/shared/HashString.o objects/haiku/x86_gcc2/release/kits/shared/IconButton.o objects/haiku/x86_gcc2/release/kits/shared/IconView.o objects/haiku/x86_gcc2/release/kits/shared/JsonWriter.o objects/haiku/x86_gcc2/release/kits/shared/JsonEventListener.o objects/haiku/x86_gcc2/release/kits/shared/JsonMessageWriter.o objects/haiku/x86_gcc2/release/kits/shared/JsonTextWriter.o objects/haiku/x86_gcc2/release/kits/shared/JsonEvent.o objects/haiku/x86_gcc2/release/kits/shared/Json.o objects/haiku/x86_gcc2/release/kits/shared/Keymap.o objects/haiku/x86_gcc2/release/kits/shared/LongAndDragTrackingFilter.o objects/haiku/x86_gcc2/release/kits/shared/md5.o objects/haiku/x86_gcc2/release/kits/shared/MemoryRingIO.o objects/haiku/x86_gcc2/release/kits/shared/MessageBuilder.o objects/haiku/x86_gcc2/release/kits/shared/NaturalCompare.o objects/haiku/x86_gcc2/release/kits/shared/PromptWindow.o objects/haiku/x86_gcc2/release/kits/shared/QueryFile.o objects/haiku/x86_gcc2/release/kits/shared/RegExp.o objects/haiku/x86_gcc2/release/kits/shared/RWLocker.o objects/haiku/x86_gcc2/release/kits/shared/RWLockManager.o objects/haiku/x86_gcc2/release/kits/shared/SettingsHandler.o objects/haiku/x86_gcc2/release/kits/shared/SettingsMessage.o objects/haiku/x86_gcc2/release/kits/shared/ShakeTrackingFilter.o objects/haiku/x86_gcc2/release/kits/shared/StatusView.o objects/haiku/x86_gcc2/release/kits/shared/StringForRate.o objects/haiku/x86_gcc2/release/kits/shared/StringForSize.o objects/haiku/x86_gcc2/release/kits/shared/StripeView.o objects/haiku/x86_gcc2/release/kits/shared/TextTable.o objects/haiku/x86_gcc2/release/kits/shared/Thread.o objects/haiku/x86_gcc2/release/kits/shared/ToolBar.o objects/haiku/x86_gcc2/release/kits/shared/Variant.o objects/haiku/x86_gcc2/release/kits/shared/WeakReferenceable.o

...failed Archive objects/haiku/x86_gcc2/release/kits/shared/libshared.a ...

BUILD FAILURE:
...failed updating 2 target(s)...
...skipped 10 target(s)...
...updated 2375 target(s)...

Here I would like to mention, that I am not new to compilation from source, just new to Haiku compilation, and from within Haiku itself, and not yet familiar with what and how exactly. And another thing… Some of the packages from HaikuDepot doesn’t install (like for example mtools, or zstd_x86_bin) either, like throwing this kind of error:

Which I am also not familiar with, and its solution.

So call me beginner, but I am sure I did everything correctly, yet I am really struggling making this work.

I am not sure we are still talking about Genio here, but if so, do you mean that the build functionality of Genio wasn’t updated in years? I am asking, because I see the project itself is still in active development.

No, pulkomandy was talking about build profiles.
For example you can build haiku like “jam -j4 @nightly-anyboot” Which would build the nightly-anyboot profile. You can however also call it just like “jam -j4”, without a build profile specified. The problem pulkomandy mentioned is that the default, i.e not specifying any, build profile has been broken for quite a while…

1 Like

Now it makes sense. Thank you. Well, regarding my problem using the build function/button from within Genio, could be related to this as well, but I’ve moved on to manually execute jam. So yeah…

This actually looks like a problem that may have been introduced recently. However, I don’t know why it hasn’t happened on the CI…

With 2a70c459375703d9511ea3b1e52b35fbe4b242ad. @andrew2221 : checkout its parent commit and you should be good to go.

It happens on the CI. It’s a problem for 32 bits only.

1 Like

Ah, I’d just looked at the “continuous” run, which says success but also failed. Weird.

I did as you suggested. I am closer, but not yet there.

haiku.hpkg: mimeset'ing package contents ...
haiku.hpkg: Creating the package ...
AddTargetVariableToScript1 <unique!target>_target_462 
HaikuRepository1 objects/haiku/x86_gcc2/packaging/repositories/Haiku 
AppendToContainerCopyFilesScriptSingleFile <HaikuImage>haiku.image-copy-files-dummy-system/packages-haiku.hpkg 
AppendToContainerCopyFilesScriptSingleFile <HaikuImage>haiku.image-copy-files-dummy-system/packages-haiku_datatranslators.hpkg 
AddTargetVariableToScript1 <unique!target>_target_562 
AppendToContainerCopyFilesScriptSingleFile <HaikuImage>haiku.image-copy-files-dummy-system/packages-haiku_x86.hpkg 
AppendToContainerCopyFilesScriptSingleFile <HaikuImage>haiku.image-copy-files-dummy-system/packages-webpositive.hpkg 
AppendToContainerCopyFilesScript <HaikuImage>haiku.image-copy-files-dummy-system/packages 
AddSymlinkToContainerCopyFilesScript <HaikuImage>home/Desktop/Home 
AppendToContainerCopyFilesScript <HaikuImage>haiku.image-copy-files-dummy-home/config/settings/boot 
AppendToContainerCopyFilesScript <HaikuImage>haiku.image-copy-files-dummy-home/config/settings 
AppendToContainerCopyFilesScript <HaikuImage>haiku.image-copy-files-dummy-system/settings/etc/profile.d 
AppendToContainerCopyFilesScript <HaikuImage>haiku.image-copy-files-dummy-home/config/settings/kernel/drivers 
AppendToContainerCopyFilesScript <HaikuImage>haiku.image-copy-files-dummy-system/settings/network 
AppendToContainerCopyFilesScriptSingleFile <HaikuImage>haiku.image-copy-files-dummy-system/settings/package-repositories-<repository-config>HaikuPorts-config 
AppendToContainerCopyFilesScriptSingleFile <HaikuImage>haiku.image-copy-files-dummy-system/settings/package-repositories-<repository-config>Haiku-config 
haiku_datatranslators (r1~beta5_hrev58987-1)
        checksum: bc1a59866353d92fb76ba37b2a240bea956f436ca08803444f87238474cae5f1
haiku_devel (r1~beta5_hrev58987-1)
        checksum: 230a7555e1d7ce87cc98698666cda0ca531092a412c76dbc359def7619166816
haiku_extras (r1~beta5_hrev58987-1)
        checksum: 90359973707ce07b3fff9ef96933bc22150a0082a32c59cdc3e05a9b0bff8ff6
haiku_loader (r1~beta5_hrev58987-1)
        checksum: 2b9c1bcb0082de7f44364cf18dd2350ac90fc19692ff21d4e45238983afd24b9
haiku_x86_devel (r1~beta5_hrev58987-1)
        checksum: ad84b1d021ecca49f0ed8caa690613290a0da4cff01a83ba27eb7a2c08084d16
haiku_x86 (r1~beta5_hrev58987-1)
        checksum: d4e51634c39b38b8f968763795c2df79dd0d93d13105a2f345ff054bd04405d9
haiku (r1~beta5_hrev58987-1)
        checksum: e69e3128dde3c70983ae203b14e9dd7aad09f395e74620331b9dcbd1018123ee
makefile_engine (r1~beta5_hrev58987-1)
        checksum: e07fe2d987b6649fbebb56a40c8e057610dadfc2a619b2b43017215107070d73
netfs (r1~beta5_hrev58987-1)
        checksum: c93e74561a879edff716dfc07b792714f74a94ead3301e3852bf09db51fb56f9
userland_fs (r1~beta5_hrev58987-1)
        checksum: efd94d20a1579019e845e161f8090843ade7875a57f221bb03df20c7ad7a3c04
webpositive_x86 (r1~beta5_hrev58987-1)
        checksum: 53589b65ee5c6fd2ca16df37cfa74dc3ceb4d1c55f03fa2dbf35cdc6ab406af9
----- Package Repository Info -----
package count                    11
-----------------------------------
header size:                     72
repository header size:         631
package attributes size:       5753
total size:                    2817
-----------------------------------
AddTargetVariableToScript1 <unique!target>_target_662 
AppendToContainerCopyFilesScriptSingleFile <HaikuImage>haiku.image-copy-files-dummy-system/cache/package-repositories-<repository-cache>repo 
AddVariableToScript1 haiku.image-init-vars 
AppendToContainerCopyFilesScript <HaikuImage>haiku.image-copy-files-dummy-system/cache/package-repositories 
AppendToContainerCopyFilesScript <HaikuImage>haiku.image-copy-files-dummy-home/config/settings/Mail/ProviderInfo 
AppendToContainerCopyFilesScript <HaikuImage>haiku.image-copy-files-dummy-home/config/settings/Tracker/Tracker New Templates 
AppendToContainerCopyFilesScriptSingleFile <HaikuImage>haiku.image-copy-files-dummy-_packages_-haiku_devel.hpkg 
AppendToContainerCopyFilesScriptSingleFile <HaikuImage>haiku.image-copy-files-dummy-_packages_-haiku_x86_devel.hpkg 
AppendToContainerCopyFilesScriptSingleFile <HaikuImage>haiku.image-copy-files-dummy-_packages_-makefile_engine.hpkg 
AppendToContainerCopyFilesScript <HaikuImage>haiku.image-copy-files-dummy-_packages_ 
warning: using independent target <HaikuImage>/BuildMe/src/haiku/generated.x86gcc2/./haiku.image-init-vars
warning: using independent target <HaikuImage>/BuildMe/src/haiku/generated.x86gcc2/./haiku.image-make-dirs
warning: using independent target <HaikuImage>/BuildMe/src/haiku/generated.x86gcc2/./haiku.image-copy-files
warning: using independent target <HaikuImage>/BuildMe/src/haiku/generated.x86gcc2/./haiku.image-extract-files
BuildHaikuImage1 haiku.image 
mkfifo: cannot create fifo '/tmp/build_haiku_image-58920-fifo-to-shell': Read-only file system
mkfifo: cannot create fifo '/tmp/build_haiku_image-58920-fifo-from-shell': Read-only file system

export imagePath="haiku.image"
export isImage="1"
export isVMwareImage=""
../build/scripts/build_haiku_image /BuildMe/src/haiku/generated.x86gcc2/./haiku.image-init-vars /BuildMe/src/haiku/generated.x86gcc2/./haiku.image-make-dirs /BuildMe/src/haiku/generated.x86gcc2/./haiku.image-copy-files /BuildMe/src/haiku/generated.x86gcc2/./haiku.image-extract-files

...failed BuildHaikuImage1 haiku.image ...

BUILD FAILURE:
...failed updating 1 target(s)...
...skipped 1 target(s)...
...updated 1166 target(s)...

Well, I will keep trying to checkout various commits, until I find one that works.

The idea was (is…?!) to have a working baseline, for the changes I am planning to make in the source code, and be able to tell if I did something wrong (e.g. if it won’t compile).

For anyone, who embarks on the same journey I did, you just might need to do the same.

Thanks everyone for the help. Really appreciate it.

Is your /tmp read-only? Or maybe it doesn’t allow named pipes? You can try to put them somewhere else, edit the fifoBasePath assignment in build/scripts/build_haiku_image.

The fix for the “internal compiler error” has just been pushed.

1 Like

I have not changed one bit, not played/messed with /tmp, and it is not read-only:

lrwxrwxrwx 1 user root   22 Aug  5 19:10 tmp -> /boot/system/cache/tmp

But once I’ve changed the location of fifoBasePath, it worked! I have successfully compiled 32Bit Haiku ISO inside Haiku, using this commit:

commit 00c891c0c8e187feba3ca953efafd897de56d826 (HEAD -> master, tag: hrev58987)

And then, cloned again everything, from scratch, with the latest commit from master:

commit ecc2dea520d00c700fbb26f98214318cfaa390f1 (grafted, HEAD -> master, tag: hrev58997, origin/master, origin/HEAD)

Once again, the fifo stuff gave error, the same way, and once I’ve changed the location:

Extracting download/openssh-9.8p1-2-x86_gcc2.hpkg ...
Extracting download/bash-5.2.032-1-x86_gcc2.hpkg ...
Extracting download/wget_x86-1.24.5-2-x86_gcc2.hpkg ...
Extracting download/less-643-1-x86_gcc2.hpkg ...
Extracting download/git_x86-2.45.2-7-x86_gcc2.hpkg ...
Extracting download/fontconfig_x86-2.13.96-2-x86_gcc2.hpkg ...
Extracting download/fontconfig-2.13.92-1-x86_gcc2.hpkg ...
Unmounting ...
BuildAnybootImageEfi1 haiku-nightly-anyboot.iso 
...updated 1162 target(s)...
/BuildMe/src2/haiku/generated.x86gcc2> ls -alh
total 659M
drwxr-xr-x 1 user root 2.0K Aug  6 18:14 .
drwxr-xr-x 1 user root 2.0K Aug  6 18:02 ..
drwxr-xr-x 1 user root 2.0K Aug  6 18:03 build
drwxr-xr-x 1 user root 4.0K Aug  6 18:09 build_packages
drwxr-xr-x 1 user root  16K Aug  6 18:14 download
-rw------- 1 user root 659M Aug  6 18:14 haiku-nightly-anyboot.iso
-rw-r--r-- 1 user root  228 Aug  6 18:02 Jamfile
drwxr-xr-x 1 user root 2.0K Aug  6 18:06 objects
drwxr-xr-x 1 user root 2.0K Aug  6 18:14 tmp

It’s a great success! Thank you very much!

Small update. I figured out the most likely reason I’ve had this:

The folder I was building/compiling, is a folder on a separate, mounted disk. And it didn’t have a /tmp folder created on it. Once I used the main drive, the issue was gone.

Thought I would leave this here for anybody else bumping into the same issue.