Page 1 of 1

[Solved] Problem building 6.0.8 from source

PostPosted: 22. May 2019, 01:42
by RicV
I don't seem to be able to build 6.0.8, from the VirtualBox-6.0.8.tar.bz2 tarball.
I followed the same procedure as always, but I am getting this unresolved reference (the full build log is attached):

Code: Select all   Expand viewCollapse view
The failing command:
   @g++               '-Wl,-rpath,/opt/VirtualBox' '-Wl,-rpath,/opt/VirtualBox'  -Wl,-z,noexecstack,-z,relro -Wl,--as-needed -m64   -o /medsj/vlabdev/rvilbig/vbox/VirtualBox-6.0.8/out/linux.amd64/release/obj/tstGuestControlSvc/tstGuestControlSvc /medsj/vlabdev/rvilbig/vbox/VirtualBox-6.0.8/out/linux.amd64/release/obj/tstGuestControlSvc/dt/VBoxGuestControlSvc.o /medsj/vlabdev/rvilbig/vbox/VirtualBox-6.0.8/out/linux.amd64/release/obj/tstGuestControlSvc/tstGuestControlSvc.o     /medsj/vlabdev/rvilbig/vbox/VirtualBox-6.0.8/out/linux.amd64/release/bin/VBoxRT.so   /medsj/vlabdev/rvilbig/vbox/VirtualBox-6.0.8/out/linux.amd64/release/bin/VBoxVMM.so   /medsj/vlabdev/rvilbig/vbox/VirtualBox-6.0.8/out/linux.amd64/release/bin/VBoxRT.so   -lpthread   -lm   -lrt   -ldl
kBuild: Linking tstGuestControlSvc
/opt/VirtualBox/VBoxREM.so: [color=#FF0000][b]undefined reference to `HMR3CanExecuteGuest[/b][/color]'
collect2: error: ld returned 1 exit status
kmk: *** [/medsj/vlabdev/rvilbig/vbox/VirtualBox-6.0.8/kBuild/footer-pass2-compiling-targets.kmk:739: /medsj/vlabdev/rvilbig/vbox/VirtualBox-6.0.8/out/linux.amd64/release/obj/tstGuestControlSvc/tstGuestControlSvc] Error 1
kmk: *** Waiting for unfinished jobs....


Actually, I get the same thing with any 6.0.X tarball. I just tried 5.2.30, and had no trouble with that. This is my standard procedure:

  • Unpack the tarball
  • ./configure --disable-docs
  • source env.sh
  • kmk all > kmk-all.log 2>&1

What am I missing?

Re: Discuss the 6.0.8 release

PostPosted: 22. May 2019, 09:32
by michael
@RicV Is this a clean build? HMR3CanExecuteGuest should no longer be referenced anywhere in the source.

Re: Discuss the 6.0.8 release

PostPosted: 22. May 2019, 14:54
by RicV
@michael: Yes, I started by unpacking the source code tarball into a new directory, from a newly opened terminal, and then built it there. I assume that's what you mean by a clean build. I did grep the whole tree for HMR3CanExecuteGuest before posting my inquiry, but I don't find it anywhere.

This server does happen to have 5.2.26 installed, which I built from an OSE tarball following the same basic steps. But I did not source the 5.2.26 env before unpacking and building 6.0.8.

Re: Discuss the 6.0.8 release

PostPosted: 22. May 2019, 15:22
by michael
Ah, looking more closely it seems to be using the version of VirtualBox you have in /opt and not the one built for linking.

Re: Discuss the 6.0.8 release

PostPosted: 22. May 2019, 15:32
by RicV
@michael: OK, any suggestions on how to proceed? Is it required to uninstall 5.2.x before attempting to build 6.0.x? And if so, what is the proper way to uninstall VBox if was installed from an OSE build, like this?

sudo ./VirtualBox-5.2.26-r128280.run

Re: Discuss the 6.0.8 release

PostPosted: 22. May 2019, 15:57
by michael
You could run the uninstall script in /opt/VirtualBox/. I don't think this is supposed to be a requirement though.

Re: Discuss the 6.0.8 release

PostPosted: 22. May 2019, 17:03
by RicV
Thanks, @michael. I was able to resolve the problem by uninstalling /opt/VirtualBox first. Then I removed my entire VirtualBox-6.0.8/out directory and rebuilt everything. Now I am happily using 6.0.8.

Re: Problem building 6.0.8 from source

PostPosted: 22. May 2019, 18:59
by socratis
Split your topic from the "Discuss the 6.0.8 release" and moved it in the OSE area, as it was taking a life of its own. And I'm going to mark it as [Solved] at the same time, nice. ;)

Re: [Solved] Problem building 6.0.8 from source

PostPosted: 22. May 2019, 19:37
by RicV
OK. It is solved in that I have a work around. But it is unfortunate that I have to remember to uninstall VirtualBox before building a new source code base. That had not been required before.

Re: [Solved] Problem building 6.0.8 from source

PostPosted: 22. May 2019, 20:04
by socratis
From what I was told from a seasoned user "If you run into a snug, always clean up the old, cached stuff and build clean". Could be the same thing?

Re: [Solved] Problem building 6.0.8 from source

PostPosted: 22. May 2019, 20:10
by RicV
Occasionally needing to rm -rf out when things get tangles up makes sense. But needing to uninstall /opt/VirtualBox before building a newer OSE in my home directory surprised me, since it was not required in VBox 5.0 - 5.2. I can live with it, just seems strange.