use of undeclared identifier 'SYS_freebsd11_mknod'

I'm trying to install ImageMagic6 from the ports, running FreeBSD STABLE 11.4. I am using portmaster to install.

When it tries to install one of the rust dependencies, I get the following error :-
Code:
===>  Configuring for rust-1.58.0
===>   FreeBSD 10 autotools fix applied to /usr/ports/lang/rust/work/rustc-1.58.0-src/vendor/libssh2-sys/libssh2/config.rpath
<stdin>:8:17: error: use of undeclared identifier 'SYS_freebsd11_mknod'
        return syscall(SYS_freebsd11_mknod, "", 0, 0) < 0 && errno == ENOSYS;
                       ^
So very little around this error, I've fixed a few of these type of things recently and they've been to using the wrong libraries mainly due to poor upgrade practices...ports conflicting with the user land installs / etc.

It's an i386 build, just because it's been upgraded from as far back as around Freebsd 4 I think...maybe this particular build started it's life as Freebsd 6. The more I learn, the more I realise I had missed a lot of migration steps...ones like rebuilding/reinstalling all ports which I'm a bit worried to do now as it always breaks so many things where I used to compile some stuff in ports and some stuff manually.

I think most kinks are worked out, just this particular one - I dunno what to do.
 
11.4 is no longer supported and rust requires Freebsd11 compatibility in newer kernels
you have to upgrade to 12.3 or 13.0
or build imagemagick without the dependency that brings in rust
 
Correct, the entire 11 major branch (including 11-STABLE) is EoL since September 2021.
 
11.4 is no longer supported and rust requires Freebsd11 compatibility in newer kernels
you have to upgrade to 12.3 or 13.0
or build imagemagick without the dependency that brings in rust
Oh okay, thanks, is there an easy way to tell the imagemagick port to build without rust?

I'll look at upgrading freebsd again to the latest version, I just wince about what will stop working next each time I go through an upgrade 😂
 
If you use ZFS I can highly recommend using a boot environment for the upgrade. Then you can easily switch back in case the upgrade goes sideways.

But unless you use some exotic, home-grown, application the upgrade should be fairly straightforward. Remember, all versions use the same ports tree, so you still have the exact same third party software, regardless of the FreeBSD version.
 
i don't see any direct dependency wanting rust but it may be a level 2 or deeper
you can scroll your build screen and see why

anyway, if upgrade is an option then upgrade
it's a pain in the neck to keep up with packages on an unsupported system
sooner or later make fill fail by being unable to parse /usr/port/Mk/something.mk and so on
 
If you use ZFS I can highly recommend using a boot environment for the upgrade. Then you can easily switch back in case the upgrade goes sideways.

But unless you use some exotic, home-grown, application the upgrade should be fairly straightforward. Remember, all versions use the same ports tree, so you still have the exact same third party software, regardless of the FreeBSD version.

I don't think I use ZFS, it's originally an old build that's come along way.

So, I did try to upgrade...ran the freebsd-update for version 12.3. I'm getting kernel panics constantly after the first reboot following freebsd-update install.

I have booted into the old kernel using kernel.old, it's up and running. What do I do when an install goes completely sideways like this, what's the next steps...presumably taking a copy of kernel.old so I've always got it to go back on (restarting the install would cause this to be overwritten with the 12.3 right?). I was reading some articles, and it said to check ERATA for known stuff, but there doesn't seem to be any for 12.3...

IT's up and running ont he old kernel at least, receiving email - I need to research and get a solid action plan before moving forward. Can't afford to have it unrecoverable, it's my home email server.
 
Trying to get what I can of the kernel crash, it has similar info to this bug :-


Except, this is happening at each reboot and not just under load...it's really hard to get any detailed info, as the screen just moves too quickly on the console I can't capture much. What I am seeing is attached in the screenshot. This is an i386 build, running in hyper-V...it really should be updated to amd64, but that's another headache.
 

Attachments

  • 2022-01-25T00.33.28.1184755+00.00.jpeg
    2022-01-25T00.33.28.1184755+00.00.jpeg
    54.5 KB · Views: 44
