SAE

Kent Boortz kent@REDACTED
Sat Oct 14 17:39:34 CEST 2000


> i havent been able to build it (r7b), so i would mind any help!
> (tried joes stuf, adapted to r7b->
> [luc@REDACTED erts]$ make sae
> make[1]: Entering directory `/home/luc/tmp/otp_src_R7B-0/erts/sae'
> cd erts && ERL_TOP=/home/luc/tmp/otp_src_R7B-0 make NO_START_SCRIPTS=true opt
> /bin/sh: cd: erts: No such file or directory
> make[1]: *** [emulator] Error 1
> make[1]: Leaving directory `/home/luc/tmp/otp_src_R7B-0/erts/sae'

Strange. I just tried this on my FreeBSD 3.5 machine and it runs ok.
In a OTP source directory where I have built before the normal way I
did

  % cd /home/kent/otp_src_R7B-0  
  % setenv PATH `pwd`/bin:$PATH
  % setenv ERL_TOP `pwd`
  % cd erts
  % gmake sae
  gmake[1]: Entering directory `/usr/home/kent/otp_src_R7B-0/erts/sae'
  gmake[2]: Entering directory `/usr/home/kent/otp_src_R7B-0/erts/sae/src'
  erlc -W  -bbeam   -I../include -I../../kernel/include -o../ebin ring0.erl
  erlc -W  -bbeam   -I../include -I../../kernel/include -o../ebin elink.erl
  erlc -W  -bbeam   -I../include -I../../kernel/include -o../ebin primes.erl
  erlc -W  -bbeam   -I../include -I../../kernel/include -o../ebin ebundle.erl
  erl -noshell -pa ../ebin -s ebundle unix /usr/home/kent/otp_src_R7B-0/erts/sae/bin/primes /usr/home/kent/otp_src_R7B-0/erts/sae/ebin/primes.beam
  gmake[2]: Leaving directory `/usr/home/kent/otp_src_R7B-0/erts/sae/src'
  gmake[1]: Leaving directory `/usr/home/kent/otp_src_R7B-0/erts/sae'
  gmake[1]: Entering directory `/usr/home/kent/otp_src_R7B-0/erts/emulator'
  /usr/bin/perl5 utils/make_preload -old /usr/home/kent/otp_src_R7B-0/erts/sae/ebin/ring0.beam > i386-unknown-freebsd3.5/preload_sae.c
  .
  .

Have you done "configure" and is the "make" program GNU make?

But the build of the sae tools will fail because of the static set of
modules listed in "make_sae_tools.erl".

  % mkdir try_sae; cd try_sae
  % cp ../../bin/i386-unknown-freebsd3.5/beam_evm .
  % ls -l
  -rwxr-xr-x  1 kent  wheel  1697419 Oct 14 16:30 beam_evm
  % strip --remove-section=.note --remove-section=.comment beam_evm
  -rwxr-xr-x  1 kent  wheel  515180 Oct 14 16:30 beam_evm
  % tar -xzf sae.tgz; cd sae; gmake
  .
  .
  {'init terminating in do_boot',{{case_clause,{error,nofile}},
   [{make_sae_tools,get_standard_module,1}....

Among other things, the 'v2_*' modules that are gone. Tried to make a
new list with

  tcsh% truss -f -t open erlc test.erl |& fgrep .beam | sed 's&^.*/&&' | \
                sed 's/\.beam.*$//' | sort -u > FILES_COMPILER

and the hints given in the file "make_sae_tools.erl", so now the
function that lists the modules looks like

compiler_modules() ->
    [%% application,
     %% application_controller,
     %% application_master,
     elink,
     file_prim,
     beam_asm,
     beam_block,
     beam_bs,                   % new from running 'truss' in R7
     beam_dict,
     beam_flatten,
     beam_jump,
     beam_opcodes,
     beam_type,
     c,
     code,
     %% code_aux,
     %% code_server,
     %% code_server_int,
     compile,
     core_lib,                  % new from running 'truss' in R7
     dict,
     make_sae_tools,
     %% edlin,
     epp,
     erl_bits,                  % new from running 'truss' in R7
     erl_compile,               % new from running 'truss' in R7
     %% erl_distribution,
     %% erl_eval,
     erl_internal,
     erl_lint,
     erl_open_port, %% keep
     erl_parse,
     erl_posix_msg,
     %% erl_prim_loader, SPECIAL

     erl_scan,
     erlang,
     %% error_handler, SPECIAL
     error_logger,
     error_logger_tty_h,
     %% ets,
     file,
     filename,
     %% fixtable_server,
     gen,
     %% gen_event,
     gen_server, %% keep
     %% gen_udp,
     %% global,
     %% global_group,
     group,
     %% heart,
     %% inet,
     %% inet_config,
     %% inet_db,
     %% inet_hosts,
     %% inet_parse,
     %% inet_udp,
     %% init,
     io,
     io_lib,
     io_lib_format,
     io_lib_pretty,
     %% kernel,
     %% kernel_config,
     lists,
     orddict,                   % new from running 'truss' in R7
     ordsets,
     os,
     otp_internal,
     ram_file,
     proc_lib, %% keep
     %% rpc,
     sets,                      % new from running 'truss' in R7
     %% shell,
     %% shell_default,
     string,
     %% supervisor,
     %% supervisor_bridge,
     sys,
     sys_core_fold,             % new from running 'truss' in R7
     sys_core_inline,           % new from running 'truss' in R7
     sys_pre_expand,
     user,
     user_drv,
     user_sup,
     v3_codegen,                % new, v2 is gone in R7
     v3_core,                   % new, v2 is gone in R7
     v3_core_opt,               % new, v2 is gone in R7
     v3_kernel,                 % new, v2 is gone in R7
     v3_life].                  % new, v2 is gone in R7

There may be modules missing above or one to much. I only tested to
compile a small "Hello world" example using the stand alone compiler.

The sae/Makefile assumes '.' is in the PATH, after correcting this
(and the 'ehtml' dependency) I was able to build the tools and try to
compile a small program.

We will try to add the SAE functionality to the normal distribution
but I can't say when. The make file needs cleaning up and it needs
test cases for use in the daily build process, else it will always get
out of sync with the compiler and runtime system. Like it did now.

kent



More information about the erlang-questions mailing list