|
|
building mlton for darwin + intel
I installed MLton on my MacBook Pro to build a standalone SML
executable. It sorta seems to work, except that at link time it
complained that libmlton.a, libgmp.a, and libgdtoa.a have the wrong
cpu type. This made me guess that mlton is built for the PowerPC, but
that it just happens to run on my intel mac because of rosetta.
I built a custom version of libgmp.a (which only passed the "check"
test if I specified no cpu and no host) and that made the error for
libgmp.a go away (but not the others).
So I decided to get the source for mlton and try to build it. The
compile fails trying to access a member of a structure that doesn't
exist. (I checked the header. It ain't there.) The error is below
(past my standalone app error).
Much obliged for any suggestions.
(What's the status of building standalone apps with SML/NJ?)
-thant
---begin standalone app error---
/usr/bin/ld: warning /usr/local/lib/mlton/self/libmlton.a archive's
cputype (18, architecture ppc) does not match cputype (7) for
specified -arch flag: i386 (can't load from it)
/usr/bin/ld: warning /usr/local/lib/mlton/self/libgdtoa.a archive's
cputype (18, architecture ppc) does not match cputype (7) for
specified -arch flag: i386 (can't load from it)
/usr/bin/ld: Undefined symbols:
_GC_arrayAllocate
_GC_gc
_MLton_bug
_MLton_exit
_Stdio_print
_WordS32_quot
_WordS32_rem
_GC_switchToThread
_MLton_init
_sfread
_swrite
collect2: ld returned 1 exit status
call to system failed with exit status 1:
gcc -std=gnu99 -o tree /tmp/fileUf1EKJ.o /tmp/file1JFxCB.o -L/usr/
local/lib/mlton/self -lmlton -lgmp -lgdtoa -lm
make: *** [check] Error 1
---end standalone app error---
---begin build mlton error---
Compiling MLton runtime system for self.
make -C runtime
gcc -std=gnu99 -O2 -Wall -I. -Iplatform -D_FILE_OFFSET_BITS=64 -fomit-
frame-pointer -falign-loops=2 -falign-jumps=2 -falign-functions=5 -c -
o platform/darwin.o platform/darwin.c
platform/darwin.c: In function 'catcher':
platform/darwin.c:13: error: 'i386_thread_state_t' has no member named
'srr0'
platform/darwin.c: In function 'getTextStart':
platform/darwin.c:30: warning: '_dyld_lookup_and_bind' is deprecated
(declared at /usr/include/mach-o/dyld.h:298)
platform/darwin.c:30: warning: passing argument 2 of
'_dyld_lookup_and_bind' from incompatible pointer type
platform/darwin.c:30: warning: passing argument 3 of
'_dyld_lookup_and_bind' from incompatible pointer type
platform/darwin.c:31: warning: passing argument 1 of
'_dyld_get_image_header_containing_address' makes pointer from integer
without a cast
platform/darwin.c:31: warning: assignment discards qualifiers from
pointer target type
make[2]: *** [platform/darwin.o] Error 1
make[1]: *** [runtime] Error 2
make: *** [all-no-docs] Error 2
--- end build mlton error---
|
|
0
|
|
|
|
Reply
|
adm (206)
|
2/19/2007 3:26:34 AM |
|
On Feb 18, 9:26 pm, "thant" <a...@standarddeviance.com> wrote:
> I installed MLton on my MacBook Pro to build a standalone SML
> executable. It sorta seems to work, except that at link time it
> complained that libmlton.a, libgmp.a, and libgdtoa.a have the wrong
> cpu type. This made me guess that mlton is built for the PowerPC, but
> that it just happens to run on my intel mac because of rosetta.
You should install an x86-darwin version of MLton, from:
http://www.mlton.org/Experimental
In order to build MLton from sources on x86-darwin, you'll need
sources dated at least 20061101; better would be to build from SVN
sources:
http://www.mlton.org/Sources
(The MLton-user and MLton mailing lists (http://www.mlton.org/Contact)
are good places to ask about MLton specific build issues.)
|
|
0
|
|
|
|
Reply
|
Matthew.Fluet (16)
|
2/19/2007 2:45:11 PM
|
|
On Feb 19, 7:45 am, "Matthew Fluet" <Matthew.Fl...@gmail.com> wrote:
[...]
> You should install an x86-darwin version of MLton, from:
> http://www.mlton.org/Experimental
>
> In order to build MLton from sources on x86-darwin, you'll need
> sources dated at least 20061101; better would be to build from SVN
> sources:
> http://www.mlton.org/Sources
>
> (The MLton-user and MLton mailing lists (http://www.mlton.org/Contact)
> are good places to ask about MLton specific build issues.)
Thanks! I ran into a different problem with the binaries you pointed
at (they want a specific build of the gmp library I don't have), but
I'll work on building from the source and I'll take the conversation
to the address you mention.
-thant
|
|
0
|
|
|
|
Reply
|
adm (206)
|
2/19/2007 4:09:35 PM
|
|
|
2 Replies
22 Views
(page loaded in 0.396 seconds)
|
|
|
|
|
|
|
|
|