LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Failed to compile Virtualbox on Slackware64-current (http://www.linuxquestions.org/questions/slackware-14/failed-to-compile-virtualbox-on-slackware64-current-4175460371/)

torimus 05-01-2013 10:50 PM

Failed to compile Virtualbox on Slackware64-current
 
Hi,

I'm trying to build Virtualbox on my Slackware64-current machine, but it fails with the following error:

Code:

In file included from /tmp/SBo/VirtualBox-4.2.12/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_idl.c:43:0:
/tmp/SBo/VirtualBox-4.2.12/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl.h:49:18: fatal error: glib.h: No such file
 or directory
 #include <glib.h>
                ^

Code:

compilation terminated.
kmk: *** [/tmp/SBo/VirtualBox-4.2.12/out/linux.amd64/release/obj/xpidl/xpcom/typelib/xpidl/xpidl.o] Error 1
The failing command:
@gcc -c -O2    -Wno-format  -O2 -fno-omit-frame-pointer -fno-strict-aliasing -m64 -I/tmp/SBo/VirtualBox-4.2.12
/out/linux.amd64/release/bin/sdk/bindings/xpcom/include -I/tmp/SBo/VirtualBox-4.2.12/out/linux.amd64/release/bin/sdk
/bindings/xpcom/include/nsprpub -I/tmp/SBo/VirtualBox-4.2.12/out/linux.amd64/release/bin/sdk/bindings/xpcom/include
/string -I/tmp/SBo/VirtualBox-4.2.12/out/linux.amd64/release/bin/sdk/bindings/xpcom/include/xpcom -I/tmp
/SBo/VirtualBox-4.2.12/out/linux.amd64/release/bin/sdk/bindings/xpcom/include/ipcd -I/tmp/SBo/VirtualBox-4.2.12
/include -I/tmp/SBo/VirtualBox-4.2.12/out/linux.amd64/release -DRTPATH_APP_PRIVATE=\"/usr/share/virtualbox\" -DVBOX
-DVBOX_WITH_DEBUGGER -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_HARDENING -DRTPATH_APP_PRIVATE=\"/usr/share
/virtualbox\" -DRT_OS_LINUX -D_FILE_OFFSET_BITS=64 -DRT_ARCH_AMD64 -D__AMD64__ -DRTPATH_APP_PRIVATE=\"/usr/share
/virtualbox\" -DRTPATH_APP_PRIVATE_ARCH=\"/usr/lib64/virtualbox\" -DRTPATH_SHARED_LIBS=\"/usr/lib64/virtualbox\"
-DRTPATH_APP_DOCS=\"/usr/share/virtualbox\" -DIN_RING3 -DLOG_DISABLED -DMOZILLA_CLIENT=1 -DNDEBUG=1 -D_IMPL_NS_COM
-DXPCOM_DLL_BASE=\"VBoxXPCOM\" -DMOZ_DLL_SUFFIX=\".so\" -DIN_RING3 -DVBOX_WITH_XPCOM_NAMESPACE_CLEANUP
-DMOZ_PRESERVE_PIC -DEXPORT_XPT_API -DOSTYPE=\"Linux2.6\" -DOSARCH=\"Linux\" -DXP_UNIX=1 -D_GNU_SOURCE
-DHAVE_VISIBILITY_ATTRIBUTE=1 -DHAVE_VA_LIST_AS_ARRAY -DHAVE_VA_COPY -DVA_COPY\(a\,b\)=__builtin_va_copy\(a\,b\)
-Wp,-MD,/tmp/SBo/VirtualBox-4.2.12/out/linux.amd64/release/obj/xpidl/xpcom/typelib/xpidl/xpidl.o.dep -Wp,-MT,/tmp
/SBo/VirtualBox-4.2.12/out/linux.amd64/release/obj/xpidl/xpcom/typelib/xpidl/xpidl.o -Wp,-MP -o /tmp/SBo/VirtualBox-
4.2.12/out/linux.amd64/release/obj/xpidl/xpcom/typelib/xpidl/xpidl.o /tmp/SBo/VirtualBox-4.2.12/src/libs/xpcom18a4
/xpcom/typelib/xpidl/xpidl.c

I do have installed multilib packages from http://slackware.com/~alien/multilib/current including glib2-compat32. Build scripts are from http://slackbuilds.org.
I do have glib.h in /usr/include/glib-2.0 .


Any idea what's wrong or how to get it working ?

update: formatting fixed

glorsplitz 05-02-2013 08:24 PM

hi, I followed tronayne's post HERE no multilib, works well, substitute latest versions

ReaperX7 05-02-2013 09:43 PM

You can also install the Oracle standard release which includes support for USB devices and other extended functions. It's not a clean-room OSE, but it does work well for what you need it for if you're willing to fore-go having to have pure open source software on a system.

Mark Pettit 05-03-2013 01:41 AM

I agree with @ReaperX7 here. Especially if you are just using the VM to run the evil empire's o/s ! If you want to be purist, then you might as well run Xen or something that's truly 100% open source.

ppr:kut 05-03-2013 01:47 AM

Quote:

Originally Posted by ReaperX7 (Post 4943752)
You can also install the Oracle standard release which includes support for USB devices and other extended functions. It's not a clean-room OSE, but it does work well for what you need it for if you're willing to fore-go having to have pure open source software on a system.

Oracle standard release = precompiled OSE. The "extended functions" you are talking about are in the puel-extpack, which is just a set of plugins that works with both. Seriously, if you want a well working vbox get the one from SBo, since Oracle's binary links against libs not available on Slackware (PAM).

ppr:kut 05-03-2013 01:53 AM

Quote:

I do have installed multilib packages from http://slackware.com/~alien/multilib/current including glib2-compat32. Build scripts are from http://slackbuilds.org.
I do have glib.h in /usr/include/glib-2.0 .

Any idea what's wrong or how to get it working ?
I haven't tried building on -current yet so I don't know whether that error is expected or not. Somehow the include path for the glib headers is either missing or the includes are wrong. You can try adding "-I/usr/include/glib-2.0" to CFLAGS and CXXFLAGS as a workaround.

ponce 05-03-2013 04:14 AM

I've always been curious so I tried a build on my slackware64-current with multilib and everything went fine with these patches (but I haven't the possibility to test ATM the resulting packages)
Code:

