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

Error occurred when installing Emysql #189

Open
linrl3 opened this issue Jul 13, 2018 · 2 comments
Open

Error occurred when installing Emysql #189

linrl3 opened this issue Jul 13, 2018 · 2 comments

Comments

@linrl3
Copy link

linrl3 commented Jul 13, 2018

When I run "make" inside Emysql, the error occured:
(My erlang version is 21)

Generating "include/crypto_compat.hrl" ...
...supports cryto:hash/2
...no changes needed to "include/crypto_compat.hrl". Skipping writing new file
(cd src;/Applications/Xcode.app/Contents/Developer/usr/bin/make)
erlc -W -I ../include  +nowarn_deprecated_type +debug_info -o ../ebin emysql.erl
/Users/linrl3/Desktop/Emysql/src/../include/emysql.hrl:38: type gb_tree() undefined
/Users/linrl3/Desktop/Emysql/src/../include/emysql.hrl:39: type queue() undefined
emysql.erl:672: type dict() undefined
make[1]: *** [../ebin/emysql.beam] Error 1
make: *** [all] Error 2

Does anyone know how to solve the problem? It seems that it's about type definition.

@qingchuwudi
Copy link

qingchuwudi commented Jul 13, 2018

emysql.erl and rebar.config for reference

{erl_opts, [
        {platform_define, "^([1-9][0-9][0-9].*?)|([2-9][0-9].*?)|(1[8-9])", namespaced_types},
        ... ...
]}.
-export_type([
         t_gb_tree/0,
         t_queue/0,
         t_dict/0
]).

-ifdef(namespaced_types).
-type t_gb_tree() :: gb_trees:tree().
-type t_queue() :: queue:queue().
-type t_dict() :: dict:dict().
-else.
-type t_gb_tree() :: gb_tree().
-type t_queue() :: queue().
-type t_dict() :: dict().
-endif.

@tmcgilchrist
Copy link

tmcgilchrist commented Jul 13, 2018

The issue is with Erlang/OTP 18.0 and it changing where dict() as a type comes from.
Changing it to dict:dict() should fix the issue.

See basho/riak_pb#128 for some context.

EDIT
Also this pr #169

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

No branches or pull requests

3 participants