Issues with haiku.hpkg built from -current

Hello Everyone,
I already posted this to the haiku-devel mailing list and got no responses. I am trying to track down an issue in the virtual memory code that is giving errors for an application I am trying to port to Haiku, but I can not because multiple installs of the same hrev hangs the system. The VM code can return the same value (B_BAD_VALUE) for several different errors, making it very difficult to isolate the particular error that is occurring. This is necessitating modifying the VM code and inserting unique error codes indicative of where the error occurred. To do this I am building from a very recent hrev (about 48 hours old) and building haiku.hpkg. My system is Virtual Box on OS X. However, I am running into issues when I try to install the same hrev a second time, or after anytime I accept upating packages. The system hangs at boot, with two rows of icons. The hang occurs when trying to find and launch launch_daemon is returning a -1 error. I am posting the specific steps that cause this problem every time for me, in the hopes that others can reproduce it or not do so.

  1. build fresh VM

In Terminal:

  1. cd /boot/home
  2. git clone git://
  3. cd haiku
  4. ./configure
  5. jam haiku.hpkg
  6. pkgman install /boot/home/haiku/generated/objects/haiku/x86_gcc2/packaging/packages/haiku.hpkg
  7. choose solution 1 and (y)
  8. shutdown -r
  9. cd /boot/home/haiku (optional, actually)
  10. pkgman install /boot/home/haiku/generated/objects/haiku/x86_gcc2/packaging/packages/haiku.hpkg

In Tracker (the GUI):

  1. Accept updating packages (this window did not appear the first time you ran pkgman)
  2. Restart system (or shutdown -r in Terminal)

System should reboot with two rows of icons instead of one, illuminate the top row, and hang when the top row is illuminated.

To recover system functionality, reinstall from the CD image.

Repeat steps 7) through 11) repeatedly without accepting updating packages (do not dismiss the window, just do shutdown -r in Terminal). The system should reboot fine. Accept updating the packages and the system will hang on the next reboot.

Feedback appreciated, as this will help me identify where the problem is.

Thank you,

Okay. Does your build (gcc2, gcc4, hybrid) match? If not, do you have the right buildtools set? This is rather important, as without knowing that for sure, your build will either not end up the way you envisioned or won’t work at all.

Second question – why VirtualBox? I understand you are running Mac OS X, but if you have a spare box, I’d highly recommend running and compiling on real hardware instead. And if that’s not feasible, put a Gnu/Linux flavor on a spare box, install kvm and turn on VT-x (or amd-v), and compile on that. From experience, I can tell you that you’ll get much better performance doing it that way and don’t encounter KDL/KPs or ‘guru meditation’ as much.

Finally, I’m trying to understand your end goal. You say that you want to port + package an application to Haiku, but it appears you’re trying to rebuild a Haiku package from source and upgrade? Upgrading is simple; you may want to take a look at this: , and this: . Or, if you are trying to build a package, don’t integrate it right into the heart of the system. Instead, get the binaries and/or files you want together and do: package create -C mypackage mypackage-arch.hpkg

To learn more about PM altogether, take a look at the pages from this list:

If I misunderstood something, or if this didn’t answer your question, feel free to reply. Good luck. :slight_smile:

I followed the exact procedure documented above. I installed from an iso image from the same hrev as the source code. I am simply reinstalling the same haiku.hpkg twice in a row, and getting different messages from the first time to the second. The first install does not ask me to upgrade the packages. The second time does. If I accept it, the system hangs. If I do not, and reboot without closing the window, the system functions properly.

It is necessary for me to install multiple times in a row in order to test the code additions I have made. The behavior above comes without making any changes to the code. The system is not hanging due to a triple fault in VB. It is hanging because there is an issue loading launch_daemon. I have a screenshot snippet, but I do not see a way to upload it.


This probably won’t help, but… Did you try

pkgman update
instead of pkgman install ?

Both variants use the same package-kit classes internally, but have slightly different (minor) bugs each. Does not hurt to try

Thank you for the suggestion.

(Booting from reinstall from iso image)

~> pkgman install /boot/home/haiku/generated/objects/haiku/x86_gcc2/packaging/packages/haiku.hpkg
Downloading repochecksum-1…done.
Validating checksum for Haiku…done.
Downloading repochecksum-1…done.
Validating checksum for HaikuPorts…done.
Encountered problems:
problem 1: package haiku_devel-r1~alpha4_pm_hrev50184-1 requires haiku==r1~alpha4_pm_hrev50184-1, but none of the providers can be installed
solution 1:
- allow deinstallation of haiku_devel-r1~alpha4_pm_hrev50184-1
- allow deinstallation of haiku_x86_devel-r1~alpha4_pm_hrev50184-1
solution 2:
- do not install "pkg:haiku-r1~alpha4_pm_hrev50188-1-x86_gcc2"
Please select a solution, skip the problem for now or quit.
select [1…2/s/q]: 1The following changes will be made:
in system:
upgrade package haiku-r1~alpha4_pm_hrev50184-1 to r1~alpha4_pm_hrev50188-1 from local file
uninstall package haiku_x86_devel-r1~alpha4_pm_hrev50184-1
uninstall package haiku_devel-r1~alpha4_pm_hrev50184-1
Continue? [y/n] (y) : y[system] Applying changes …
[system] Changes applied. Old activation state backed up in “state_2016-04-09_08:08:39”
[system] Cleaning up …
[system] Done.
~> shutdown -r
~> Connection to closed by remote host.
tkelly$ ssh -p 2600 user@

Welcome to the Haiku shell.

~> pkgman update /boot/home/haiku/generated/objects/haiku/x86_gcc2/packaging/packages/haiku.hpkg
Downloading repochecksum-1…done.
Validating checksum for Haiku…done.
Downloading repochecksum-1…done.
Validating checksum for HaikuPorts…done.
Nothing to do.

Running update did not install anything from haiku.hpkg. I rebuilt haiku.hpkg and did update again and got the same message.

Probably won’t help either, but a technique I’ve used in the past is the “offline” install, switching the files from another partition, so that the daemon is not running and only realizes the changes all-at-once at boot up: 1) boot to another partition 2) switch haiku.hpkg with the old (stock) one, 3) delete the file “administrative/activated-packages…”, 4) reboot

I can try, but what I’d really like is for someone to walk through the steps documented above and see if they can reproduce the issue. Workarounds are fine if the situation is a one-time deal, but I expect to do this repeatedly, and if the problem can be reproduced by others, it should be addressed.

I can confirm this for VirtualBox (VirtualBox-5.0-5.0.16_105871) on Fedora 23.


Will retry that on KVM tomorrow.

Can also confirm this for KVM (CentOS release 6.7 (Final), qemu-kvm-, Linux 2.6.32-573.18.1.el6.x86_64 #1 SMP Tue Feb 9 22:46:17 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux)


System hangs.

I just tested again:

pkgman add$(getarch)/current
pkgman add$(getarch)/current

as described in


leads to a system that runs okay. Building it fails (i.e., it builds perfectly, but crashes as described above and tested by several people now).