Page MenuHomeFreeBSD

emulators/virtualbox-ose: Update to 6.1.26

Authored by madpilot on Jul 21 2021, 7:53 PM.
Referenced Files
Unknown Object (File)
Wed, May 22, 4:58 PM
Unknown Object (File)
Tue, May 21, 5:19 PM
Unknown Object (File)
Mon, May 6, 12:23 AM
Unknown Object (File)
Sat, May 4, 5:38 AM
Unknown Object (File)
Thu, May 2, 8:40 AM
Unknown Object (File)
Tue, Apr 30, 11:35 PM
Unknown Object (File)
Apr 22 2024, 10:36 AM
Unknown Object (File)
Apr 21 2024, 9:25 PM



I'm testing the virtualbox update to the latest update.

This update includes extensive changes to the audio subsystem. Due to this our patches for OSS don't apply anymore. Altough a cursory look at the changes makes me think the patches are not needed and the code now does the right thing.

However pulseaudio support has stopped working. Virtual machines configured to use pulseaudio fail to start with the following error:

Failed to construct device 'ichac97' instance #0 (VERR_CFGM_VALUE_NOT_FOUND).

Looking in the VM logs I found these related lines:

00:00:00.958601 Audio: Initializing PulseAudio driver
00:00:00.958624 AssertLogRel /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.24/src/VBox/Devices/Audio/DevHda.cpp(5042) int hdaR3Construct(PPDMDEVINS, int, PCFGMNODE): RT_SUCCESS(rc)
00:00:00.958644 LUN#0: rc=VERR_CFGM_VALUE_NOT_FOUND
00:00:00.958654 PDM: Failed to construct 'hda'/0! VERR_CFGM_VALUE_NOT_FOUND (-2103) - Value not found.

Due to this regression I'm submitting the update here instead of committing it.

I'm looking for help fixing the issue.

Test Plan

Have pulseaudio also work and then commit.

Diff Detail

R11 FreeBSD ports repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

BTW the error VERR_CFGM_VALUE_NOT_FOUND makes me suspect something is going wrong with the VM xml configuration file. But I have found no clue about what is missing.

Can you upload the .vbox file?

Sure, I'm attaching an archive with the vbox file and the full log produced while trying to start the machine.

Simply changing the output driver to OSS makes it work fine.

TIL: the host audio driver can be changed for the saved state of a running machine.

I successfully tested a switch from null to OSS, so I guess that (if this PulseAudio issue is not easily resolved) guests that use PulseAudio might similarly be switched to OSS.

The virtualbox developers released version 6.1.26

I'm creating a new patch to update to it.

The changelog does not indicate anything changed in the audio drivers area this time. Anyway I'm testing the update and report here once I have patches ready.

Revise patch to update port to new version 6.1.26.

Unluckily the pulseaudio regression is unchanged.

I also noticed that both 6.1.24 and 6.1.26 now create an output file with some information in my home directory every time I launch a VM. Not a blocker but slightly annoying!

koobs added inline comments.

Replace hard-coded /usr/local with SUB_FILES AND %%LOCALBASE%% or modify/set them with CONFIGURE_ARGS instead of patching, which would seem to be the better option.



Will submit patch with changes suggested by koobs in his first comment .


Good catch. Please note that this was existing code I did not modify it myself in this patch.


That would not work because VBOX_GSOAP_CXX_LIBS is calculated on the fly based on pkg-config output. In fact I don't understand why that -lz is necessary. Looks like it should be reported by by the gsoap library pkg-config script, but other consumers don't seem to care.

I'm adding it there manually to make virtualbox compile. Any other solution would require even more intrusive changes to the configure script.


Looking at this, there are actually a bunch of these that require fixing. I'm taking a look.


Sorry for multiple replies. Actually there is this in the Makefile:

@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
            ${WRKSRC}/Config.kmk ${WRKSRC}/configure \

Changing this logic would require re-engineering the whole thing, which I don't think is really worth it.

@madpilot Yep, sure, those are the things that just stood out to me as odd, or in need of improvement.

What is the nature/impact of the pulseaudio regression? Are there alternatives / workarounds? Any way we can highlight this for users?

What are possible avenues from here?

madpilot retitled this revision from emulators/virtualbox-ose: Update to 6.1.24 to emulators/virtualbox-ose: Update to 6.1.26.Jul 31 2021, 3:11 PM

@madpilot Yep, sure, those are the things that just stood out to me as odd, or in need of improvement.

They are, problem is there is a complex structure of REINPLACE_CMDs that would require major reworking if we decided to change that part.

What is the nature/impact of the pulseaudio regression? Are there alternatives / workarounds? Any way we can highlight this for users?

I have not had time to really look at the pulseaudio issue. Not sure if I'm able to find a solution though.

The alternative is using native OSS audio and we can notify users via UPDATING or the existing pkg-message.

What are possible avenues from here?

Apart from finding a fix, the only solution is committing the update with pulseaudio broken and notifying users. I don't see any alternative.

… 6.1.24 and 6.1.26 now create an output file with some information in my home directory …

As far as I know, this is not new behaviour. You might find that the file persists only if there's a problem.

I have, for example, 2021-07-10-10-31-49.049-VirtualBoxVM-4810.log created and modified on 10th July (with 6.1.22).

After some thought (and being unable to fix the issue) I think the best course of action is to temporarily exclude the PULSEAUDIO option until a fix is found.

That option is also off by default, so there is no change for people using binary packages or default options.

I decided to disable it leveraging the EXCLUDE variable, adding a comment. This, IMHO, makes clear what the intention is and also makes it quite easy to activate it back later.

If there are no objections I'd like to commit this update in a few days.

No objections, lets just explicitly include/explain that in the commot log message, and include any upstream references (if they exist)

This revision is now accepted and ready to land.Aug 12 2021, 2:08 AM