Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't compiles spec for xmpp #13

Closed
loguntsov opened this issue May 8, 2017 · 20 comments
Closed

Don't compiles spec for xmpp #13

loguntsov opened this issue May 8, 2017 · 20 comments
Assignees
Labels

Comments

@loguntsov
Copy link

I tries compile xmpp_codec.spec manually.
So i just changed this file to add one new empty line.
After that i ran: make spec
And got:

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"}, {hrl_dir, "include"}]) of ok -> halt(0); _ -> halt(1) end.'
failed to compile "specs/xmpp_codec.spec": {'EXIT',
                                            {{badmap,
                                              {dict,1,16,16,8,80,48,
                                               {[],[],[],[],[],[],[],[],[],[],
                                                [],[],[],[],[],[]},
                                               {{[],[],[],[],[],[],[],[],[],
                                                 [[{opaque,xmlel,[]}|
                                                   {{fxml,1,2,[]},type}]],
                                                 [],[],[],[],[],[]}}}},
                                             [{maps,filter,
                                               [#Fun<erl_types.11.61440706>,
                                                {dict,1,16,16,8,80,48,
                                                 {[],[],[],[],[],[],[],[],[],
                                                  [],[],[],[],[],[],[]},
                                                 {{[],[],[],[],[],[],[],[],[],
                                                   [[{opaque,xmlel,[]}|
                                                     {{fxml,1,2,[]},type}]],
                                                   [],[],[],[],[],[]}}}],
                                               [{file,"maps.erl"},{line,205}]},
                                              {erl_types,
                                               t_opaque_from_records,1,
                                               [{file,"erl_types.erl"},
                                                {line,770}]},
                                              {fxml_gen,t_remote,2,
                                               [{file,"src/fxml_gen.erl"},
                                                {line,2744}]},
                                              {fxml_gen,get_label_type,5,
                                               [{file,"src/fxml_gen.erl"},
                                                {line,2192}]},
                                              {fxml_gen,
                                               '-get_types/3-fun-0-',5,
                                               [{file,"src/fxml_gen.erl"},
                                                {line,2160}]},
                                              {lists,map,2,
                                               [{file,"lists.erl"},
                                                {line,1239}]},
                                              {fxml_gen,
                                               '-get_types/3-fun-1-',5,
                                               [{file,"src/fxml_gen.erl"},
                                                {line,2158}]},
                                              {lists,foldl,3,
                                               [{file,"lists.erl"},
                                                {line,1263}]}]}}

Erlang is:
Erlang/OTP 19 [erts-8.3] [source-d5c06c6] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

What is wrong ?

@loguntsov loguntsov changed the title Don't compile spec for xmpp Don't compiles spec for xmpp May 8, 2017
@zinid
Copy link
Contributor

zinid commented May 8, 2017

Gosh, seems like they changed erl_types API again in 19.3...
I will take a look ASAP.

@zinid zinid self-assigned this May 8, 2017
@zinid zinid added the bug label May 8, 2017
@loguntsov
Copy link
Author

loguntsov commented May 11, 2017

Hi.
What progress for this ?
How i can help you to fix this bug ?

@zinid
Copy link
Contributor

zinid commented May 11, 2017

I'm a bit busy on another tasks.
If you absolutely need to compile the spec, you can install 19.2 and compile it there. The generated code will work in 19.3 anyway.

@zhangcunxiang
Copy link

do you have spare time to this task ? I also have the bug with erlang 19.3,wish you take some time to fix the bug .

@weiss
Copy link
Member

weiss commented Jun 21, 2017

Compiling Erlang 19.2 is easy:

cd /tmp
curl -LO http://erlang.org/download/otp_src_19.2.tar.gz
tar -xzf otp_src_19.2.tar.gz
cd otp_src_19.2
./configure --without-termcap --disable-hipe --prefix=/opt/erlang-19.2
make
sudo make install
export PATH=/opt/erlang-19.2/bin ;# Before compiling the xmpp spec.

So I don't think this issue is urgent.

@loguntsov
Copy link
Author

See my comment: #9 (comment)
to automate building of extensions for xmpp

@loguntsov
Copy link
Author

loguntsov commented Jan 15, 2018

