On Sun, Oct 30, 2011 at 12:13:43AM +0200, Peter Dyballa wrote:
> Hello!
>
> The command 'gcc -v --help' reports that the switch '-m64' can be used to
> produce 64-bit output for the x86_64. It also mentions '-mtune=core2'. When I
> try to compile GNU Emacs 23.3a (which I'll patch to get the "AppKit Emacs")
> GCC 4.6.1 fails to build the temacs executable:
>
> gcc-4 -I/opt/local/include -L/opt/local/lib -fno-pie -prebind -Xlinker
> -headerpad -Xlinker 690 -Wl,-dead_strip_dylibs -Wl,-bind_at_load -Wl,-t
> -L/opt/local/lib -o temacs pre-crt0.o dispnew.o frame.o scroll.o xdisp.o
> menu.o xmenu.o window.o charset.o coding.o category.o ccl.o character.o
> chartab.o cm.o term.o terminal.o xfaces.o xterm.o xfns.o xselect.o xrdb.o
> fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o gtkutil.o emacs.o
> keyboard.o macros.o keymap.o sysdep.o buffer.o filelock.o insdel.o marker.o
> minibuf.o fileio.o dired.o filemode.o cmds.o casetab.o casefiddle.o indent.o
> search.o regex.o undo.o alloc.o data.o doc.o editfns.o callint.o eval.o
> floatfns.o fns.o font.o print.o lread.o syntax.o unexmacosx.o bytecode.o
> process.o callproc.o region-cache.o sound.o atimer.o doprnt.o strftime.o
> intervals.o textprop.o composite.o md5.o xfont.o ftfont.o xftfont.o
> ftxfont.o terminfo.o lastfile.o mktime.o -L/opt/local/lib
> -L/opt/local/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangocairo-1.0
> -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage
> -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lgio-2.0 -lXfixes -lcairo -lX11 -lpng14
> -lpango-1.0 -lm -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0
> -lgthread-2.0 -lglib-2.0 -lintl -lpthread -lSM -lICE -ltiff -ljpeg -lpng -lz
> -lm -lgif -lXpm -lX11 -lXrender -L/opt/local/lib -lXft -L/opt/local/lib
> -lrsvg-2 -lgio-2.0 -lgdk_pixbuf-2.0 -lm -lcairo -lgobject-2.0 -lgmodule-2.0
> -lpng14 -lgthread-2.0 -lglib-2.0 -lintl -lncurses -L/opt/local/lib -lz
> -lbz2 -lotf -lfreetype
> /usr/lib/crt1.10.5.o
> /usr/lib/libSystem.dylib
> /sw/lib/gcc4.6/lib/libgcc_ext.10.5.dylib
> /sw/lib/gcc4.6/lib/gcc/i386-apple-darwin10.8.0/4.6.1/libgcc.a
> /usr/lib/system/libmathCommon.A.dylib
> ld: warning: in pre-crt0.o, file was built for unsupported file format which
> is not the architecture being linked (i386)
> ld: warning: in dispnew.o, file was built for unsupported file format which
> is not the architecture being linked (i386)
> ld: warning: in frame.o, file was built for unsupported file format which is
> not the architecture being linked (i386)
> ...
> ld: warning: in /opt/local/lib/libncurses.dylib, file was built for
> unsupported file format which is not the architecture being linked (i386)
> ld: warning: in /opt/local/lib/libbz2.dylib, file was built for unsupported
> file format which is not the architecture being linked (i386)
> ld: warning: in /opt/local/lib/libotf.dylib, file was built for unsupported
> file format which is not the architecture being linked (i386)
> Undefined symbols:
> "_main", referenced from:
> start in crt1.10.5.o
> ld: symbol(s) not found
>
> The libraries in /opt/opt/lib are 64-bit. The compiled object files in src
> are "Mach-O 64-bit object x86_64" according to file and "architecture:
> x86_64" according to lipo. The files /usr/lib/crt1.10.5.o,
> /usr/lib/libSystem.dylib, /sw/lib/gcc4.6/lib/libgcc_ext.10.5.dylib are also
> OK, since "fat". But
> /sw/lib/gcc4.6/lib/gcc/i386-apple-darwin10.8.0/4.6.1/libgcc.a is faulty, or
> unusable and without alternative:
>
> lipo -info /sw/lib/gcc4.6/lib/gcc/i386-apple-darwin10.8.0/4.6.1/libgcc.a
> input file
> /sw/lib/gcc4.6/lib/gcc/i386-apple-darwin10.8.0/4.6.1/libgcc.a is not a fat
> file
> Non-fat file:
> /sw/lib/gcc4.6/lib/gcc/i386-apple-darwin10.8.0/4.6.1/libgcc.a is
> architecture: i386
>
> So the package gcc46 is not usable.
>
> There is also the question why /usr/lib/crt1.10.5.o is linked and not
> /usr/lib/crt1.10.6.o or why no /sw/lib/gcc4.6/lib/libgcc_ext.10.6.dylib is
> built (only /sw/lib/gcc4.6/lib/libgcc_ext.10.[45].dylib exist).
Peter,
There is no libgcc_ext.10.6 because Apple never created a libgcc_s.10.6
stub. The purpose of libgcc_ext is to
provide all of those symbols from FSF libgcc_s which were added after gcc 4.2.1
(such as those needed for functional
emutls support). The libgcc_s.10.4 and libgcc_s.10.5 are stubs to Apple's
system libgcc_s.1 which export only those
libgcc symbols defined for 10.4 and 10.5 respectively. The libgcc_ext.10.4 and
libgcc_ext.10.5 stubs export those
symbols from FSF gcc's libgcc_s.1 which aren't exported in the respective
libgcc_s.10.4 and libgcc_s,10.5 stubs.
Note that from FSF gccc 4.5 forward, FSF gcc no longer builds its own
libgcc_s.10.4 and libgcc_s.10.5 since the system
should be providing those. Also, in 10.6 SDK and later, the libgcc symbols are
now gotten directly from libSystem
(since libgcc makes little sense in terms of non-gcc compilers like clang).
This also explains why a libgccc_s.10.6
stub was never created by Apple since it would be unused.
>
The fact that your linkages show binaries in /opt/local/lib strongly
suggests that you are mixing
MacPorts with fink. This is unsupported and will most certainly break fink
builds. It can be considered
as an extenson of
http://www.finkproject.org/faq/comp-general.php?phpLang=en#usr-local-libs.
You meed to disable the use of MacPorts by commenting out...
setenv PATH
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
in .cshrc or the same in .bashrc. I also would not really trust the fink
installation if you have been
building fink against macports for some time now. You may have some non-fatal
mixed linkages in fink
against macports libraries which is a very bad thing.
Jack
>
> Mac OS X 10.6.8, Xcode 4.0.2 and 3.2.6 (for Tiger and PPC64 support)
>
> Package manager version: 0.31.3
> Distribution version: selfupdate-cvs Wed Oct 26 22:25:37 2011, 10.6, i386
> Trees: local/main stable/main unstable/main
>
>
> --
> Greetings
>
> Pete
>
> Clovis' Consideration of an Atmospheric Anomaly:
> The perversity of nature is nowhere better demonstrated than by the
> fact that, when exposed to the same atmosphere, bread becomes hard while
> crackers become soft
------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook
in minutes. BlackBerry App World™ now supports Android™ Apps
for the BlackBerry® PlayBook™. Discover just how easy and simple
it is! http://p.sf.net/sfu/android-dev2dev
_______________________________________________
Fink-users mailing list
[email protected]
List archive:
http://news.gmane.org/gmane.os.macosx.fink.user
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-users