Page 1 of 2

Compiling VirtualBox 1.6.4 OSE on openSUSE 11.0

Posted: 6. Aug 2008, 14:53
by g_mocken
When trying to compile VirtualBox 1.6.4 OSE on openSUSE 11.0 I face several problems:

./configure
Checking for environment: Determined build machine: linux.x86, target machine: linux.x86, OK.
Checking for kBuild: found, OK.
Checking for gcc:
** There are known problems with gcc version 4.3 when compiling the recompiler
** stuff. You need to specify a compatibility compiler with version < 4.3. Look
** for a package compat-gcc-34 on Fedora systems or something similar on other
** distributions and call configure with parameter --with-gcc-compat=gcc34.

I was unable to find such a package "compat-gcc-34" package for openSUSE 11.0.
So I compiled gcc-3.4.6 manually and installed it in /opt/ (for easy removal). Then, I try

./configure --with-gcc=/opt/gcc-3.4.6/bin/gcc --with-g++=/opt/gcc-3.4.6/bin/g++ --with-qt-dir=/usr/lib/qt3

which results in:

Checking for environment: Determined build machine: linux.x86, target machine: linux.x86, OK.
Checking for kBuild: found, OK.
Checking for gcc: found version 3.4.6, OK.
Checking for as86: found version 0.16.17, OK.
Checking for bcc: found version 0.16.17, OK.
Checking for iasl: found version 20080213, OK.
Checking for xslt: found, OK.
Checking for pthread: found, OK.
Checking for libxml2: found version 2.6.32, OK.
Checking for libxslt: found version 1.1.23, OK.
Checking for libIDL: found version 0.8.10, OK.
Checking for zlib: found version 1.2.3, OK.
Checking for libpng: found version 1.2.26, OK.
Checking for SDL: found version 1.2.13, OK.
Checking for X libraries: found, OK.
Checking for Xcursor: found, OK.
Checking for Qt3:
Qt3 not found at "/usr/lib/qt3" or Qt3 headers not found
Check the file /home/mocken/Desktop/virtualbox/VirtualBox-1.6.4/configure.log for detailed error information.

and in configure.log I find at the end:

