how long does it take to build gcc45?

Gabriele Kahlout gabriele at mysimpatico.com
Wed Dec 8 12:45:57 PST 2010


> On 8 December 2010 15:10, Ryan Schmidt wrote:
>
>> The answer provided on your Stack Overflow question is correct. No FSF
release of gcc (e.g. the ports gcc46, gcc45, gcc44, gcc43, gcc42, gcc41,
gcc40) recognizes the -arch switch. Only Apple's specially modified versions
of gcc supplied with Xcode support that option.
>>
>
> It's not a port but qt. Or actually I see there is a port: qt4-mac @4.7.1
(aqua), which is the same version I have.
>
> Omitting the -wall option from the makefile I get (on this qt demo
project):
> torrent-build simpatico$ make
> g++ -c -pipe -g -gdwarf-2  -Wall -W -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I../torrent
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers
-I/usr/include/QtNetwork
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui -I/usr/include -I. -I. -I../torrent -I.
-F/Library/Frameworks -o main.o ../torrent/main.cpp
> In file included from
/Library/Frameworks/QtCore.framework/Headers/qnamespace.h:45:0,
>                  from
/Library/Frameworks/QtCore.framework/Headers/qobjectdefs.h:45,
>                  from
/Library/Frameworks/QtCore.framework/Headers/qobject.h:47,
>                  from
/Library/Frameworks/QtCore.framework/Headers/qcoreapplication.h:45,
>                  from
/Library/Frameworks/QtGui.framework/Versions/4/Headers/qapplication.h:45,
>                  from
/Library/Frameworks/QtGui.framework/Versions/4/Headers/QApplication:1,
>                  from ../torrent/main.cpp:40:
> /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."

You were probably adding "-arch i386" to try to overcome this error? If so,
use "-m32" instead.

That's what qmake generates. Replacing it manually (in the makefile) I no
longer get the error but get some other error.

g++ -headerpad_max_install_names -m32 -o torrent.app/Contents/MacOS/torrent
main.o addtorrentdialog.o bencodeparser.o connectionmanager.o mainwindow.o
metainfo.o peerwireclient.o ratecontroller.o filemanager.o torrentclient.o
torrentserver.o trackerclient.o moc_addtorrentdialog.o moc_mainwindow.o
moc_peerwireclient.o moc_ratecontroller.o moc_filemanager.o
moc_torrentclient.o moc_torrentserver.o moc_trackerclient.o qrc_icons.o
-F/Library/Frameworks -L/Library/Frameworks -framework QtGui -framework
QtNetwork -framework QtCore
ld: warning: in /opt/local/lib/gcc45/gcc/x86_64-apple-darwin10/4.5.1/crt3.o,
*file was built for unsupported file format which is not the architecture
being linked (i386)*
ld: warning: in /opt/local/lib/gcc45/libstdc++.dylib, file was built for
unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/gcc45/libgcc_ext.10.4.dylib, missing required
architecture i386 in file
ld: warning: in
/opt/local/lib/gcc45/gcc/x86_64-apple-darwin10/4.5.1/libgcc.a, file was
built for unsupported file format which is not the architecture being linked
(i386)
Undefined symbols:
  "typeinfo for std::bad_alloc", referenced from:
      __ZN9QHashData9hasShrunkEv.lsda in connectionmanager.o
      __ZN9QHashData9hasShrunkEv.lsda in ratecontroller.o
      __ZN7QVectorIiE7reallocEii.lsda in torrentclient.o
....

>>  If you are getting that error when building a port, it's still likely a
bug in that port, so a ticket should be filed.
>
> What should I do?

I see "/usr/local" in your output above. Be aware that it is not supported
to have things installed in /usr/local when using MacPorts as it can
interfere, so I recommend you uninstall whatever you have in /usr/local and
use MacPorts equivalents, i.e. use the qt4-mac port.

I also use qxt which doesn't seem to have a port, although that's not the
issue in this qt demo (not qxt).

PS: Thank you very much for the support.

-- 
Regards,
K. Gabriele

--- unchanged since 20/9/10 ---
P.S. If the subject contains "[LON]" or the addressee acknowledges the
receipt within 48 hours then I don't resend the email.
subject(this) ∈ L(LON*) ∨ ∃x. (x ∈ MyInbox ∧ Acknowledges(x, this) ∧ time(x)
< Now + 48h) ⇒ ¬resend(I, this).

If an email is sent by a sender that is not a trusted contact or the email
does not contain a valid code then the email is not received. A valid code
starts with a hyphen and ends with "X".
∀x. x ∈ MyInbox ⇒ from(x) ∈ MySafeSenderList ∨ (∃y. y ∈ subject(x) ∧ y ∈
L(-[a-z]+[0-9]X)).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20101208/7513967c/attachment.html>


More information about the macports-users mailing list