Opened 12 years ago

Closed 12 years ago

#32602 closed defect (fixed)

virtualbox: gcc-apple-4.0: not found

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: royliu@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: Cc:
Port: virtualbox

Description

virtualbox 4.1.6 and 4.1.8 do not build for me on Snow Leopard with Xcode 3.2.6. The log is filled with:

gcc-apple-4.0: not found
g++-apple-4.0: not found

Indeed, no such programs exist on Snow Leopard. The default system compilers for Xcode 3.2 are gcc-4.2 and g++-4.2. gcc-4.0 and g++-4.0 are also available but you probably don't need them.

If I "sudo port configure virtualbox", then edit work/virtualbox*/Config.kmk and change "VBOX_MACOSX_GCC_INFIX ?= -apple-4.0" to "VBOX_MACOSX_GCC_INFIX ?= -4.2", it builds fine.

Why doesn't the virtualbox build process make use of the CC and CXX environment variables, or the --with-gcc or --with-g++ configure arguments, both of which are being supplied? The Portfile goes to some effort to set configure.compiler correctly, but then the virtualbox build system never makes use of the variables that sets.

Attachments (1)

main.log (28.5 KB) - added by ryandesign (Ryan Carsten Schmidt) 12 years ago.

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: main.log added

comment:1 Changed 12 years ago by royliu@…

Resolution: fixed
Status: newclosed

Ryan,

Sorry to hear that the build failed for Xcode 3.2.6; the problem should be fixed in r88127. As for why we patch VirtualBox and set the compiler, I think it's because different parts build using different mechanisms.

-Roy

comment:2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: closedreopened

Now the patch just fails to apply:

patching file Config.kmk
Hunk #2 FAILED at 1781.
1 out of 5 hunks FAILED -- saving rejects to file Config.kmk.rej

Even if it had succeeded in applying, you would now be running "gcc-apple-4.2"; Xcode doesn't provide a program by that name either. The name of the program is "gcc-4.2", and ideally you would be running it by its full path, /usr/bin/gcc-4.2, as contained in the CC environment variable at configure time.

My question was not why the portfile patches virtualbox; I had not actually realized before that we were doing that. My question was why the virtualbox build process, as shipped, does not make use of the usual environment variables, or why we are not patching it so that it would do so.

comment:3 Changed 12 years ago by royliu@…

Resolution: fixed
Status: reopenedclosed

Fixed in r88133. As for the VirtualBox build process, it is highly non-standard and requires a combination of patching and using configuration flags. Not doing so means that compiler environment variables simply are not acknowledged.

-Roy

Note: See TracTickets for help on using tickets.