[erlang-questions] exprecs installation failure

Ulf Wiger <>
Fri Aug 5 08:47:02 CEST 2011


Hi Motiejus,

What the error report says is that it can't find the parse_trans module, which exprecs relies on. Your "-pa ." option seems to take care of finding exprecs.beam, but not parse_trans.beam.

In later versions of parse_trans, exprecs is in parse_trans/src, and you can even set your environment to find the parse_trans modules via ERL_LIBS.

https://github.com/esl/parse_trans/tree/master/src

BR,
Ulf W

On 5 Aug 2011, at 08:35, Motiejus Jakštys wrote:

> Hello list,
> 
> I encountered this problem and cannot solve it:
> http://erlang.org/pipermail/erlang-questions/2009-January/040926.html
> 
> My compilation fails like this:
> $ erlc exprecs.erl 
> ./exprecs.erl:249: Warning: regexp:split/2: the regexp module is deprecated (will be removed in R15A); use the re module instead
> $ ls -lh
> -rw-r--r-- 1 motiejus motiejus 14K 2011-08-05 09:31 exprecs.beam
> -rwxr-xr-x 1 motiejus motiejus 22K 2011-08-05 09:04 exprecs.erl
> -rw-r--r-- 1 motiejus motiejus 114 2011-08-05 09:30 struct_deserialize.erl
> $ erlc -pa . struct_deserialize.erl 
> ./struct_deserialize.erl:none: error in parse transform 'exprecs': {undef,
>                                     [{parse_trans,top,
>                                       [#Fun<exprecs.0.78264696>,
>                                        [{attribute,1,file,
>                                          {"./struct_deserialize.erl",1}},
>                                         {attribute,1,module,
>                                          struct_deserialize},
>                                         {attribute,4,record,
>                                          {a,
>                                           [{record_field,4,{atom,4,b}},
>                                            {record_field,4,{atom,4,c}},
>                                            {record_field,4,{atom,4,d}}]}},
>                                         {attribute,5,export_records,[a]},
>                                         {eof,6}],
>                                        [report_warnings,report_errors,
>                                         {cwd,"/tmp/project/myapp/src"},
>                                         {outdir,"/tmp/project/myapp/src"}]]},
>                                      {compile,
>                                       '-foldl_transform/2-anonymous-2-',2},
>                                      {compile,foldl_transform,2},
>                                      {compile,
>                                       '-internal_comp/4-anonymous-1-',2},
>                                      {compile,fold_comp,3},
>                                      {compile,internal_comp,4},
>                                      {compile,internal,3}]}
> $ cat struct_deserialize.erl 
> -module(struct_deserialize).
> -compile({parse_transform, exprecs}). 
> 
> -record(a, {b, c, d}).
> -export_records([a]).
> motiejus:/tmp/project/myapp/src$ sha1sum exprecs.erl 
> e1a7992c3ee9fcf15675bef351c05f29efcf8201  exprecs.erl
> 
> exprecs.erl is from revision 24 from here:
> http://svn.ulf.wiger.net/parse_trans/trunk/parse_trans/examples/exprecs.erl
> 
> Tried different compile parameters, with rebar and without it.
> Any help appreciated.
> 
> Motiejus
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions

Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110805/b5f6994d/attachment.html>


More information about the erlang-questions mailing list