After building VBox

Discussions related to using the OSE version of VirtualBox.

After building VBox

Postby ken_829 » 29. Jun 2013, 14:36

I confused with what to do after building VBox. Maybe the question is naive. :?

I build VirtualBox-4.2.14 on Ubuntu 12.04.2 and 'kmk', 'make', and 'sudo make install' complete without error. I find some tutorials from Howtos on the forum,wiki about build instructions and User Manual. They give different steps.

The Howtos gives these:
Code: Select all   Expand viewCollapse view
kmk packing
   cp ~/virtualbox/vbox/out/linux.amd64/release/bin/VirtualBox-4.*.*_OSE-r*.run ~/
   cd ~/
   sudo ./VirtualBox-4.*.*_OSE-r*.run install

I don't want to redistribute it. So I skip 'kmk packing'. Then I can't find VirtualBox-4.2.14_OSE.run. It can't continue.

The wiki says that VirtualBox can be run directly from the build target directory (out/linux.x86/release/bin/). I can find vboxdrv in /dev and 'sudo modprobe vboxdrv' executes without fatal. But when I command 'VBoxHeadless', I get this:
Code: Select all   Expand viewCollapse view
ken@Ubuntu:/usr/bin$ VBoxHeadless
The program 'VBoxHeadless' is currently not installed.  You can install it by typing:
sudo apt-get install virtualbox


The User Manual says
Next, you will have to install the system initialization script for the kernel module:

cp /opt/VirtualBox/vboxdrv.sh /etc/init.d/vboxdrv
(assuming you installed VirtualBox to the /opt/VirtualBox directory) and activate the initialization script using the right method for your distribution. You should create VirtualBox's configuration file:

mkdir /etc/vbox
echo INSTALL_DIR=/opt/VirtualBox > /etc/vbox/vbox.cfg
and, for convenience, create the following symbolic links:

ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VirtualBox
ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxManage
ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxHeadless
ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxSDL

I think my directory is '/opt/VirtualBox-4.2.14/out/linux.amd64/release/bin/', but I don't find vboxdrv.sh there. It may mean vboxdrv.sh should be created in the directory with
Code: Select all   Expand viewCollapse view
mkdir /etc/vbox
echo INSTALL_DIR=/opt/VirtualBox-4.2.14/out/linux.amd64/release/bin/ > /etc/vbox/vbox.cfg
Then I execute these:
Code: Select all   Expand viewCollapse view
sudo cp /opt/VirtualBox-4.2.14/out/linux.amd64/release/bin/vboxdrv.sh /etc/init.d/vboxdrv
sudo ln -sf /opt/VirtualBox-4.2.14/out/linux.amd64/release/bin/VBox.sh /usr/bin/VirtualBox
sudo ln -sf /opt/VirtualBox-4.2.14/out/linux.amd64/release/bin/VBox.sh /usr/bin/VBoxManage
sudo ln -sf /opt/VirtualBox-4.2.14/out/linux.amd64/release/bin/VBox.sh /usr/bin/VBoxHeadless
sudo ln -sf /opt/VirtualBox-4.2.14/out/linux.amd64/release/bin/VBox.sh /usr/bin/VBoxS
At last, I reboot the OS. When I command 'VBoxHeadless', I get this:
Code: Select all   Expand viewCollapse view
ken@Ubuntu:/usr/bin$ VBoxHeadless
Could not find VirtualBox installation. Please reinstall.


Where's the fault? I'm a Newbie. Please help!
ken_829
 
Posts: 12
Joined: 21. Jun 2013, 12:21
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Linux

Re: After building VBox

Postby Perryg » 29. Jun 2013, 14:49

Without packing you will not have a run file to actually install.
remove the links and pack the build and install using the run file.
Otherwise you would need to export the location if the runable.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: After building VBox

Postby ken_829 » 29. Jun 2013, 15:03

Thanks Perryg. I tried packing but it fails with error like this:
Code: Select all   Expand viewCollapse view
ken@Ubuntu:/opt/VirtualBox-4.2.14/out/linux.amd64/release/bin/src$ cd /opt/VirtualBox-4.2.14/src/VBox
ken@Ubuntu:/opt/VirtualBox-4.2.14/src/VBox$ kmk packing
...
kBuild: Installing symlink /opt/VirtualBox-4.2.14/out/linux.amd64/release/bin/scripts
kmk: *** No rule to make target `/opt/VirtualBox-4.2.14/out/linux.amd64/release/bin/additions/VBoxGuestAdditions.iso', needed by `/opt/VirtualBox-4.2.14/out/linux.amd64/release/obj/Installer/linux/archive/additions/VBoxGuestAdditions.iso'.  Stop.
kmk: *** Waiting for unfinished jobs....
kmk: *** Exiting with status 2


I search the forum and find some contexts in Building VirtualBox headless with no additions. The solution is a hack way and complex. I prefer a normal and simple way.

The build.log, configure.log, env.sh, LocalConfig.kmk is in the attachment.
build-log.zip
(35.67 KiB) Downloaded 75 times
ken_829
 
