Closed m-2k closed 5 years ago
After file creating .railing/embed.fs
i see next error:
Initializing EMBED.FS:
Mount View:
/boot /boot
/erlang/lib/os_mon/ebin /os_mon
/erlang/lib/sample/ebin /sample
****
/erlang/lib/sh/ebin /sh
escript: exception error: bad argument
in function atom_to_list/1
called as atom_to_list([])
in call from mad_ling:'-embed_fs/2-fun-2-'/3 (/Users/5HT/depot/synrc/mad/src/mad_ling.erl, line 77)
in call from lists:foreach/2 (lists.erl, line 1336)
in call from mad_ling:embed_fs/2 (/Users/5HT/depot/synrc/mad/src/mad_ling.erl, line 76)
in call from mad_ling:add_apps/0 (/Users/5HT/depot/synrc/mad/src/mad_ling.erl, line 61)
in call from mad_ling:main/1 (/Users/5HT/depot/synrc/mad/src/mad_ling.erl, line 16)
in call from lists:foldl/3 (lists.erl, line 1261)
in call from mad:main/1 (/Users/5HT/depot/synrc/mad/src/mad.erl, line 22)
I fix mad_repl.erl
local_app() ->
case filename:basename(filelib:wildcard("ebin/*.app"),".app") of
[] -> ''; % [] -> []
A -> list_to_atom(A) end.
and I get the following error:
****
Creating EMBED.FS C file: ...ok
Compilation of Filesystem object: ...ok
escript: exception error: no match of right hand side value "ld: file not found: vmling.o"
in function mad_ling:add_apps/0 (/****/mad/src/mad_ling.erl, line 65)
in call from mad_ling:main/1 (/****/mad/src/mad_ling.erl, line 16)
in call from lists:foldl/3 (lists.erl, line 1261)
in call from mad:main/1 (/****/mad/src/mad.erl, line 22)
in call from escript:run/2 (escript.erl, line 752)
in call from escript:start/1 (escript.erl, line 276)
in call from init:start_it/1
in call from init:start_em/1
cp deps/ling/core/vmling.o .railing/
made my day:
Creating EMBED.FS C file: ...ok
Compilation of Filesystem object: ...ok
Linking Image: ok
With n2o bundle i have segfault:
rlwrap ./.img
Erlang [ling-0.3.2]
Eshell V6.3 (abort with ^G)
1>
rlwrap: warning: .img crashed, killed by SIGSEGV.
rlwrap itself has not crashed, but for transparency,
it will now kill itself (without dumping core) with the same signal
warnings can be silenced by the --no-warnings (-n) option
Segmentation fault: 11
What is the problem? Embed.fs is readonly?
I also see a CPU load of 100% per core if start mad.iso bundle
./mad.img
Erlang [ling-0.3.2]
Eshell V6.3 (abort with ^G)
1>
Processes: 232 total, 4 running, 11 stuck, 217 sleeping, 1022 threads 23:38:28
Load Avg: 1.92, 1.73, 1.74 CPU usage: 21.41% user, 8.2% sys, 70.55% idle
SharedLibs: 18M resident, 11M data, 0B linkedit.
MemRegions: 67159 total, 2828M resident, 84M private, 474M shared.
PhysMem: 7995M used (947M wired), 195M unused.
VM: 588G vsize, 1063M framework vsize, 0(0) swapins, 0(0) swapouts.
Networks: packets: 548917/738M in, 346529/28M out. Disks: 98321/3342M read, 61977/2324M written.
PID COMMAND %CPU TIME #TH #WQ #PORT MEM PURG CMPRS PGRP PPID STATE
2539 mad.img 98.9 00:52.51 1/1 0 9 6628K 0B 0B 2539 647 running
LING is no more supported in MAD. Sorry.
https://gist.github.com/m-2k/64c927d29d336cf6d0ed