[vbox-dev] Compiling on Snow Leopard

Nadav Samet thesamet at gmail.com
Mon Mar 8 10:49:20 PST 2010


Hi Christian,

I am trying to use the binary of Qt4 from Nokia, and again I am hitting this
32/64 bit issue:

$ ./configure --disable-hardening --with-openssl-dir=/opt/local
--with-qt4-dir=/usr
Checking for environment: Determined build machine: darwin.x86, target
machine: darwin.x86, OK.
Checking for kBuild: found, OK.
Checking for Darwin version: found version 10.6 (SDK:
/Developer/SDKs/MacOSX10.5.sdk), OK.
Checking for gcc: found version 4.2.1, OK.
Checking for libIDL: found version 0.8.13, OK.
Checking for ssl: found version OpenSSL 0.9.8m 25 Feb 2010, OK.
Checking for libcurl: found version 7.16.3, OK.
Checking for OpenGL support: enabled
Checking for Qt4:
  ** not found!

I found the following at the end of configure.log:

***** Checking Qt4 *****
compiling the following source file:
#include <cstdio>
#include <QtGlobal>
extern "C" int main(void)
{
  printf("found version %s", QT_VERSION_STR);
#if QT_VERSION >= 0x040400
  printf(", OK.\n");
  return 0;
#else
  printf(", expected version 4.4.0 or higher\n");
  return 1;
#endif
}
using the following command line:
g++ -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk
-Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -g -O -Wall -o
/Users/thesamet/Development/no_backup/VirtualBox-3.1.4_OSE/.tmp_out
/Users/thesamet/Development/no_backup/VirtualBox-3.1.4_OSE/.tmp_src.cc
"-F/Library/Frameworks -lpthread
-I/Library/Frameworks/QtCore.framework/Headers -framework QtCore"
In file included from
/Library/Frameworks/QtCore.framework/Headers/QtGlobal:1,
                 from
/Users/thesamet/Development/no_backup/VirtualBox-3.1.4_OSE/.tmp_src.cc:2:
/Library/Frameworks/QtCore.framework/Headers/qglobal.h:288:2: error: #error
"You are building a 64-bit application, but using a 32-bit version of Qt.
Check your build configuration."

On Mon, Mar 8, 2010 at 1:58 AM, Christian Pötzsch <
Christian.Poetzsch at sun.com> wrote:

