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

Release/Compilation issue in linux #23

Open
sescobb27 opened this issue Apr 9, 2016 · 9 comments
Open

Release/Compilation issue in linux #23

sescobb27 opened this issue Apr 9, 2016 · 9 comments

Comments

@sescobb27
Copy link

Hi, i was trying to use jiffy with the example you provide in the readme but i had some issues with it, first of all, it compiles but it didn't include it in the release, so when i run rebar3 shell it worked but it didn't with

$ reba3 release
$ _build/default/rel/ec_api/bin/ec_api console

running jiffy:decode(<<"{\"foo\": \"bar\"}">>). throws ** exception error: undefined function jiffy:decode/1
there is a related discussion going on in davisp/jiffy#118 about this because it seems to work in mac davisp/jiffy#118 (comment) but not in linux, so i think the issue should go here. thanks

@tsloughter
Copy link
Collaborator

That error message is saying you didn't include jiffy in your release. This isn't a port compiler bug. You must depend on jiffy in your .app.src file or list it in the list of application to include in the release in the relx config entry.

@sescobb27
Copy link
Author

thanks for your fast reply,
i'm just learning erlang but i thing jiffy isn't an otp application so i don't think it should go there, i tried with https://github.com/sile/jsone and worked perfectly without adding it to my .app.src, also it seems to work on mac but don't on linux as shown here that's why i thought the issue should be here.
thanks.

@tsloughter
Copy link
Collaborator

jiffy is an otp application.

@sescobb27
Copy link
Author

this is what i get adding it to my .app.src

{error_logger,{{2016,4,9},{12,16,3}},crash_report,[[{initial_call,{supervisor,kernel,['Argument__1']}},{pid,<0.246.0>},{registered_name,[]},{error_info,{exit,{on_load_function_failed,jiffy},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,352}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}},{ancestors,[kernel_sup,<0.220.0>]},{messages,[]},{links,[<0.221.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,376},{stack_size,27},{reductions,117}],[]]}
{error_logger,{{2016,4,9},{12,16,3}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,{on_load_function_failed,jiffy}},{offender,[{pid,undefined},{id,kernel_safe_sup},{mfargs,{supervisor,start_link,[{local,kernel_safe_sup},kernel,safe]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]}
{error_logger,{{2016,4,9},{12,16,4}},crash_report,[[{initial_call,{application_master,init,['Argument__1','Argument__2','Argument__3','Argument__4']}},{pid,<0.219.0>},{registered_name,[]},{error_info,{exit,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,jiffy}}},{kernel,start,[normal,[]]}},[{application_master,init,4,[{file,"application_master.erl"},{line,134}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}},{ancestors,[<0.218.0>]},{messages,[{'EXIT',<0.220.0>,normal}]},{links,[<0.218.0>,<0.217.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,376},{stack_size,27},{reductions,117}],[]]}
{error_logger,{{2016,4,9},{12,16,4}},std_info,[{application,kernel},{exited,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,jiffy}}},{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,jiffy}}},{kernel,start,[normal,[]]}}}"}

@tsloughter
Copy link
Collaborator

What is in _build/default/rel/ec_api/lib/jiffy/priv/?

@sescobb27
Copy link
Author

nothing
image

@ghost
Copy link

ghost commented Sep 4, 2016

What's the status here?

@sescobb27
Copy link
Author

we are using jsone right now, I think we can close it given that it seems anyone has the same issue

@ogolosovskiy
Copy link

I see the same problem
This solves the problem - https://github.com/blt/port_compiler#use-with-existing-dependency

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