diff -Naur virtualbox.orig/virtualbox.SlackBuild virtualbox/virtualbox.SlackBuild
--- virtualbox.orig/virtualbox.SlackBuild        2013-04-16 00:40:42.000000000 +0200
+++ virtualbox/virtualbox.SlackBuild        2013-05-03 10:03:29.955149325 +0200
@@ -25,7 +25,7 @@
 
 PRGNAM=virtualbox
 SRCNAM=VirtualBox
-VERSION=4.2.10
+VERSION=4.2.12
 BUILD=${BUILD:-1}
 TAG=${TAG:-_SBo}
 
@@ -126,6 +126,9 @@
 # Patch taken from gentoo
 patch -p1 -i $CWD/virtualbox-4-makeself-check.patch
 
+# Cheat to support gcc-4.8.x
+sed -i '417s:7:8:' configure
+
 CFLAGS="$SLKCFLAGS" \
 CXXFLAGS="$SLKCFLAGS" \
 ./configure \
diff -Naur virtualbox.orig/virtualbox.info virtualbox/virtualbox.info
--- virtualbox.orig/virtualbox.info        2013-04-16 00:40:42.000000000 +0200
+++ virtualbox/virtualbox.info        2013-05-03 09:59:50.931158536 +0200
@@ -1,14 +1,14 @@
 PRGNAM="virtualbox"
-VERSION="4.2.10"
+VERSION="4.2.12"
 HOMEPAGE="http://www.virtualbox.org"
-DOWNLOAD="http://download.virtualbox.org/virtualbox/4.2.10/VirtualBox-4.2.10.tar.bz2 \
-          http://download.virtualbox.org/virtualbox/4.2.10/VBoxGuestAdditions_4.2.10.iso \
-          http://download.virtualbox.org/virtualbox/4.2.10/UserManual.pdf \
-          http://download.virtualbox.org/virtualbox/4.2.10/SDKRef.pdf"
-MD5SUM="99349df34caacdecbb7cf3908631c3f3 \
-        e49046cd56398f9f9b8410154f1a0393 \
-        d9e0ce6950fe1e036634bffba3f721b6 \
-        2219d3f4ff1f444f60e9715300719198"
+DOWNLOAD="http://download.virtualbox.org/virtualbox/4.2.12/VirtualBox-4.2.10.tar.bz2 \
+          http://download.virtualbox.org/virtualbox/4.2.12/VBoxGuestAdditions_4.2.12.iso \
+          http://download.virtualbox.org/virtualbox/4.2.12/UserManual.pdf \
+          http://download.virtualbox.org/virtualbox/4.2.12/SDKRef.pdf"
+MD5SUM="654e45054ae6589452508d37403dc800 \
+        403098e688f9e7f4273de680f6734983 \
+        b5ff7bf6fc4f5fa15de6833445fa8776 \
+        8e6b30a367d0599220a3fef29c1c395c"
 DOWNLOAD_x86_64="UNTESTED"
 MD5SUM_x86_64=""
 REQUIRES="acpica virtualbox-kernel"

Code:

diff -Naur virtualbox-kernel.orig/virtualbox-kernel.SlackBuild virtualbox-kernel/virtualbox-kernel.SlackBuild
--- virtualbox-kernel.orig/virtualbox-kernel.SlackBuild 2013-05-02 08:42:18.901000000 +0200
+++ virtualbox-kernel/virtualbox-kernel.SlackBuild      2013-05-03 08:06:42.462000000 +0200
@@ -25,7 +25,7 @@
 # Modified by SlackBuilds.org
 
 PRGNAM=virtualbox-kernel
-VERSION=${VERSION:-4.2.10}
+VERSION=${VERSION:-4.2.12}
 BUILD=${BUILD:-1}
 TAG=${TAG:-_SBo}
 
diff -Naur virtualbox-kernel.orig/virtualbox-kernel.info virtualbox-kernel/virtualbox-kernel.info
--- virtualbox-kernel.orig/virtualbox-kernel.info      2013-05-02 08:42:18.901000000 +0200
+++ virtualbox-kernel/virtualbox-kernel.info    2013-05-03 08:08:38.892000000 +0200
@@ -1,8 +1,8 @@
 PRGNAM="virtualbox-kernel"
-VERSION="4.2.10"
+VERSION="4.2.12"
 HOMEPAGE="http://www.virtualbox.org"
-DOWNLOAD="http://www.liwjatan.at/files/src/virtualbox-kernel/virtualbox-kernel-4.2.10.tar.xz"
-MD5SUM="86c8dbb1a828b74253696c6d57819bb3"
+DOWNLOAD="http://ponce.cc/slackware/sources/repo/virtualbox-kernel-4.2.12.tar.xz"
+MD5SUM="23dc40dd9c71756384f3bca1475543a9"
 DOWNLOAD_x86_64=""
 MD5SUM_x86_64=""
 REQUIRES=""

so really dunno the reason of the OP error.

torimus 05-03-2013 05:27 AM

Hi,

me again.
Based on your suggestions tried to compile again, but still fails with the same error.

Tried to add -I/usr/include/glib-2.0" to CFLAGS and CXXFLAGS and fix to enable compilation with current gcc.
Now the modified virtualbox.SlackBuild contains:
Code:

# Enable GCC 4.8 support
sed -i '417s:7:8:' configure

CFLAGS="$SLKCFLAGS -I/usr/include/glib-2.0"
CXXFLAGS="$SLKCFLAGS -I/usr/include/glib-2.0"
export CFLAGS CXXFLAGS
./configure \
  --disable-kmods \