> Hi Nadav,
>
> the install instruction are correct. Even if Snow Leopard claims to be
> fully 64Bit, the kernel isn't it most of the time. VirtualBox needs a
> kernel driver to work correctly, so VirtualBox have to be compiled like
> the current running kernel. You can verify the current version running
> by uname -m. Also I suppose you didn't want to use the Qt version from
> MacPorts, cause this is the X11 one and thats not supported by us. Use
> the one from the Nokia web site.
>
> Christian
>
> On 03/07/10 05:20, Nadav Samet wrote:
> > Hi,
> >
> > I am trying to compile the 3.1.4_OSE tarball on Snow Leopard.
> >
> > The instructions
> > at http://www.virtualbox.org/wiki/Mac%20OS%20X%20build%20instructionslinks
> > to page with a binary version of Qt4 compiled for i386. However, the
> > default target architecture in Snow Leopard is 64-bit.
> >
> > So I went ahead and did a 'sudo port install qt4-mac', went back into
> > the Virtual Box 3.1.4 directory and:
> >
> > $ ./configure --disable-hardening --with-openssl-dir=/opt/local/
> > --with-qt4-dir=/opt/local/Library/
> > ...
> > $ kmk
> > [...]
> > kBuild: Linking VBoxRT
> > Undefined symbols:
> >   "_fopen$UNIX2003", referenced from:
> >       _BIO_new_file in libcrypto.a(bss_file.o)
> >       _file_ctrl in libcrypto.a(bss_file.o)
> >       _open_console in libcrypto.a(ui_openssl.o)
> >       _open_console in libcrypto.a(ui_openssl.o)
> > ld: symbol(s) not found
> > collect2: ld returned 1 exit status
> > kmk[2]: ***
> >
> [/Users/thesamet/Development/no_backup/VirtualBox-3.1.4_OSE/out/darwin.x86/release/obj/VBoxRT/VBoxRT.dylib]
> > Error 1
> > The failing command:
> > @g++-4.0 -dynamiclib
> >  -mmacosx-version-min=10.5
> > -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk
> > -Wl,-headerpad_max_install_names  -Wl,-no_compact_linkedit
> > -current_version 3.1.4 -framework IOKit -install_name
> > @executable_path/VBoxRT.dylib -m32 -read_only_relocs suppress  -o
> >
> /Users/thesamet/Development/no_backup/VirtualBox-3.1.4_OSE/out/darwin.x86/release/obj/VBoxRT/VBoxRT.dylib
> >  -filelist
> >
> /Users/thesamet/Development/no_backup/VirtualBox-3.1.4_OSE/out/darwin.x86/release/obj/VBoxRT/VBoxRT.rsp
> >    -liconv
> >
> /Users/thesamet/Development/no_backup/VirtualBox-3.1.4_OSE/out/darwin.x86/release/lib/SUPR3.a
> >
> >
> /Users/thesamet/Development/no_backup/VirtualBox-3.1.4_OSE/out/darwin.x86/release/lib/VBox-liblzf.a
> >   -lz
> >
> /Users/thesamet/Development/no_backup/VirtualBox-3.1.4_OSE/out/darwin.x86/release/lib/VBox-kStuff.a
> >
> >
> /Users/thesamet/Development/no_backup/VirtualBox-3.1.4_OSE/out/darwin.x86/release/lib/VBox-libxml2.a
> >   /opt/local//lib/libcrypto.a   -lcurl
> > kmk[2]: ***
> >
> [/Users/thesamet/Development/no_backup/VirtualBox-3.1.4_OSE/out/darwin.x86/release/obj/VBoxRT/VBoxRT.dylib]
> > Deleting file
> >
> `/Users/thesamet/Development/no_backup/VirtualBox-3.1.4_OSE/out/darwin.x86/release/obj/VBoxRT/VBoxRT.rsp'
> > kmk[2]: *** Waiting for unfinished jobs....
> > kmk[2]: Leaving directory
> > `/Users/thesamet/Development/no_backup/VirtualBox-3.1.4_OSE'
> > kmk[2]: Entering directory
> > `/Users/thesamet/Development/no_backup/VirtualBox-3.1.4_OSE'
> > kmk[2]: *** Exiting with status 2
> > kmk[1]: *** [pass_dlls_this] Error 2
> > kmk[1]: Leaving directory
> > `/Users/thesamet/Development/no_backup/VirtualBox-3.1.4_OSE'
> > kmk: *** [pass_dlls_order] Error 2
> >
> > It looks like the command line flags refer to 10.5's SDK and the build
> > process ends up confused about which version of libSystem to link
> > against. Any help?
> >
> > Nadav
> >
> >
> >
> > _______________________________________________
> > vbox-dev mailing list
> > vbox-dev at virtualbox.org
> > http://vbox.innotek.de/mailman/listinfo/vbox-dev
>
>
> --
> Dr. Christian Pötzsch   --    http://www.sun.com/
>
> =================================================
> Sitz der Gesellschaft: Sun Microsystems GmbH,
> Sonnenallee 1, D-85551 Kirchheim-Heimstetten
> Amtsgericht München: HRB 161028
> Geschäftsführer: Thomas Schröder, Wolfgang Engels
> Vorsitzender des Aufsichtsrates: Martin Häring
> =================================================
>
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> http://vbox.innotek.de/mailman/listinfo/vbox-dev
>



-- 
Sincerely yours,
Nadav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100308/3fb2a720/attachment-0001.html 


More information about the vbox-dev mailing list