<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Motiejus,</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div><a href="https://github.com/esl/parse_trans/tree/master/src">https://github.com/esl/parse_trans/tree/master/src</a></div><div><br></div><div>BR,</div><div>Ulf W</div><br><div><div>On 5 Aug 2011, at 08:35, Motiejus Jakštys wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hello list,<br><br>I encountered this problem and cannot solve it:<br><a href="http://erlang.org/pipermail/erlang-questions/2009-January/040926.html">http://erlang.org/pipermail/erlang-questions/2009-January/040926.html</a><br><br>My compilation fails like this:<br>$ erlc exprecs.erl <br>./exprecs.erl:249: Warning: regexp:split/2: the regexp module is deprecated (will be removed in R15A); use the re module instead<br>$ ls -lh<br>-rw-r--r-- 1 motiejus motiejus 14K 2011-08-05 09:31 exprecs.beam<br>-rwxr-xr-x 1 motiejus motiejus 22K 2011-08-05 09:04 exprecs.erl<br>-rw-r--r-- 1 motiejus motiejus 114 2011-08-05 09:30 struct_deserialize.erl<br>$ erlc -pa . struct_deserialize.erl <br>./struct_deserialize.erl:none: error in parse transform 'exprecs': {undef,<br>                                     [{parse_trans,top,<br>                                       [#Fun<exprecs.0.78264696>,<br>                                        [{attribute,1,file,<br>                                          {"./struct_deserialize.erl",1}},<br>                                         {attribute,1,module,<br>                                          struct_deserialize},<br>                                         {attribute,4,record,<br>                                          {a,<br>                                           [{record_field,4,{atom,4,b}},<br>                                            {record_field,4,{atom,4,c}},<br>                                            {record_field,4,{atom,4,d}}]}},<br>                                         {attribute,5,export_records,[a]},<br>                                         {eof,6}],<br>                                        [report_warnings,report_errors,<br>                                         {cwd,"/tmp/project/myapp/src"},<br>                                         {outdir,"/tmp/project/myapp/src"}]]},<br>                                      {compile,<br>                                       '-foldl_transform/2-anonymous-2-',2},<br>                                      {compile,foldl_transform,2},<br>                                      {compile,<br>                                       '-internal_comp/4-anonymous-1-',2},<br>                                      {compile,fold_comp,3},<br>                                      {compile,internal_comp,4},<br>                                      {compile,internal,3}]}<br>$ cat struct_deserialize.erl <br>-module(struct_deserialize).<br>-compile({parse_transform, exprecs}). <br><br>-record(a, {b, c, d}).<br>-export_records([a]).<br>motiejus:/tmp/project/myapp/src$ sha1sum exprecs.erl <br>e1a7992c3ee9fcf15675bef351c05f29efcf8201  exprecs.erl<br><br>exprecs.erl is from revision 24 from here:<br>http://svn.ulf.wiger.net/parse_trans/trunk/parse_trans/examples/exprecs.erl<br><br>Tried different compile parameters, with rebar and without it.<br>Any help appreciated.<br><br>Motiejus<br>_______________________________________________<br>erlang-questions mailing list<br>erlang-questions@erlang.org<br>http://erlang.org/mailman/listinfo/erlang-questions<br></div></blockquote></div><br><div>
<div>Ulf Wiger, CTO, Erlang Solutions, Ltd.</div><div><a href="http://erlang-solutions.com">http://erlang-solutions.com</a></div><div><br></div><br class="Apple-interchange-newline">
</div>
<br></body></html>