eproxus / meck

A mocking library for Erlang
http://eproxus.github.io/meck
Apache License 2.0
813 stars 231 forks source link

internal error in parse_module #115

Closed bsingh closed 10 years ago

bsingh commented 10 years ago

Hi there,

I get compile error when meck is used as one of the dependecy under another project OpenACD. Can you please check ?

Here is full snapshot from make :

[root@attu OpenACD_2]# make ./rebar get-deps update-deps ==> Entering directory /opt/openacd/OpenACD_2/deps/meck' ==> meck (get-deps) ==> Leaving directory/opt/openacd/OpenACD_2/deps/meck' ==> Entering directory /opt/openacd/OpenACD_2/deps/protobuffs' ==> protobuffs (get-deps) ==> Leaving directory/opt/openacd/OpenACD_2/deps/protobuffs' ==> Entering directory /opt/openacd/OpenACD_2/deps/errd' ==> errd (get-deps) ==> Leaving directory/opt/openacd/OpenACD_2/deps/errd' ==> Entering directory /opt/openacd/OpenACD_2/deps/gen_smtp' ==> gen_smtp (get-deps) ==> Leaving directory/opt/openacd/OpenACD_2/deps/gen_smtp' ==> Entering directory /opt/openacd/OpenACD_2/deps/gen_leader' ==> gen_leader (get-deps) ==> Leaving directory/opt/openacd/OpenACD_2/deps/gen_leader' ==> Entering directory /opt/openacd/OpenACD_2/deps/mochiweb' ==> mochiweb (get-deps) ==> Leaving directory/opt/openacd/OpenACD_2/deps/mochiweb' ==> Entering directory /opt/openacd/OpenACD_2/deps/gen_server_mock' ==> gen_server_mock (get-deps) ==> Leaving directory/opt/openacd/OpenACD_2/deps/gen_server_mock' ==> Entering directory `/opt/openacd/OpenACD_2/deps/iconv' WARNING: deprecated port_envs option used Option 'port_envs' has been deprecated in favor of 'port_env'. 'port_envs' will be removed soon.

==> iconv (get-deps) ==> Leaving directory /opt/openacd/OpenACD_2/deps/iconv' ==> Entering directory/opt/openacd/OpenACD_2/deps/netstring' ==> netstring (get-deps) ==> Leaving directory /opt/openacd/OpenACD_2/deps/netstring' ==> Entering directory/opt/openacd/OpenACD_2/include_apps/oacd_freeswitch' ==> oacd_freeswitch (get-deps) ==> Leaving directory /opt/openacd/OpenACD_2/include_apps/oacd_freeswitch' ==> Entering directory/opt/openacd/OpenACD_2/include_apps/oacd_dummy' ==> oacd_dummy (get-deps) ==> Leaving directory /opt/openacd/OpenACD_2/include_apps/oacd_dummy' ==> Entering directory/opt/openacd/OpenACD_2/rel' ==> rel (get-deps) ==> Leaving directory /opt/openacd/OpenACD_2/rel' ==> OpenACD_2 (get-deps) Updating submodules... fatal: reference is not a tree: 28016796d6cb450d4b46996196d6a79828963440 fatal: reference is not a tree: 23cecd50967a1f4705d363090d0be6a53755eaeb fatal: reference is not a tree: 482adbe95eea5949021f13774aeaa061fea47dd8 fatal: reference is not a tree: fcf75df1d097e7db6f868e03d561bd966d1c2094 Unable to checkout '28016796d6cb450d4b46996196d6a79828963440' in submodule path 'contrib/dojo/dijit' Unable to checkout '23cecd50967a1f4705d363090d0be6a53755eaeb' in submodule path 'contrib/dojo/dojo' Unable to checkout '482adbe95eea5949021f13774aeaa061fea47dd8' in submodule path 'contrib/dojo/dojox' Unable to checkout 'fcf75df1d097e7db6f868e03d561bd966d1c2094' in submodule path 'contrib/dojo/util' /opt/openacd/OpenACD_2 ==> Entering directory/opt/openacd/OpenACD_2/deps/meck' ==> meck (update-deps) ==> Leaving directory /opt/openacd/OpenACD_2/deps/meck' ==> Entering directory/opt/openacd/OpenACD_2/deps/protobuffs' ==> protobuffs (update-deps) Updating meck from {git,"https://github.com/eproxus/meck.git", {branch,"master"}} ==> Leaving directory /opt/openacd/OpenACD_2/deps/protobuffs' ==> Entering directory/opt/openacd/OpenACD_2/deps/errd' ==> errd (update-deps) ==> Leaving directory /opt/openacd/OpenACD_2/deps/errd' ==> Entering directory/opt/openacd/OpenACD_2/deps/gen_smtp' ==> gen_smtp (update-deps) ==> Leaving directory /opt/openacd/OpenACD_2/deps/gen_smtp' ==> Entering directory/opt/openacd/OpenACD_2/deps/gen_leader' ==> gen_leader (update-deps) ==> Leaving directory /opt/openacd/OpenACD_2/deps/gen_leader' ==> Entering directory/opt/openacd/OpenACD_2/deps/mochiweb' ==> mochiweb (update-deps) ==> Leaving directory /opt/openacd/OpenACD_2/deps/mochiweb' ==> Entering directory/opt/openacd/OpenACD_2/deps/gen_server_mock' ==> gen_server_mock (update-deps) Updating gen_leader from {git,"https://github.com/Vagabond/gen_leader_revival.git", "master"} ==> Leaving directory /opt/openacd/OpenACD_2/deps/gen_server_mock' ==> Entering directory/opt/openacd/OpenACD_2/deps/iconv' WARNING: deprecated port_envs option used Option 'port_envs' has been deprecated in favor of 'port_env'. 'port_envs' will be removed soon.