Posts: 12
Joined: 21. Jun 2013, 12:21
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Linux

Re: After building VBox

Postby Perryg » 29. Jun 2013, 18:28

forget packing. Too many disabled features
add --disable-hardening to your configure statement
remove the out folder and recompile
modprobe vboxdrv and then see if you get VBoxManage to work.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: After building VBox

Postby ken_829 » 30. Jun 2013, 08:11

Thank Perryg again. You tell me not to build stripped down builds in the other topic. Even if I build with opengl, SDL_ttf and so on, I can use VBox without GUI by VBoxHeadless. The host without GUI can finish the build and run VBox. Is this right? So I remove all the --disable in the config statement and wish packing. But the same error occurs:
Code: Select all   Expand viewCollapse view
ken@Ubuntu:/opt/VirtualBox-4.2.14$ sudo ./configure --build-libxml2 --enable-vnc --build-headless
...
ken@Ubuntu:/opt/VirtualBox-4.2.14/src/VBox$ kmk packing
...
kBuild: Installing symlink /opt/VirtualBox-4.2.14/out/linux.amd64/release/bin/scripts
kmk: *** No rule to make target `/opt/VirtualBox-4.2.14/out/linux.amd64/release/bin/additions/VBoxGuestAdditions.iso', needed by `/opt/VirtualBox-4.2.14/out/linux.amd64/release/obj/Installer/linux/archive/additions/VBoxGuestAdditions.iso'.  Stop.
kmk: *** Waiting for unfinished jobs....
kmk: *** Exiting with status 2


The attachment includes four files like the previous one.
build_log.zip
(38.95 KiB) Downloaded 27 times
ken_829
 
Posts: 12
Joined: 21. Jun 2013, 12:21
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Linux

Re: After building VBox

Postby Perryg » 30. Jun 2013, 14:49

Have you deleted the out folder each time? Very important.

Typically all you need are the proper packages and let VBox build the program.
I use nothing in the ./configure statement and then build with kmk all (you can use the --disable-docs switch if you don't want to install texlive)
Headless is included as well as the rest of the features.

The only other consideration is openwatcom. It was not a previous requirement but was to become one so it may be that they have finally switched to a full requirement with the latest build.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: After building VBox

Postby ken_829 » 1. Jul 2013, 14:36

Thanks for reply. The out folder is deleted. I also try './configure --disable-docs' and 'kmk all'. But the same error occurs again.

The openwatcom isn't installed. Because I get an error of Segmentation fault (core dumped) at the start of installing. I find no solution of it. :(
ken_829
 
Posts: 12
Joined: 21. Jun 2013, 12:21
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Linux

Re: After building VBox

Postby Perryg » 1. Jul 2013, 14:45

Humm,

Have not seen that issue before. I use the C++ version and here are the install instructions. http://www.openwatcom.org/index.php/Ins ... m_on_Linux
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: After building VBox

Postby ken_829 » 1. Jul 2013, 15:23

I also follow it. But the error actually occurs. I google it for a long time without any result. So strange! A pity!

I will contact with openwatcom.users.c_cpp community for some help.
ken_829
 
Posts: 12
Joined: 21. Jun 2013, 12:21
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Linux

Re: After building VBox

Postby michaln » 1. Jul 2013, 16:30

ken_829 wrote:The openwatcom isn't installed. Because I get an error of Segmentation fault (core dumped) at the start of installing. I find no solution of it. :(

You can just unzip the self-installing archive.

I believe the actual crash is caused by the lack of termcaps or terminfo... one of the stupid UNIX terminal management things anyway.
michaln
Oracle Corporation
 
Posts: 2958
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: After building VBox

Postby Perryg » 1. Jul 2013, 19:51

I have installed watcom on just about every Linux system I know of. The download link is below since there are two kinds. C and Fortran. Maybe you downloaded the wrong one.

ftp://ftp.openwatcom.org/open-watcom-c-linux-1.9

The only requirement is to place the download in a location that is read/write to the user, and also to create a location to install it to that also has read/write to the user prior to running the install.

I have found that almost always you need to run export TERMINFO=/lib/terminfo prior to installing or you receive error about a floating point exception, but it installs very fast and without fail.

I also know you need to use export WATCOM=/<absolute path > if you do not include it in your environment variables permanently prior to trying to compile.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: After building VBox

Postby ken_829 » 2. Jul 2013, 05:28

Thank both of your replies. The error is still there. Here is the log:
Code: Select all   Expand viewCollapse view
ken@Ubuntu:~/ow1-9$ more owsetenv.sh
export TERMINFO=/lib/terminfo
export WATCOM=/opt/openwatocm
ken@Ubuntu:~/ow1-9$ sudo mkdir /opt/openwatocm
[sudo] password for ken:
ken@Ubuntu:~/ow1-9$ sudo chmod 777 /opt/openwatocm
ken@Ubuntu:~/ow1-9$ sudo chmod 777 open-watcom-c-linux-1.9
ken@Ubuntu:~/ow1-9$ source owsetenv.sh
ken@Ubuntu:~/ow1-9$ ./open-watcom-c-linux-1.9

                                                 
               ________                          ________
              /:::::::/                         /:::::::/
             /:::::::/__                       /:::::::/__
            /::::::::::/                      /::::::::::/
            -----/::::/__                     -----/::::/__
                /......./                         /......./
               -----/./                          -----/./
                   /./                               /./
                  //                                //
                 /                                 /

                ________                          ________
               /:::::::/                         /:::::::/
              /:::::::/__                       /:::::::/__
             /::::::::::/                      /::::::::::/
             -----/::::/__                     -----/::::/__
                 /......./                         /......./
                -----/./                          -----/./
Segmentation fault (core dumped)


I have confirmed the file open-watcom-c-linux-1.9 by md5.
ken_829
 
Posts: 12
Joined: 21. Jun 2013, 12:21
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Linux

Re: After building VBox

Postby michaln » 2. Jul 2013, 10:46

The problem isn't the TERMINFO or whatever environment variable, the problem is that the terminal database is not there on a default Ubuntu install (no one is better at breaking something that's worked reliably for decades than Ubuntu). Unfortunately I don't remember off the top of my head which package needs to be installed, I just know there is one. If you give me some time, I should be able to find out.