***** Checking Qt3 *****
compiling the following source file:
#include <cstdio>
#include <qglobal.h>
extern "C" int main(void)
{
printf("found version %s", QT_VERSION_STR);
#if QT_VERSION >= 0x030305
printf(", OK.\n");
return 0;
#elif QT_VERSION >= 0x030300
printf("\n ** WARNING: QT < 3.3.5 has known problems!\n");
#else
printf(", expected version 3.3.0 or higher\n");
return 1;
#endif
}
using the following command line:
/opt/gcc-3.4.6/bin/g++ -O -Wall -o .tmp_out .tmp_src.cc -I/usr/lib/qt3/include -L/usr/lib/qt3/lib -lqt-mt -lpthread -L/usr/local/lib
/usr/lib/qt3/lib/libqt-mt.so: undefined reference to `__cxa_guard_acquire@CXXABI_1.3'
/usr/lib/qt3/lib/libqt-mt.so: undefined reference to `operator delete(void*)@GLIBCXX_3.4'
/usr/lib/qt3/lib/libqt-mt.so: undefined reference to `vtable for __cxxabiv1::__si_class_type_info@CXXABI_1.3'
/usr/lib/qt3/lib/libqt-mt.so: undefined reference to `operator delete[](void*)@GLIBCXX_3.4'
/usr/lib/qt3/lib/libqt-mt.so: undefined reference to `operator new(unsigned int)@GLIBCXX_3.4'
/usr/lib/qt3/lib/libqt-mt.so: undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info@CXXABI_1.3'
/usr/lib/qt3/lib/libqt-mt.so: undefined reference to `__cxa_pure_virtual@CXXABI_1.3'
/usr/lib/qt3/lib/libqt-mt.so: undefined reference to `vtable for __cxxabiv1::__class_type_info@CXXABI_1.3'
/usr/lib/qt3/lib/libqt-mt.so: undefined reference to `__cxa_guard_release@CXXABI_1.3'
/usr/lib/qt3/lib/libqt-mt.so: undefined reference to `operator new[](unsigned int)@GLIBCXX_3.4'
collect2: ld returned 1 exit status


Looks like some kind of standard library incompatibility to me, can anyone help?

Guido

Posted: 8. Aug 2008, 11:15
by frank
I don't know what the problem with your self-compiled compiler is but try to use the normal gcc-4.3 compiler but specify your own compiler as --with-gcc-compat=/opt ... This way all code is compiled with the normal compiler and only a few files from src/recompiler use the gcc-3.4.6 compiler.

Posted: 8. Aug 2008, 11:15
by frank
You might also want to install the gcc-3.4 compiler from openSUSE10.3.

Posted: 8. Aug 2008, 17:26
by g_mocken
Frank Mehnert wrote: specify your own compiler as --with-gcc-compat=/opt ...
I had already tried, but did not (and I still don't) understand the result at all:
./configure --with-gcc-compat=/opt/gcc-3.4.6/bin/gcc
says ok for everything, but kmk stops after reporting a lot of "kmk[2]: bad number: '4.3' (base=10, pos=2)" messages:

[...]
kBuild: Linking vgabiossums
kBuild: Compiling vbetables-gen - /home/mocken/Desktop/virtualbox/VirtualBox-1.6.4/src/VBox/Devices/Graphics/BIOS/vbetables-gen.c
kBuild: Linking vbetables-gen
kmk[3]: Leaving directory `/home/mocken/Desktop/virtualbox/VirtualBox-1.6.4/src/VBox/Devices'
kmk[2]: Leaving directory `/home/mocken/Desktop/virtualbox/VirtualBox-1.6.4/src/VBox'
kmk[2]: Entering directory `/home/mocken/Desktop/virtualbox/VirtualBox-1.6.4/src/recompiler'
kmk[2]: bad number: '4.3' (base=10, pos=2)

kmk[2]: bad number: '4.3' (base=10, pos=2)

