compiling for 32bit on a 64bit machine

Ben Martin monkeyiq at users.sourceforge.net
Thu Dec 27 17:03:49 PST 2012


Hi,
  I have a macport of fontforge from git which I can build and run just
fine on a Mountain Lion machine. I'm trying to broaden the compatibility
list for the generated pkg to allow a wider range of users to install
the generated binary.

  First up I added:
macosx_deployment_target  10.6

  Then I discovered somebody getting an "Illegal instruction" error and
this would seem to be that they are running on a Mac-Book-Pro
root:xnu-1504.15.3~1/RELEASE_I386 i386.

  So then I tried adding to my macports.conf file:
build_arch   i386

  And building a clean with:
sudo port -f uninstall installed
sudo port install  fontforge

First I got a link error:
ld: warning: ignoring file .libs/splinerefigure.o, file was built for
unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3
0x 0 0x 0 0x 0 0x 1 0x 0 0x 0 0x 0 ) which is not the architecture being
linked (i386): .libs/splinerefigure.o

Which I'm assuming is because my Portfile didn't stipulate (or pass on)
i386 properly. However, building with clang -m32 actually gets the
compiler to crash on one file. So it seems like I've finally hit a brick
wall and decided to ask for some tips of how I might proceed to get
around this issue?

Crash file attached.

-------------- next part --------------
make[3]: Nothing to be done for `all'.
  CC     libfontforgeexe_la-metricsview.lo
metricsview.c:2873:14: warning: 20 enumeration values not handled in switch: 'et_noevent', 'et_charup', 'et_mousemove'... [-Wswitch]
    switch ( event->type ) {
             ^
metricsview.c:4549:14: warning: 15 enumeration values not handled in switch: 'et_noevent', 'et_crossing', 'et_focus'... [-Wswitch]
    switch ( event->type ) {
             ^
metricsview.c:4649:11: warning: 8 enumeration values not handled in switch: 'et_buttonpress', 'et_buttonactivate', 'et_radiochanged'... [-Wswitch]
        switch ( event->u.control.subtype ) {
                 ^
metricsview.c:4599:14: warning: 9 enumeration values not handled in switch: 'et_noevent', 'et_crossing', 'et_visibility'... [-Wswitch]
    switch ( event->type ) {
             ^
metricsview.c:924:12: warning: unused function 'GGadgetToInt' [-Wunused-function]
static int GGadgetToInt(GGadget *g)
           ^
0  clang             0x00000001010536f2 main + 17107682
1  clang             0x0000000101053b79 main + 17108841
2  libsystem_c.dylib 0x00007fff92b0b8ea _sigtramp + 26
3  libsystem_c.dylib 0x0000000000000003 _sigtramp + 18446603338055108403
4  clang             0x00000001003d9d5f main + 4026703
5  clang             0x00000001003d9f1d main + 4027149
6  clang             0x00000001003d9d5f main + 4026703
7  clang             0x00000001003d9f1d main + 4027149
8  clang             0x00000001003d9d5f main + 4026703
9  clang             0x00000001003de164 main + 4044116
10 clang             0x00000001003dc72b main + 4037403
11 clang             0x00000001003e4fc0 main + 4072368
12 clang             0x00000001003d7761 main + 4016977
13 clang             0x00000001003d6153 main + 4011331
14 clang             0x000000010041b7b6 main + 4295590
15 clang             0x000000010041b9b0 main + 4296096
16 clang             0x000000010041b6fb main + 4295403
17 clang             0x00000001003a2d86 main + 3801462
18 clang             0x00000001001b8dff main + 1794543
19 clang             0x00000001001cf06b main + 1885275
20 clang             0x00000001001ca32d main + 1865501
21 clang             0x00000001001ca1f5 main + 1865189
22 clang             0x00000001001ca0dd main + 1864909
23 clang             0x0000000100197dfc main + 1659372
24 clang             0x000000010018a31d main + 1603341
25 clang             0x0000000100047606 main + 281078
26 clang             0x0000000100045bbe main + 274350
27 clang             0x0000000100044c01 main + 270321
28 clang             0x0000000100019ae2 main + 93906
29 clang             0x0000000100018748 main + 88888
30 clang             0x0000000100006438 main + 14376
31 clang             0x0000000100002e97 main + 647
32 clang             0x0000000100002c04
Stack dump:
0.      Program arguments: /usr/bin/clang -cc1 -triple i386-apple-macosx10.8.0 -emit-obj -disable-free -disable-llvm-verifier -main-file-name metricsview.c -pic-level 1 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -target-cpu yonah -target-linker-version 133.3 -coverage-file .libs/libfontforgeexe_la-metricsview.o -resource-dir /usr/bin/../lib/clang/4.0 -dependency-file .deps/libfontforgeexe_la-metricsview.Tpo -sys-header-deps -MP -MT libfontforgeexe_la-metricsview.lo -D HAVE_CONFIG_H -D SHAREDIR="/opt/local/share/fontforge" -D DOCDIR="/opt/local/share/doc/fontforge" -D PLUGINDIR="/opt/local/lib/fontforge/plugins" -D _REENTRANT -D _REENTRANT -D _THREAD_SAFE -D __GLIB_H_INSIDE__ -D PIC -I . -I ../inc -I ../inc -I ../inc -I /opt/local/include -I /opt/local/include/cairo -I /opt/local/include/glib-2.0 -I /opt/local/lib/glib-2.0/include -I /opt/local/include -I /opt/local/include/pixman-1 -I /opt/local/include/freetype2 -I /opt/local/include/libpng15 -I /opt/local/include/pango-1.0 -I /opt/local/include/glib-2.0 -I /opt/local/lib/glib-2.0/include -I /opt/local/include -I /opt/local/include/freetype2 -I /opt/local/include/pango-1.0 -I /opt/local/include/cairo -I /opt/local/include/glib-2.0 -I /opt/local/lib/glib-2.0/include -I /opt/local/include -I /opt/local/include/pixman-1 -I /opt/local/include/freetype2 -I /opt/local/include/libpng15 -I /opt/local/include/freetype2 -I /opt/local/include -I /opt/local/include/libpng15 -I /opt/local/include/libxml2 -I / -I /opt/local/include -I .. -I python2.7 -fmodule-cache-path /var/tmp/clang-module-cache -O2 -Wunused -Wreturn-type -Wparentheses -Wformat -Wchar-subscripts -Wno-unused-but-set-variable -Wno-unused-result -fdebug-compilation-dir /opt/local/var/macports/build/_Users_ben_Work_FontForge_2012_mac-build_categories_fontforge/fontforge/work/fontforge-2.0.0_beta1/fontforge -ferror-limit 19 -fmessage-length 164 -pthread -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi -fobjc-default-synthesize-properties -fno-common -fdiagnostics-show-option -fcolor-diagnostics -o .libs/libfontforgeexe_la-metricsview.o -x c metricsview.c 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'metricsview.c'.
4.      Running pass 'Loop Pass Manager' on function '@MVTextChanged'
5.      Running pass 'Induction Variable Users' on basic block '%.thread'
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang: note: diagnostic msg: Please submit a bug report to http://developer.apple.com/bugreporter/ and include command line arguments and all diagnostic information.
clang: note: diagnostic msg: Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/metricsview-6RrzQm.i
clang: note: diagnostic msg: /tmp/metricsview-6RrzQm.sh
make[3]: *** [libfontforgeexe_la-metricsview.lo] Error 1


More information about the macports-users mailing list