Even then compilation aborts with missing glib.h error, though there is this include file in /usr/include/glib-2.0 path.

I've stored stderr output and it contains following messages at the beginning:
Code:

Config.kmk:2296: /tmp/SBo/VirtualBox-4.2.12/out/linux.amd64/release/GCCConfig.kmk: Directory or file does not exist
Config.kmk:5225: /tmp/SBo/VirtualBox-4.2.12/out/linux.amd64/release/revision.kmk: Directory or file does not exist
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
Syntax error: "(" unexpected
kmk: bad number: empty

kmk: bad number: empty

configure.log does contain the only error message
Code:

g++ -O -Wall -o /tmp/SBo/VirtualBox-4.2.12/.tmp_out /tmp/SBo/VirtualBox-4.2.12/.tmp_src.cc -I/usr/include/python2.7 /usr/lib/x86_64-linux-gnu/libpython2.7.so
g++: error: /usr/lib/x86_64-linux-gnu/libpython2.7.so: No such file or directory
compiling the following source file: #include <cstdio>
#include <Python.h>
extern "C" int main(void)

I think it's a sane case as later in the log there is another attempt to compile with proper library path /usr/lib64/libpython2.7.so .

I'm loosing ideas here :(

ponce 05-03-2013 06:09 AM

have you got a full up-to-date installation of slackware64-current and the latest multilib packages and compat32 ones? I've built the packages on this setup.

torimus 05-03-2013 06:16 AM

I've tried to install suggested x86_64 self-installing package but it requires root privileges and ignores to work under fakeroot as it contains hard-coded paths for logging files etc. I refuse to blindly run anything as root to mess the system so I have to look other way around :-/

torimus 05-03-2013 06:20 AM

Quote:

Originally Posted by ponce (Post 4944001)
have you got a full up-to-date installation of slackware64-current and the latest multilib packages and compat32 ones? I've built the packages on this setup.

I did, all packages updated to current versions, all multilib and compat32 counterparts as well.

I may imagine build requires some undocumented tool as I've no full but menu-driven Slackware install but there is no track about it, no error message making clear what's wrong.

ponce 05-03-2013 06:21 AM

Quote:

Originally Posted by torimus (Post 4944007)
I've tried to install suggested x86_64 self-installing package but it requires root privileges and ignores to work under fakeroot as it contains hard-coded paths for logging files etc. I refuse to blindly run anything as root to mess the system so I have to look other way around :-/

you mean you have run also the slackbuild with fakeroot? that's not supported.

you have to run it in a full-featured root shell, that means logged in as root or becoming root with "su -" (note the "-").

Quote:

Originally Posted by torimus (Post 4944010)
I've no full but menu-driven Slackware install

if you haven't got a full slackware install (but the KDEI serie) that's not supported either if you want to build anything from SlackBuilds.org.

torimus 05-03-2013 06:33 AM

Quote:

Originally Posted by ponce (Post 4944012)
you mean you have run also the slackbuild with fakeroot? that's not supported.

you have to run it in a full-featured root shell, that means logged in as root or becoming root with "su -" (note the "-").


that's not supported either if you want to build anything from slackbuilds.org.

Really ? I've noticed it detected fakeroot environment and just warned multi-threaded compilation won't be supported but it did continued then.

ponce 05-03-2013 06:34 AM

also multilib is not supported, but that at least can be (more-or-less) tested by kind souls ;)

I suggest you to read the faq.

TobiSGD 05-03-2013 07:03 AM

Quote:

Originally Posted by torimus (Post 4944007)
I've tried to install suggested x86_64 self-installing package but it requires root privileges and ignores to work under fakeroot as it contains hard-coded paths for logging files etc. I refuse to blindly run anything as root to mess the system so I have to look other way around :-/

I always use the installer from Oracle, it works fine and without having to go the multilib path.


All times are GMT -5. The time now is 11:03 PM.