kBuild: Compiling dyngen - dyngen.c
kBuild: Linking dyngen
kmk[2]: Leaving directory `/home/mocken/Desktop/virtualbox/VirtualBox-1.6.4/src/recompiler'
kmk[2]: Entering directory `/home/mocken/Desktop/virtualbox/VirtualBox-1.6.4/src/apps'
kmk[2]: pass_bldprogs: Datei oder Verzeichnis nicht gefunden
kmk[2]: *** No rule to make target `pass_bldprogs'. Stop.
kmk[2]: Leaving directory `/home/mocken/Desktop/virtualbox/VirtualBox-1.6.4/src/apps'
kmk[1]: *** [pass_bldprogs_before] Error 2
kmk[1]: Leaving directory `/home/mocken/Desktop/virtualbox/VirtualBox-1.6.4/src'
kmk: *** [pass_bldprogs_before] Error 2


Is this 'bad number 4.3' about the compiler version (gcc-4.3.1) again?

Guido

Posted: 8. Aug 2008, 17:47
by g_mocken
Frank Mehnert wrote:You might also want to install the gcc-3.4 compiler from openSUSE10.3.
I installed gcc34-3.4.6-4.1.i586.rpm (found on http://software.opensuse.org/search) and I get the same result (bad number: '4.3' and so on) after

./configure --with-gcc-compat=/usr/local/gcc/3.4.6/bin/gcc
source env.sh
kmk

Any more hints would be greatly appreciated.

Guido

Posted: 9. Aug 2008, 00:14
by frank
This 'bad number' is really strange. The other problem is a missing Makefile (sorry, too lazy now but there was a posting on vbox-dev which describes these two missing Makefiles).

Vbox Open Suse

Posted: 10. Aug 2008, 14:12
by punkybouy
I found Vbox OSS for SUSE 11 64 bit in the add remove programs and it installed without any issues except that it is the OSS edition without USB support. Bummer.

Re: Vbox Open Suse

Posted: 10. Aug 2008, 15:51
by GeckoSuse
punkybouy wrote:I found Vbox OSS for SUSE 11 64 bit in the add remove programs and it installed without any issues except that it is the OSS edition without USB support. Bummer.
I have the same problem. Under Suse 10.3 you could fix that manually and get USB working. How to do that was nicely described in the end users documents provided by VirtualBox makers. But now only the binaries have USB support, and there is no version for Suse 11.0. I'm trying to contact Sun about it with the question when they are going to release a version for 11.0 but they don't answer. Is there a workaround for this problem??!

Re: Vbox Open Suse

Posted: 10. Aug 2008, 16:19
by greenpossum
GeckoSuse wrote: But now only the binaries have USB support, and there is no version for Suse 11.0. I'm trying to contact Sun about it with the question when they are going to release a version for 11.0 but they don't answer. Is there a workaround for this problem??!
While not recommended practice, the Sun RPM for OpenSUSE 10.3 works fine under 11.0.

Posted: 10. Aug 2008, 20:59
by frank
In general: If VirtualBox is not available for a quite new Linux distribution use the latest package for an older distribution. If the package installs fine it should work fine as well as the packages have dependencies to other packages.

Posted: 11. Aug 2008, 08:55
by g_mocken
Frank Mehnert wrote:This 'bad number' is really strange..
Do you think it's a warning that I can safely ignore? (assuming that the remaining error can be fixed somehow)
Frank Mehnert wrote: The other problem is a missing Makefile (sorry, too lazy now but there was a posting on vbox-dev which describes these two missing Makefiles) .
Would be great if you could provide an approximate date or some keywords of that postings ... otherwise it's difficult for me to find it myself.

Guido

Posted: 11. Aug 2008, 09:02
by g_mocken
Frank Mehnert wrote:In general: If VirtualBox is not available for a quite new Linux distribution use the latest package for an older distribution. If the package installs fine it should work fine as well as the packages have dependencies to other packages.
The VirtualBox-1.6.4_33808_openSUSE103-1.i586.rpm works beautifully on openSUSE 11.0 (32 bit in my case). This is not the problem in this thread. It's about compiling VirtualBox-1.6.4-OSE.tar.bz2, which is necessary if you e.g. want to try patches, like e.g. this one http://forums.virtualbox.org/viewtopic.php?t=3224.

Guido

Posted: 11. Aug 2008, 12:27
by frank

Re: Vbox Open Suse

Posted: 11. Aug 2008, 20:03
by GeckoSuse
greenpossum wrote:
GeckoSuse wrote: But now only the binaries have USB support, and there is no version for Suse 11.0. I'm trying to contact Sun about it with the question when they are going to release a version for 11.0 but they don't answer. Is there a workaround for this problem??!
While not recommended practice, the Sun RPM for OpenSUSE 10.3 works fine under 11.0.
Thanks for your and Frank's response. I'm going to use at once. Sorry, Guido for messing up your discussion, can't help you with that one....
Rob

Posted: 11. Aug 2008, 22:57
by frank
This problem will be fixed in 1.6.6. There were several problems with openSUSE11: They use a buggy version of gcc-4.3 which hangs when compiling VBoxManage. And this compiler reports 4.3 when invoking with
gcc -dumpversion
and not 4.3.0 as expected. I fixed the Makefiles to work with this special compiler. Finally I installed gcc-4.1 and cpp-4.1 from here:
and called the configure script with
./configure --with-gcc-compat=gcc-4.1
This together with the fixes mentioned above will allow to compile VirtualBox on openSUSE11. See r11340, r11341 and r11345 in the public SVN for the other fixes (which will be included in VBox-1.6.6 as well).