I tried compile specs again for erlang 19.3.5

I made:

$ git clone https://github.com/processone/xmpp.git
$ make
$ make spec

And got this:

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"}, {hrl_dir, "include"}]) of ok -> halt(0); _ -> halt(1) end.'
failed to compile "specs/xmpp_codec.spec": {'EXIT',
                                            {{badmap,
                                              {dict,1,16,16,8,80,48,
                                               {[],[],[],[],[],[],[],[],[],[],
                                                [],[],[],[],[],[]},
                                               {{[],[],[],[],[],[],[],[],[],
                                                 [[{opaque,xmlel,[]}|
                                                   {{fxml,1,2,[]},type}]],
                                                 [],[],[],[],[],[]}}}},
                                             [{maps,filter,
                                               [#Fun<erl_types.11.61440706>,
                                                {dict,1,16,16,8,80,48,
                                                 {[],[],[],[],[],[],[],[],[],
                                                  [],[],[],[],[],[],[]},
                                                 {{[],[],[],[],[],[],[],[],[],
                                                   [[{opaque,xmlel,[]}|
                                                     {{fxml,1,2,[]},type}]],
                                                   [],[],[],[],[],[]}}}],
                                               [{file,"maps.erl"},{line,205}]},
                                              {erl_types,
                                               t_opaque_from_records,1,
                                               [{file,"erl_types.erl"},
                                                {line,770}]},
                                              {fxml_gen,t_remote,2,
                                               [{file,"src/fxml_gen.erl"},
                                                {line,2827}]},
                                              {fxml_gen,get_label_type,5,
                                               [{file,"src/fxml_gen.erl"},
                                                {line,2275}]},
                                              {fxml_gen,
                                               '-get_types/3-fun-0-',5,
                                               [{file,"src/fxml_gen.erl"},
                                                {line,2243}]},
                                              {lists,map,2,
                                               [{file,"lists.erl"},
                                                {line,1239}]},
                                              {fxml_gen,
                                               '-get_types/3-fun-1-',5,
                                               [{file,"src/fxml_gen.erl"},
                                                {line,2241}]},
                                              {lists,foldl,3,
                                               [{file,"lists.erl"},
                                                {line,1263}]}]}}

So isse still not fixed for master.
So pls reopen it.

Erlang is:

$erl
Erlang/OTP 19 [erts-8.3.5] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

@zinid
Copy link
Contributor

zinid commented Jan 15, 2018

Works for me on 19.3

@loguntsov
Copy link
Author

So how i can localize problem ? any ideas ?

@loguntsov
Copy link
Author

Could you use same version of Erlang as me ?

@zinid
Copy link
Contributor

zinid commented Jan 15, 2018

Install newer Erlang?
Also, I'm not sure why you constantly recompile the spec: the generated code wouldn't be different.

@loguntsov
Copy link
Author

i have my own custom tags so i forced to recompile xmpp every time.

@zinid
Copy link
Contributor

zinid commented Jan 15, 2018

i have my own custom tags so i forced to recompile xmpp every time.

What for? The result will be the same.

@zinid
Copy link
Contributor

zinid commented Jan 15, 2018

It's supposed that you compile your spec only once, then forget about it for several years or so.

@loguntsov
Copy link
Author

you uses standard tags from XMPP, but i have my own tags. So i need recompile code every time when i adds new tags for specification.

by the way it works for
Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false]

@zinid
Copy link
Contributor

zinid commented Jan 15, 2018

So compile it on Erlang 20 and use the generated code on 19.3, what's the problem?

@zinid
Copy link
Contributor

zinid commented Jan 15, 2018

I'm really not going to install all possible Erlang versions to check every minor release (the API breaks even between minor releases) any time soon, I have more important tasks.

@loguntsov
Copy link
Author

I used esl-erlang installation named as 19.3.6, don't know why it showed as 19.3.5.
Could you check it with this version of erlang ?

@zinid
Copy link
Contributor

zinid commented Jan 15, 2018

We do not recommend using Erlang from Erlang Solutions, there are already 2 other issues detected when using it.

@loguntsov
Copy link
Author

Could you point me on some articles for this ? what issues detected ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants