[vbox-dev] How to build a static version of vbox

QiangHuang qianghuang87 at gmail.com
Thu Sep 15 07:30:46 GMT 2011


Thanks frank.

Yes, I understood what you mean.

However, there was no any dev tools in the target Linux. I intended to
build a static linked vbox in my full installed Linux, and copy the
static  version to the target. I noticed that the binaries, for
VBoxManage was linked to some shared libs, such as

        libxml2.so.2 => /usr/lib/libxml2.so.2 (0x006dc000)
        libcurl.so.4 => /usr/lib/libcurl.so.4 (0x00acd000)
        libm.so.6 => /lib/libm.so.6 (0x00a2a000)
        libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x04a97000)
        libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x048bc000)

and so on. I have configed some of the kmk files in the vbox folder
with the gcc option '-static', however, it worked nothing.

Thus, I am confused about how to make the building process with static linking.


2011/9/15 Frank Mehnert <frank.mehnert at oracle.com>:
> Hi,
>
> please always keep vbox-dev in cc so others get the chance to answer as
> well.
>
> Regarding your problem: Again, as long as there is a dynamic linker
> available in the minimal Linux then there is no need to build a static
> version of VirtualBox. And it would be quite difficult anyway as
> VirtualBox uses the dynamic linker internally to load dynamic libs
> at runtime, not only at startup time.
>
> Kind regards,
>
> Frank
>
> On Thursday 15 September 2011 03:22:46 QiangHuang wrote:
>> Hi Frank
>>
>> Thanks for your answering.
>>
>> The case here is to build a static linked vbox in a full installed
>> Linux. And then the built vbox could be moved to the simplified one.
>> I wonder how to config the make related files in the vbox to make the
>> building of static linked vbox successful.
>>
>> Thank you very much.
>>
>> Best wishe,
>>
>> 2011/9/14 Frank Mehnert <frank.mehnert at oracle.com>:
>> > On Wednesday 14 September 2011 14:46:23 QiangHuang wrote:
>> >> Hello everyone:
>> >>
>> >> I need to put a vbox binary in a simplified Linux. There is no gcc,
>> >> rpm, and make there. Thus a static linked version of vbox is necessary
>> >> here.
>> >>
>> >> So the question is how to config the make related files to build such
>> >> a  static linked vbox.
>> >
>> > The absence of make, gcc and rpm does not induce the requirement of
>> > static linked binaries. For a dynamically linked VBox, just the
>> > dynamic linker (ld.so) is required.
>> >
>> > Kind regards,
>> >
>> > Frank
>> > --
>> > Dr.-Ing. Frank Mehnert
>> > Senior Manager Software Development Desktop Virtualization, VirtualBox
>> > ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | 71384 Weinstadt, Germany
>> >
>> > Hauptverwaltung: Riesstr. 25, D-80992 München
>> > Registergericht: Amtsgericht München, HRA 95603
>> >
>> > Komplementärin: ORACLE Deutschland Verwaltung B.V.
>> > Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
>> > Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
>> > Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven
>> >
>> > _______________________________________________
>> > vbox-dev mailing list
>> > vbox-dev at virtualbox.org
>> > http://vbox.innotek.de/mailman/listinfo/vbox-dev
>
> --
> Dr.-Ing. Frank Mehnert
> Senior Manager Software Development Desktop Virtualization, VirtualBox
> ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | 71384 Weinstadt, Germany
>
> Hauptverwaltung: Riesstr. 25, D-80992 München
> Registergericht: Amtsgericht München, HRA 95603
>
> Komplementärin: ORACLE Deutschland Verwaltung B.V.
> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
> Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
> Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven
>




More information about the vbox-dev mailing list