processone / xmpp

Erlang/Elixir XMPP parsing and serialization library on top of Fast XML
http://process-one.net
Apache License 2.0
137 stars 88 forks source link

Error make spec #83

Closed venkateshcontus closed 7 months ago

venkateshcontus commented 8 months ago

Hi, I have tried (tag 1.8.1) to run make spec in my local. it throws the below error.

user@contus:/var/opt/ejabberd-24.02/deps/xmpp$ make spec erl -noinput +B -pa ebin -pa deps/*/ebin -eval \ 'case fxml_gen:compile("specs/xmpp_codec.spec", [{add_type_specs, xmpp_element}, {erl_dir, "src"}, {hrldir, "include"}]) of ok -> halt(0); -> halt(1) end.' failed to compile "specs/xmpp_codec.spec": {'EXIT', {function_clause, [{erl_types,initial_typenames, [{type,{mod,foo,1},"mod.erl"}], [{file,"erl_types.erl"}, {line,4579}]}, {erl_types,t_from_form1,6, [{file,"erl_types.erl"}, {line,4559}]}, {fxml_gen,t_from_form,1, [{file,"src/fxml_gen.erl"}, {line,4173}]}, {fxml_gen,get_fun_return_type, 3, [{file,"src/fxml_gen.erl"}, {line,3504}]}, {fxml_gen,prepare_default,4, [{file,"src/fxml_gen.erl"}, {line,3758}]}, {fxml_gen,prepare_cdata,5, [{file,"src/fxml_gen.erl"}, {line,3802}]}, {fxml_gen,prepare_elem,6, [{file,"src/fxml_gen.erl"}, {line,3720}]}, {fxml_gen,'-compile/4-fun-4-', 6, [{file,"src/fxml_gen.erl"}, {line,336}]}]}} make: *** [Makefile:26: spec] Error 1

badlop commented 8 months ago

What Erlang version are you using?

It should work with all Erlang from 20 up to 27. But right now it is only being tested with Erlang 25.3...

There was a bug that break "make spec" with Erlang 26, which was already fixed, see https://github.com/processone/xmpp/issues/74

Maybe there is some other problem in xmpp with the erlang version you are using.

venkateshcontus commented 8 months ago

we are using Erlang/OTP 24 [erts-12.3.2.16] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit].

but the same erlang version works in docker build

I just clone https://github.com/processone/xmpp 1.8.1 and run the xmpp spec I got the same result.

prefiks commented 8 months ago

Possibly it's using older version of fxml installed in a system?

venkateshcontus commented 8 months ago

@prefiks Thanks for you prompt reply. reinstall my erlang version it works.