Should I create a new thread for this latest problem, as it's somewhat diverged from the initial topic...where should I post it?
 
So, I did try to upgrade...ran the freebsd-update for version 12.3. I'm getting kernel panics constantly after the first reboot following freebsd-update install.

Trying to get what I can of the kernel crash
The crash is likely due to having external kernel modules that were built for 11.x loading on a 12.x kernel.

You only did a freebsd-update install once? Then rebooted and it immediately crashed on boot? You then managed to boot kernel.old? That's fine, we'll continue from there. Go through /boot/loader.conf and /etc/rc.conf, disable everything you don't strictly need to boot the machine. Disable any services you might be starting. This is just temporary, you can enable all that again when you finished the upgrade.

With as much disabled as possible try booting the new kernel again. This should not crash any more. Then run the second freebsd-update install. That might take a while, the first install only upgrades the kernel, the second install will upgrade the rest of the base OS. After that finished, run pkg upgrade, after a major version upgrade you must reinstall everything. That should all finish without problems. Then run the third, and final, freebsd-update install. That last install run will remove the old libraries and other files that need to be cleaned up. Reboot, the system should boot fine with 12.3. Now you can enable all the services and modules again you disabled earlier.
 
The crash is likely due to having external kernel modules that were built for 11.x loading on a 12.x kernel.

You only did a freebsd-update install once? Then rebooted and it immediately crashed on boot? You then managed to boot kernel.old? That's fine, we'll continue from there. Go through /boot/loader.conf and /etc/rc.conf, disable everything you don't strictly need to boot the machine. Disable any services you might be starting. This is just temporary, you can enable all that again when you finished the upgrade.

With as much disabled as possible try booting the new kernel again. This should not crash any more. Then run the second freebsd-update install. That might take a while, the first install only upgrades the kernel, the second install will upgrade the rest of the base OS. After that finished, run pkg upgrade, after a major version upgrade you must reinstall everything. That should all finish without problems. Then run the third, and final, freebsd-update install. That last install run will remove the old libraries and other files that need to be cleaned up. Reboot, the system should boot fine with 12.3. Now you can enable all the services and modules again you disabled earlier.
Okay, thanks...I've tried all this.

bootloader.conf had only one, cpu core temp. Set that to NO, I'll never need that - I think it's something I used to watch a long time ago when this was a hardware box and I used to run so MRTG graphing to monitor the system temperature.

Checked through /etc/rc.conf and I REM'ed everything out that was xxx="YES". Nothing to note, usual postfix/clamav software...moduly I guess linux_enable and firewall_enable. I ony left basic ssh and setting up the network card features enabled in that file.

Still exactly the same thing, the kernel panic happens really quickly whilst it's loading the hardware stuff - it doesn't get chance to even start my services from watching the screen. I see the last thing is "vmbus_res0: <Hyper-V Vmbus Resource> irq 5,7 on acpi0" that I can capture before the crash. Looking at dmesg, around that time these things start :-

