|
OpenBSD Installation and Upgrading Installing and upgrading OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
OpenBSD 7.3 hangs during upgrade
I have an OpenBSD 7.2 VM in VirtualBox 7, which i would like to upgrade. I use
Code:
sysupgrade Code:
Making all device nodes... done. I tried to switch to another virtual console with Ctrl+Alt+Fx, but it did not work. Ctrl+C worked, i got a prompt, but barely could do anything, almost everything gave back "not found". (If it ran from a ramdisk, then it is not surprising.) If i told Code:
reboot After a physical reset of the VM, the system booted up and based on Code:
uname -a Code:
sysmerge pkg_add -Uu I could install ports 7.3 too. However, after the upgrade, Lazarus and all programs it compiled die. (Error messages in the linked topic.) I tried to rebuild Lazarus from the ports, but it failed because the lack of the library atk-1.x. I already tried to do this several time and with one exception - when it froze right after downloading the sets and rebooting - the results was always the same. I've reported the problem to ibara and he thinks my system is not upgraded properly. Considering it hanged each time during the upgrade, it is not a thought without merit... Any ideas why does it hangs after making those device nodes and what else it should still do after it? |
|
|||
I tried to do
pkg_add -u too, but there was no difference. Now, still in the unupgraded 7.2 i did pkg_add at-spi2-core and it installed it. It seems, that this package was not installed at all. (I don't understand how did Lazarus built before then...) Then i upgraded my system (the upgrade hanged again after the device node part), then did sysmerge and pkg_add -u . It upgraded at-spi2-core too. Then i tried to install Lazarus. It failed again, because the lack of atk-1.x.I've double-checked: at-spi2-core is now installed and upgraded. Still, building Lazarus fails.Also, why does the upgrade hangs after making those device nodes? Any ide on that? |
|
||||
Looking again in more detail, the issue you reported to ibara was:
Code:
===> Installing lazarus-2.2.0_0 from /usr/ports/packages/amd64/all/ Can't install lazarus-2.2.0_0 because of libraries |library atk-1.0.21809.4 not found | /usr/local/lib/libatk-1.0.so.21810.0 (at-spi2-core-2.46.0p2): bad major I cannot tell you why your RAMDISK kernel was hanging, but I don't believe that issue is related to your build problem. Last edited by jggimi; 20th April 2023 at 01:52 PM. Reason: clarity |
|
|||
I did. It was in the opening post:Although, i could've done it wrong. This is how i installed the new ports:
Code:
cd /tmp ftp https://cdn.openbsd.org/pub/OpenBSD/$(uname -r)/{ports.tar.gz,SHA256.sig} signify -Cp /etc/signify/openbsd-$(uname -r | cut -c 1,3)-base.pub -x SHA256.sig ports.tar.gz cd /usr tar xvzf /tmp/ports.tar.gz rm /tmp/ports.tar.gz Code:
pkg_add fpc gmake libiconv gtk+2 at-spi2-core pkg_delete lazarus rm -rf /usr/ports/devel/lazarus git clone --depth 1 https://github.com/ibara/openbsd-ports-wip /tmp/obsd-wip cp -r /tmp/obsd-wip/devel/lazarus /usr/ports/devel rm -r /tmp/obsd-wip cd /usr/ports/devel/lazarus make install |
|
||||
I don't think the two issues are related, because the RAMDISK kernel's upgrade script does not touch the contents of /usr/local/, nor does it touch your package database in /var/db/pkg/.
If you are concerned you may have inconsistencies in your installed packages and package database, run pkg_check(8) to correct them:
$ make clean='all depends' . The clean=all target cleans out everything: old builds, bulk build cookies, packing lists, ... basically anything other than distfiles, while the clean=depends target applies the cleaning to the port and to all underlying dependencies in the build chain.
Last edited by jggimi; 20th April 2023 at 04:34 PM. Reason: clarity |
|
|||
Okay, i'll do that, but i need to ask something first.
If i do make clean='all depends' and then rm /usr/ports before upgrading the system and install 7.3 ports after the system upgrade, will it yield the same result? Or i need to do make clean='all depends' explicitly after upgrading the system to 7.3?
|
|
||||
The clean targets will remove files from within the ports tree that may have been created during prior builds, such as files in /usr/ports/{bulk,plist,packages,pobj}/. If you delete your entire ports tree, that will eliminate the need to clean it.
For more information on `make clean` and its options, see the bsd.port.mk(5) man page. |
|
|||
Quote:
In that case, i'd rather remove the entire ports tree and install the new one. Sicher ist sicher. |
|
||||
The ports tree is used to build packages from source. That's its sole purpose. All package building and package creation occurs within the tree. The extraction and building from source code takes place in /usr/ports/pobj. Built packages are stored in /usr/ports/packages/. If you "make install" a port, many steps are taken before the `install` target calls pkg_add(1) to install the package that was just built.
Generally, packages are installed and managed with the pkg_* utilities. And usually when installed, programs and supporting executable files are stored in /usr/local, configuration and provisioning files are stored in /etc, and data structures, if any, are stored in /var. If you're going to use the ports tree, I recommend you spend some quality time with the section of the FAQ called the Porter's Handbook, the ports(7) man page, and the bsd.port.mk(5) man page. |
|
|||
All right, with your guidance, i managed to upgrade the system and rebuild Lazarus in the new environment. (The key was to do the
make clean='all depends' inside /usr/ports/devel/lazarus , after the upgrade, but before the rebuild.) Thank you very much.Still, i do not understand, why did the already compiled Lazarus and all the programs compiled by Lazarus die with a bunch of errors after the system upgrade... Was there an ABI breakage between OpenBSD 7.2 and 7.3? Last edited by TCH; 22nd April 2023 at 12:48 AM. Reason: ?SYNTAX ERROR |
|
||||
Quote:
Quote:
|
|
|||
Yes. Immutable stack, changes to syscalls. Maybe other things.
|
|
|||
Quote:
Thanks for enlightening me. |
|
||||
OpenBSD's binaries -- whether included in the base OS, or a third party application packaged for execution -- are intended to match the system they are built with. Every component the program depends upon has interfaces which may alter between releases. In this particular instance, your application depends on 34 separate dependent third party packages to execute properly, and requires 14 callable libraries -- both third party and base -- for direct functionality.
It is possible -- but not guaranteed -- to upgrade an existing OS to the next release and have some previously installed third party packages continue to run, because an upgrade does not delete old libraries. |
|
||||
It may help to review the section on shared library major.minor numbering in the Porter's Handbook.
http://www.openbsd.org/faq/ports/spe...tml#SharedLibs The tl;dr is 1) a minor number bump is used whenever only new functionality is added and programs built against a prior revision will still continue to work, and 2) a major bump is used whenever there are changes to the interface and applications require rebuilds to function. |
|
|||
The program died with an access violation, what does not seem an API mismatch to me; the changed syscall scheme - ABI change - seems to be the culprit...but i might got the wrong impression. However, until this point since i started to support OpenBSD, i've never encountered such a result, that a Lazarus built binary failed to run after a system upgrade, because the only external dependencies my programs have are GTK2 components which are no longer under development.
Last edited by TCH; 22nd April 2023 at 09:01 PM. Reason: missing words |
|
|||
As jggimi was describing, OpenBSD does not guarantee ABI compatability between releases choosing instead to allow themselves the freedom to advance technology, improve security, and shed legacy baggage. That trade-off bit other people this release as well with applications in other languages.
I don't know who you're providing binaries to or what your support plans are but if you follow OpenBSD's support structure, you would support the current release and the previous. So in cases where there is a breaking change, you would provide 2 releases for a year at which time it would be expected that they upgrade the OS. |
|
|||
Quote:
Quote:
The old OpenBSD binary was working since OpenBSD 6.8 or 6.7; i do not remember which i used in November 2020, when i started to support OpenBSD: http://oscomp.hu/?lang/en*news/min/549 |
|
|||
Ah, great. I was just making it clear in case it wasn't and to say that you weren't the only one caught off guard with this release.
Glad you're sorted out. |
Tags |
device nodes, hang, upgrade |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Openbsd upgrade 6.6->6.7 first startup error | SimpL | OpenBSD Installation and Upgrading | 6 | 13th September 2021 03:11 PM |
Problem after upgrade from OpenBSD 6.1 to 6.2 | Trihex | OpenBSD Installation and Upgrading | 4 | 17th October 2017 10:31 AM |
OpenBSD 4.6 i386 boot hangs with old gateway system - resolved | comet--berkeley | OpenBSD Installation and Upgrading | 6 | 22nd July 2011 08:15 AM |
Upgrade from Openbsd 4.6 to Opbsd 4.7 | Ultiny | OpenBSD Installation and Upgrading | 4 | 21st May 2010 11:07 PM |
openbsd hangs momentarily at boot | bogd | OpenBSD General | 11 | 9th January 2009 02:53 PM |