Perry probably doesn't use Ubuntu so he avoids lots of problems ;)
michaln
Oracle Corporation
 
Posts: 2958
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: After building VBox

Postby michaln » 2. Jul 2013, 13:39

ken_829 wrote:Thank both of your replies. The error is still there. Here is the log:
Code: Select all   Expand viewCollapse view
ken@Ubuntu:~/ow1-9$ more owsetenv.sh
export TERMINFO=/lib/terminfo
export WATCOM=/opt/openwatocm
ken@Ubuntu:~/ow1-9$ sudo mkdir /opt/openwatocm
[sudo] password for ken:
ken@Ubuntu:~/ow1-9$ sudo chmod 777 /opt/openwatocm
ken@Ubuntu:~/ow1-9$ sudo chmod 777 open-watcom-c-linux-1.9
ken@Ubuntu:~/ow1-9$ source owsetenv.sh
ken@Ubuntu:~/ow1-9$ ./open-watcom-c-linux-1.9

                                                 
               ________                          ________
              /:::::::/                         /:::::::/
             /:::::::/__                       /:::::::/__
            /::::::::::/                      /::::::::::/
            -----/::::/__                     -----/::::/__
                /......./                         /......./
               -----/./                          -----/./
                   /./                               /./
                  //                                //
                 /                                 /

                ________                          ________
               /:::::::/                         /:::::::/
              /:::::::/__                       /:::::::/__
             /::::::::::/                      /::::::::::/
             -----/::::/__                     -----/::::/__
                 /......./                         /......./
                -----/./                          -----/./
Segmentation fault (core dumped)

Actually, now that I'm reading more carefully, you seem to be running into a different problem. One I can't reproduce.

Although I didn't repeat the steps exactly. Note that 'openwatocm' should be 'openwatcom', but that ought not to matter. Setting the WATCOM env before running the installer is fairly pointless, but again should not matter. OTOH I can verify that setting the TERMINFO env var as you did is required in a default Ubuntu setup.

Again I'll point out that you can simply unzip open-watcom-c-linux-1.9 into the /opt/xxx directory and skip the installer altogether.
michaln
Oracle Corporation
 
Posts: 2958
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: After building VBox

Postby ken_829 » 3. Jul 2013, 07:58

Thank michaln for your reply.

Again I'll point out that you can simply unzip open-watcom-c-linux-1.9 into the /opt/xxx directory and skip the installer altogether.


I tried this way and it almost works. I unzip it and configure the environment in /etc/profile with:
Code: Select all   Expand viewCollapse view
# Point to the top level of the installation directory.
WATCOM=/opt/openwatcom

# Set up other environment variables.
EDPATH=$WATCOM/eddat
INCLUDE=$WATCOM/lh
PATH=$WATCOM/binl:$PATH

# Set the following as default options for the indicated programs.
WCL386="-zq"
WCC386="-zq -w4"
WPP386="-zq -xs -w4"
WCL="-zq"
WCC="-zq -w4"
WPP="-zq -xs -w4"


Then I test it with:
Code: Select all   Expand viewCollapse view
ken@Ubuntu:/opt/openwatcom/src$ wcc hello.c
Open Watcom C16 Optimizing Compiler Version 1.9
Portions Copyright (c) 1984-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
hello.c(1): Error! E1055: Unable to open 'stdio.h'
hello.c(5): Warning! W131: No prototype found for function 'printf'
hello.c: 6 lines, 1 warnings, 1 errors


The $INCLUDE doesn't works. I confirm the user has read/write to $INCLUDE/*.
ken_829
 
Posts: 12
Joined: 21. Jun 2013, 12:21
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Linux

Next

Return to VirtualBox OSE

Who is online

Users browsing this forum: No registered users and 1 guest