compiling issues with 32/64/multilib

Discussions related to using VirtualBox on Linux hosts.
Post Reply
FlorianB
Posts: 2
Joined: 4. Feb 2016, 20:21

compiling issues with 32/64/multilib

Post by FlorianB »

Hi,

I run a Slackware 64 turned multilib with Alienbob packages.
My kernel is a custom 64 version 3.14.12-rt9 that was compiled with gcc 4.9.1 64-only.
The multilib gcc packages are 4.8.2.
There is no X on this machine. I want to build a headless VirtualBox to run from remote machine.

When I try to compile with gcc 4.9.1 (64 bit) :

Code: Select all

export CFLAGS=' -mtune=native -march=native -O2 -finline-functions -funswitch-loops -fpredictive-commoning -fgcse-after-reload -ftree-vectorize'
export LD_LIBRARY_PATH='/usr/lib64/:/usr/lib'
export LDFLAGS='-L/usr/lib64/ -L/usr/lib'
./configure --out-path=/usr/local/VirtualBox-5.0.14 --build-headless --with-linux=/home/user/src/kernel/linux-3.14.12-rt9

Checking for 32-bit support: 
  Cannot compile 32-bit applications (missing headers and/or libraries)!
  Check the file /usr/local/VirtualBox-5.0.14/configure.log for detailed error information.
Check /usr/local/VirtualBox-5.0.14/configure.log for details

***** Checking compiler.h *****
compiler.h not found


***** Checking 32-bit support *****
compiling the following source file:
#include <stdint.h>
int main(void)
{
  return 0;
}
using the following command line:
gcc -m32 -O -Wall -o /usr/local/VirtualBox-5.0.14/.tmp_out /usr/local/VirtualBox-5.0.14/.tmp_src.c
/usr/bin/ld: skipping incompatible /usr/local/gcc-4.9.1/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
When I try to compile with gcc 4.8.2 (multilib) :

Code: Select all

export CFLAGS=' -mtune=native -march=native -O2 -finline-functions -funswitch-loops -fpredictive-commoning -fgcse-after-reload -ftree-vectorize'
export LD_LIBRARY_PATH='/usr/lib64/:/usr/lib:/usr/local/gcc-4.8.2_multilib-x86_64-1alien/libexec/gcc/x86_64-slackware-linux/4.8.2/'
export LDFLAGS='-L/usr/lib64/ -L/usr/lib -L/usr/local/gcc-4.8.2_multilib-x86_64-1alien/libexec/gcc/x86_64-slackware-linux/4.8.2/'
./configure --out-path=/usr/local/VirtualBox-5.0.14 --build-headless --with-linux=/home/user/src/kernel/linux-3.14.12-rt9

Checking for Linux kernel sources: 
  Linux kernel headers not found at /home/user/src/kernel/linux-3.14.12-rt9
  Check the file /usr/local/VirtualBox-5.0.14/configure.log for detailed error information.
Check /usr/local/VirtualBox-5.0.14/configure.log for details

***** Checking Linux kernel sources *****
compiling the following source file:
#include <linux/version.h>
int printf(const char *format, ...);
int main(void)
{
  printf("found version %d.%d.%d",  LINUX_VERSION_CODE / 65536,
                                   (LINUX_VERSION_CODE % 65536) / 256,
                                    LINUX_VERSION_CODE          % 256);
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,0)
  printf(", OK.\n");
  return 0;
#else
  printf(", expected version 2.4.0 or higher\n");
  return 1;
#endif
}
using the following command line:
gcc -O -Wall -o /usr/local/VirtualBox-5.0.14/.tmp_out /usr/local/VirtualBox-5.0.14/.tmp_src.c -nostdinc -I/home/user/src/kernel/linux-3.14.12-rt9/include  -I/home/user/src/kernel/linux-3.14.12-rt9/include/generated/uapi
gcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found
compilation terminated.
Any trick idea?
I would like to avoid recompiling my kernel, I need to find a way to compile these vbox modules for the kernel I have.

THANK YOU!
Post Reply