==> iconv (update-deps) ==> Leaving directory /opt/openacd/OpenACD_2/deps/iconv' ==> Entering directory/opt/openacd/OpenACD_2/deps/netstring' ==> netstring (update-deps) ==> Leaving directory /opt/openacd/OpenACD_2/deps/netstring' ==> Entering directory/opt/openacd/OpenACD_2/include_apps/oacd_freeswitch' ==> oacd_freeswitch (update-deps) ==> Leaving directory /opt/openacd/OpenACD_2/include_apps/oacd_freeswitch' ==> Entering directory/opt/openacd/OpenACD_2/include_apps/oacd_dummy' ==> oacd_dummy (update-deps) ==> Leaving directory /opt/openacd/OpenACD_2/include_apps/oacd_dummy' ==> Entering directory/opt/openacd/OpenACD_2/rel' ==> rel (update-deps) ==> Leaving directory /opt/openacd/OpenACD_2/rel' ==> OpenACD_2 (update-deps) Updating meck from {git,"git://github.com/eproxus/meck.git","master"} Updating protobuffs from {git,"http://github.com/jvliwanag/erlang_protobuffs.git", "master"} Updating errd from {git,"https://github.com/dannaaduna/errd.git","master"} Updating gen_smtp from {git,"https://github.com/Vagabond/gen_smtp.git", {tag,"0558786233ca152064770d3d6848e7ae3745f8a1"}} Updating gen_leader from {git,"https://github.com/dannaaduna/gen_leader_revival.git", "master"} Updating mochiweb from {git,"http://github.com/mochi/mochiweb.git", {tag,"v2.3.0"}} Updating gen_server_mock from {git,"http://github.com/lordnull/gen_server_mock.git", {branch,"master"}} Updating iconv from {git,"https://github.com/OpenACD/erlang-iconv.git", {branch,"R15B"}} Updating netstring from {git,"https://github.com/lordnull/erlnetstr.git", {branch,"master"}} mkdir -p ./ebin ./rebar compile generate force=1 ==> Entering directory/opt/openacd/OpenACD_2/deps/meck' ==> meck (compile) src/meck_util.erl:none: internal error in parse_module; crash reason: {undef,[{epp,read_encoding,["src/meck_util.erl"],[]}, {compile,parse_module,1, [{file,"compile.erl"},{line,782}]}, {compile,'-internal_comp/4-anonymous-1-',2, [{file,"compile.erl"},{line,276}]}, {compile,fold_comp,3,[{file,"compile.erl"},{line,294}]}, {compile,internal_comp,4, [{file,"compile.erl"},{line,278}]}, {compile,'-do_compile/2-anonymous-0-',2, [{file,"compile.erl"},{line,152}]}]} make: *\ [compile] Error 1

eproxus commented 10 years ago

I suspect you have a broken / customized OTP installation which is missing the epp module. Can you confirm this? It should exist in the stdlib application (epp.beam in lib/stdblib-X.XX.X/ebin in your Erlang installation).

bsingh commented 10 years ago

Hi,

Thanks for quick response. It's customized OTP installation but I verified epp module does exist & have proper permissions. Here are several paths : /usr/local/lib/erlang/lib/stdlib-1.17.2/ebin/epp.beam /usr/local/lib/erlang/lib/stdlib-1.17.4/ebin/epp.beam /usr/local/lib/erlang/lib/stdlib-1.18.2/ebin/epp.beam /usr/local/lib/erlang/lib/stdlib-1.18.3/ebin/epp.beam /usr/local/lib/erlang/lib/stdlib-1.19.1/ebin/epp.beam

Most likey it is not looking for proper path ? Can you please help on how to troubleshoot this ?

Thanks

eproxus commented 10 years ago

Could you try running l(epp) in a shell representing the relevant environment? Alternatively, put a code:ensure_loaded(epp) and check the result, somewhere before the error is triggered.

You can also check that code:get_path() returns the relevant paths mentioned above.

eproxus commented 10 years ago

Closing because of inactivity. Please re-open if it is still an issue.