bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-apl] erlang APL NIF


From: Rowan Cannaday
Subject: [Bug-apl] erlang APL NIF
Date: Tue, 4 Jun 2019 11:00:47 -0400

Hello again,

Trying out the erlang/APL interface (its building now!), running into
a few issues.

BTW I'm pretty new to FOSS mailing lists so if in the future you'd
prefer I'd start these as different threads, or use a different syntax
for distinguishing shell output just let me know.

First issue:
```
ldd /usr/local/lib/apl/erlang_APL_nif.so
    libapl.so => not found
```
I fixed by adding "/usr/local/lib/apl" to my LD_LIBRARY_PATH.

2nd issue:
```
1> apl:init().
load called.
Executable /usr/lib/erlang/erts-10.2.4/bin/APs/APserver not found.
                                                                  This
could means that 'apl' was not installed ('make install') or that it
                                                                  was
started in a non-standard way. The expected location of APserver is

either the same directory as the binary 'apl' or the subdirectory
'APs' of
                                                                  that
directory (the directory should also be in $PATH).
                                                libapl initialized.
ok
2>
```

This seems related to the following previous bug report:
SVN 595
https://lists.gnu.org/archive/html/bug-apl/2015-04/msg00032.html
The function still returns 'OK'.

Third Issue (including entire session for context):
```
PATH=$PATH:/usr/local/bin:/usr/local/lib/apl
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/apl erl
Erlang/OTP 21 [erts-10.2.4] [source] [64-bit] [smp:4:4] [ds:4:4:10]
[async-threads:1]

Eshell V10.2.4  (abort with ^G)
1> c("/usr/local/lib/apl/apl").
{ok,apl}
2> apl:init().
load called.
Executable /usr/lib/erlang/erts-10.2.4/bin/APs/APserver not found.
                                                                  This
could means that 'apl' was not installed ('make install') or that it
                                                                  was
started in a non-standard way. The expected location of APserver is

either the same directory as the binary 'apl' or the subdirectory
'APs' of
                                                                  that
directory (the directory should also be in $PATH).
                                                libapl initialized.
ok
3> apl:statement("1 2 3 + 4 5 6").
5 7 9
[{value,[3],[5,7,9]}]
4> apl:statement("(1 2 3)∘.+(1 2 3)").
2 3 4
3 4 5
4 5 6
[{value,[3,3],[2,3,4,3,4,5,4,5,6]}]
5> apl:statement("∘.,/(1 2)(1 2)").
Segmentation fault
```

And the output of `strings apl.beam`:
```
FOR1
        pBEAMAtU8
init
erlang
load_nif
command_utf8
command_utf8__not_loaded
exit
command_ucs
command_ucs__not_loaded
statement_utf8
statement_utf8__not_loaded
statement_ucs
statement_ucs__not_loaded
fix_function_ucs
fix_function_ucs__not_loaded
set_variable
set_variable___not_loaded
eval_mux
eval_mux__not_loaded
eval_
eval_B
eval_AB
eval_XB
eval_AXB
eval_LB
eval_ALB
eval_LXB        eval_ALXB
eval_LRB        eval_ALRB       eval_LRXB
eval_ALRXB
true
false
length
value
lists
foldl
reverse
error
Invalid eterm
command statement
module_info
get_module_info
-e2a/1-fun-0-
Code
@address@hidden@
@#3@
@1C@
@QC@
@address@hidden@
 @#3@
@qC@
&@#3@
(@#3@
F0#G
address@hidden
F0#G
StrT
ImpT
ExpT
FunT
]LitT
c```f``Pm
`Na`-K
LocT
BAttr
vsnl
C3jjCInf
versionk
7.3.1h
optionsjh
sourcek
/usr/local/lib/apl/apl.erljDbgi
debug_info_v1d
erl_abstract_codeh
nonej
Line
        '       +       ,       -       .       /       0       1
 56       7       8       9       :       ;       <       =       >
   ?@       A       E       I       O       T       W       X       S
/usr/local/lib/apl/apl.erl
```

It doesn't seem to be producing a core dump, haven't figured out why yet.

Thanks y'all.
Let me know how I can help!

- Rowan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]