[erlang-questions] Native code for Windows/MacOS?

Tuncer Ayaz tuncer.ayaz@REDACTED
Fri Jun 26 15:49:43 CEST 2009


On Fri, Jun 26, 2009 at 10:17 AM, Joel Reymont<joelr1@REDACTED> wrote:
>
> On Jun 26, 2009, at 5:27 AM, Richard O'Keefe wrote:
>
>> Thanks very much to Joel Reymont for the pointer.
>> I'm now geting native code compilation on my Mac laptop,
>> which gives me about a 3x speedup.
>
>
> I did the original port of HiPE to the Mac, with much help from Mikael
> Pettersson.
>
> That was 3 years ago and I can't figure out how to build HiPE now :-(. Help!
>
> ./configure --enable-hipe

That works on two different installs without any ports or fink and just
plain OSX.5.7 with Xcode installed, here.

The result on my machines is the following beam:
Erlang R13B01 (erts-5.7.2) [source] [smp:4:4] [rq:4] [async-threads:0]
[hipe] [kernel-poll:true]

I used to configure with many options explicitly enabled:
./configure --enable-threads --enable-smp-support --enable-kernel-poll
--enable-hipe
Looks like this is not needed.

Just make sure you don't try to enable HiPE and 64-bit at the same
time on OSX. But you did not in the error log you sent, anyway :).
Right now it's either 32-bit beam with HiPE or 64-bit beam without
HiPE, on OSX. On Linux it works perfectly with HiPE in a 64-bit beam.

BTW, I am not sure how much more pressing or easier to implement this will
be with OSX.6 and its promised 64-bit improvements. I believe it's not related
at all.

> ...
> make
> test X"$ERTS_SKIP_DEPEND" = X"true" || (cd erts/emulator &&
> ERL_TOP=/Users/joelr/work/erlang/otp_src_R13B01 make generate depend)
> make -f i386-apple-darwin9.7.0/Makefile generate
> m4   -DTARGET=i386-apple-darwin9.7.0 -DOPSYS=darwin -DARCH=x86
> hipe/hipe_x86_asm.m4 > i386-apple-darwin9.7.0/opt/plain/hipe_x86_asm.h
> m4   -DTARGET=i386-apple-darwin9.7.0 -DOPSYS=darwin -DARCH=x86
> hipe/hipe_amd64_asm.m4 > i386-apple-darwin9.7.0/opt/plain/hipe_amd64_asm.h
> m4   -DTARGET=i386-apple-darwin9.7.0 -DOPSYS=darwin -DARCH=x86
> hipe/hipe_sparc_asm.m4 > i386-apple-darwin9.7.0/opt/plain/hipe_sparc_asm.h
> m4   -DTARGET=i386-apple-darwin9.7.0 -DOPSYS=darwin -DARCH=x86
> hipe/hipe_ppc_asm.m4 > i386-apple-darwin9.7.0/opt/plain/hipe_ppc_asm.h
> m4   -DTARGET=i386-apple-darwin9.7.0 -DOPSYS=darwin -DARCH=x86
> hipe/hipe_arm_asm.m4 > i386-apple-darwin9.7.0/opt/plain/hipe_arm_asm.h
> gcc  -mdynamic-no-pic -g -O3
> -I/Users/joelr/work/erlang/otp_src_R13B01/erts/i386-apple-darwin9.7.0
>  -no-cpp-precomp    -DHAVE_CONFIG_H -Wall -Wstrict-prototypes
> -Wmissing-prototypes -Wdeclaration-after-statement -DUSE_THREADS
> -D_THREAD_SAFE -D_REENTRANT  -Ii386-apple-darwin9.7.0/opt/plain -Ibeam
> -Isys/unix -Isys/common -Ii386-apple-darwin9.7.0 -Izlib -Ipcre -Ihipe
> -I../include/internal -I../include/internal/i386-apple-darwin9.7.0 -c
> hipe/hipe_mkliterals.c -o
> obj/i386-apple-darwin9.7.0/opt/plain/hipe_mkliterals.o
> In file included from beam/erl_process.h:52,
>                 from beam/beam_load.h:24,
>                 from beam/export.h:71,
>                 from beam/global.h:30,
>                 from hipe/hipe_mkliterals.c:32:
> hipe/hipe_process.h: In function ‘hipe_delete_process’:
> hipe/hipe_process.h:66: error: ‘ERTS_ALC_T_HIPE’ undeclared (first use in
> this function)
> hipe/hipe_process.h:66: error: (Each undeclared identifier is reported only
> once
> hipe/hipe_process.h:66: error: for each function it appears in.)
> make[2]: *** [obj/i386-apple-darwin9.7.0/opt/plain/hipe_mkliterals.o] Error
> 1
> make[1]: *** [generate] Error 2
> make: *** [depend] Error 2
>
> ---
> Mac hacker with a performance bent
> http://www.linkedin.com/in/joelreymont
>
>
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
>
>


More information about the erlang-questions mailing list