vmbus_res0: <Hyper-V Vmbus Resource> irq 5,7 on acpi0
pmtimer0 on isa0
orm0: <ISA Option ROM> at iomem 0xc0000-0xcbfff pnpid ORM0000 on isa0
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
ppc0: parallel port not found.
Timecounters tick every 10.000 msec
usb_needs_explore_all: no devclass
vmbus0: version 3.0
hvet0: <Hyper-V event timer> on vmbus0
Event timer "Hyper-V" frequency 10000000 Hz quality 1000
storvsc0: <Hyper-V IDE> on vmbus0
storvsc1: <Hyper-V SCSI> on vmbus0
hvheartbeat0: <Hyper-V Heartbeat> on vmbus0
hvkvp0: <Hyper-V KVP> on vmbus0
hvshutdown0: <Hyper-V Shutdown> on vmbus0
hvtimesync0: <Hyper-V Timesync> on vmbus0
hvvss0: <Hyper-V VSS> on vmbus0
hn0: <Hyper-V Network Interface> on vmbus0
cd0 at ata1 bus 0 scbus1 target 0 lun 0
cd0: <Msft Virtual CD/ROM 1.0> Removable CD-ROM SPC-3 SCSI device
cd0: 16.700MB/s transfers (WDMA2, ATAPI 12bytes, PIO 65534bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present
da0 at blkvsc0 bus 0 scbus2 target 0 lun 0
da0: <Msft Virtual Disk 1.0> Fixed Direct Access SPC-3 SCSI device
da0: 300.000MB/s transfers
da0: Command Queueing enabled
da0: 163840MB (335544320 512 byte sectors)
hn0: Ethernet address: 00:15:5d:9a:09:01
hn0: link state changed to UP
Trying to mount root from ufs:/dev/da0s1a [rw]...
random: unblocking device.
lo0: link state changed to UP
ipfw2 (+ipv6) initialized, divert loadable, nat loadable, default to deny, logging disabled

Pretty sure we don't get past this before the system crashes...it's jsut too quick to see.

What should I do next? Did you see the link I posted, some of the dump info fits exactly with it "0x10438ee" and there is only one google hit for this...any correlation?
 
THought I might give you the whole dmesg output after all the modules were disabled, so you can see what's remaining :-

Copyright (c) 1992-2020 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.4-RELEASE-p9 #0: Tue Apr 6 08:51:50 UTC 2021
root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386
FreeBSD clang version 10.0.0 (git@github.com:llvm/llvm-project.git llvmorg-10.0.0-0-gd32170dbd5b)
VT(vga): text 80x25
Hyper-V Version: 6.3.9600 [SP19]
Features=0xe7f<VPRUNTIME,TMREFCNT,SYNIC,SYNTM,APIC,HYPERCALL,VPINDEX,REFTSC,IDLE,TMFREQ>
PM Features=0x0 [C2]
Features3=0x17b2<DEBUG,XMMHC,IDLE,NUMA,TMFREQ,SYNCMC,CRASH,NPIEP>
Timecounter "Hyper-V" frequency 10000000 Hz quality 2000
CPU: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (2666.77-MHz 686-class CPU)
Origin="GenuineIntel" Id=0x206c2 Family=0x6 Model=0x2c Stepping=2
Features=0xf83fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE,SSE2,SS>
Features2=0x82982203<SSE3,PCLMULQDQ,SSSE3,CX16,SSE4.1,SSE4.2,POPCNT,AESNI,HV>
AMD Features=0x20100800<SYSCALL,NX,LM>
AMD Features2=0x1<LAHF>
Hypervisor: Origin = "Microsoft Hv"

real memory = 12884901888 (12288 MB)
avail memory = 4057628672 (3869 MB)
Event timer "LAPIC" quality 100
ACPI APIC Table: <VRTUAL MICROSFT>
ioapic0: Changing APIC ID to 0
ioapic0 <Version 1.1> irqs 0-23 on motherboard
Timecounter "TSC-low" frequency 1333382773 Hz quality 800
random: entropy device external interface
kbd1 at kbdmux0
module_register_init: MOD_LOAD (vesa, 0xc101c3e0, 0) error 19
nexus0
vtvga0: <VT VGA driver> on motherboard
cryptosoft0: <software crypto> on motherboard
acpi0: <VRTUAL MICROSFT> on motherboard
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
atrtc0: registered as a time-of-day clock, resolution 1.000000s
Event timer "RTC" frequency 32768 Hz quality 0
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900

acpi_timer0: <32-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pcib0: Ignoring 3 range above 4GB (0xfe0000000-0xfffefffff)
vmbus0: <Hyper-V Vmbus> on pcib0
pci0: <ACPI PCI bus> on pcib0
isab0: <PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel PIIX4 UDMA33 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 7.1 on pci0
ata0: <ATA channel> at channel 0 on atapci0
ata1: <ATA channel> at channel 1 on atapci0
pci0: <bridge> at device 7.3 (no driver attached)
vgapci0: <VGA-compatible display> mem 0xf8000000-0xfbffffff irq 11 at device 8.0 on pci0
vgapci0: Boot video device
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model IntelliMouse Explorer, device ID 4
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0

uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0
fdc0: <floppy drive controller (FDE)> port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
vmbus_res0: <Hyper-V Vmbus Resource> irq 5,7 on acpi0
pmtimer0 on isa0
orm0: <ISA Option ROM> at iomem 0xc0000-0xcbfff pnpid ORM0000 on isa0
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
ppc0: parallel port not found.
Timecounters tick every 10.000 msec
usb_needs_explore_all: no devclass
vmbus0: version 3.0
hvet0: <Hyper-V event timer> on vmbus0
Event timer "Hyper-V" frequency 10000000 Hz quality 1000
storvsc0: <Hyper-V IDE> on vmbus0
storvsc1: <Hyper-V SCSI> on vmbus0
hvheartbeat0: <Hyper-V Heartbeat> on vmbus0
hvkvp0: <Hyper-V KVP> on vmbus0
hvshutdown0: <Hyper-V Shutdown> on vmbus0
hvtimesync0: <Hyper-V Timesync> on vmbus0
hvvss0: <Hyper-V VSS> on vmbus0
hn0: <Hyper-V Network Interface> on vmbus0
cd0 at ata1 bus 0 scbus1 target 0 lun 0
cd0: <Msft Virtual CD/ROM 1.0> Removable CD-ROM SPC-3 SCSI device
cd0: 16.700MB/s transfers (WDMA2, ATAPI 12bytes, PIO 65534bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present
da0 at blkvsc0 bus 0 scbus2 target 0 lun 0
da0: <Msft Virtual Disk 1.0> Fixed Direct Access SPC-3 SCSI device
da0: 300.000MB/s transfers
da0: Command Queueing enabled
da0: 163840MB (335544320 512 byte sectors)
hn0: Ethernet address: 00:15:5d:9a:09:01
hn0: link state changed to UP
Trying to mount root from ufs:/dev/da0s1a [rw]...
random: unblocking device.
lo0: link state changed to UP
 
And this is everything that is loaded after, by running "top"...you can see nothing is running and nothing special is loaded after I've trimmed it all out. I don't recall having any special options, and I am just running out of the box GENERIC kernel before running freebsd-install already. I had only ever customised it years ago to enable SMP, and that has long been default.

1643231023518.png
 
i386 with 128GB memory? Really? You know i386 can only address 4GB, right? Yes, with PAE it can do more, but you really don't want to tread that path. On Hyper-V? And only one core? That's the oddest looking configuration I've seen in a while. I would recommend backing up the data from it, make a note of the configuration, and rebuild it using a 64 bit FreeBSD.
 
i386 with 128GB memory? Really? You know i386 can only address 4GB, right? Yes, with PAE it can do more, but you really don't want to tread that path. On Hyper-V? And only one core? That's the oddest looking configuration I've seen in a while. I would recommend backing up the data from it, make a note of the configuration, and rebuild it using a 64 bit FreeBSD.

Ahh, it had 12GB assigned...not 128GB? The physical server has only 64GB. And yes, when I migrated the machine I hadn't remembered that it was i386 and that memory assignment is just what I'd put when I first configured it (8 cores/12GB ram).

It had 8 cores, but I had trimmed it back down to 1 core for testing...because the article I had found regarding the error suggested about multiple cores.

I had actually already set the memory back to 4096 to match the limit, just to eliminate that. It didn't help, but it can stay at 4GB as it's more than enough for the system to run happily without using much, if any, of the swap.


So any more ideas on how to get the current i386 build working?
 
just go the amd64 route
i386 is on it's way out anyway 2nd tier, etc, etc
Yeah, I know...but it really suffices in what I need for now - and I only want to keep it running for a few months whilst I work out the migration path I want to take to a new email solution.

I really didn't want to spend too much effort in recreating this particular system, and also with the least amount of downtime because my own email sits on there.

However, I have looked at the following guide...anyone know the success rate of this :-

 
Rebuilding a new VM with a 64 bit OS is easier, quicker and less error-prone.
 
Back
Top