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

Improve section of readme that covers dependencies #21

Closed
Stratus3D opened this issue Jan 25, 2017 · 11 comments
Closed

Improve section of readme that covers dependencies #21

Stratus3D opened this issue Jan 25, 2017 · 11 comments

Comments

@Stratus3D
Copy link
Member

We explain how to install everything on Debian but don't cover RedHat/CentOS or OSX. I'd like to see dependency installation instructions for each OS we support.

Perhaps other OSs aren't supported, but I've been using asdf-erlang on OSX for some time now and haven't had any issues.

@st23am
Copy link

st23am commented Mar 8, 2017

I'm getting compile errors on OSX 10.12.3 Is there some other OSX dependencies I need?

beam/erl_bif_port.c:1375:55: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
                    if (type == TCP_PB_LINE_LF && val >= 0 && val <= 255) {
                                                  ~~~ ^  ~
1 warning generated.
 CC	obj/x86_64-apple-darwin16.4.0/opt/smp/erl_term.o
 CC	obj/x86_64-apple-darwin16.4.0/opt/smp/erl_node_tables.o
 CC	obj/x86_64-apple-darwin16.4.0/opt/smp/erl_monitors.o
 CC	obj/x86_64-apple-darwin16.4.0/opt/smp/erl_process_dump.o
 CC	obj/x86_64-apple-darwin16.4.0/opt/smp/erl_hl_timer.o
 CC	obj/x86_64-apple-darwin16.4.0/opt/smp/erl_cpu_topology.o
 CC	obj/x86_64-apple-darwin16.4.0/opt/smp/erl_drv_thread.o
 CC	obj/x86_64-apple-darwin16.4.0/opt/smp/erl_bif_chksum.o
 CC	obj/x86_64-apple-darwin16.4.0/opt/smp/erl_bif_re.o
beam/erl_bif_re.c:69:5: error: use of undeclared identifier 'erts_pcre_malloc'; did you mean 'pcre_malloc'?
    erts_pcre_malloc = &erts_erts_pcre_malloc;
    ^~~~~~~~~~~~~~~~
    pcre_malloc
/opt/boxen/homebrew/include/pcre.h:489:23: note: 'pcre_malloc' declared here
PCRE_EXP_DECL void *(*pcre_malloc)(size_t);
                      ^
beam/erl_bif_re.c:70:5: error: use of undeclared identifier 'erts_pcre_free'
    erts_pcre_free = &erts_erts_pcre_free;
    ^
beam/erl_bif_re.c:71:5: error: use of undeclared identifier 'erts_pcre_stack_malloc'; did you mean 'pcre_stack_malloc'?
    erts_pcre_stack_malloc = &erts_erts_pcre_stack_malloc;
    ^~~~~~~~~~~~~~~~~~~~~~
    pcre_stack_malloc
/opt/boxen/homebrew/include/pcre.h:491:23: note: 'pcre_stack_malloc' declared here
PCRE_EXP_DECL void *(*pcre_stack_malloc)(size_t);
                      ^
beam/erl_bif_re.c:72:5: error: use of undeclared identifier 'erts_pcre_stack_free'; did you mean 'pcre_stack_free'?
    erts_pcre_stack_free = &erts_erts_pcre_stack_free;
    ^~~~~~~~~~~~~~~~~~~~
    pcre_stack_free
/opt/boxen/homebrew/include/pcre.h:492:23: note: 'pcre_stack_free' declared here
PCRE_EXP_DECL void  (*pcre_stack_free)(void *);
                      ^
beam/erl_bif_re.c:454:2: warning: implicit declaration of function 'erts_pcre_fullinfo' is invalid in C99 [-Wimplicit-function-declaration]
        erts_pcre_fullinfo(result, NULL, PCRE_INFO_SIZE, &pattern_size);
        ^
beam/erl_bif_re.c:465:2: warning: implicit declaration of function 'erts_pcre_free' is invalid in C99 [-Wimplicit-function-declaration]
        erts_pcre_free(result);
        ^
beam/erl_bif_re.c:525:14: warning: implicit declaration of function 'erts_pcre_compile2' is invalid in C99 [-Wimplicit-function-declaration]
    result = erts_pcre_compile2(expr, options, &errcode,
             ^
beam/erl_bif_re.c:525:12: warning: incompatible integer to pointer conversion assigning to 'pcre *' (aka 'struct real_pcre *') from 'int' [-Wint-conversion]
    result = erts_pcre_compile2(expr, options, &errcode,
           ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
beam/erl_bif_re.c:567:5: error: unknown type name 'erts_pcre_extra'; did you mean 'pcre_extra'?
    erts_pcre_extra extra;
    ^~~~~~~~~~~~~~~
    pcre_extra
/opt/boxen/homebrew/include/pcre.h:385:3: note: 'pcre_extra' declared here
} pcre_extra;
  ^
beam/erl_bif_re.c:582:2: warning: implicit declaration of function 'erts_pcre_free_restart_data' is invalid in C99 [-Wimplicit-function-declaration]
        erts_pcre_free_restart_data(rc->restart_data);
        ^
beam/erl_bif_re.c:848:14: warning: implicit declaration of function 'erts_pcre_get_stringtable_entries' is invalid in C99 [-Wimplicit-function-declaration]
        int esize = erts_pcre_get_stringtable_entries(code,name,&first,&last);
                    ^
beam/erl_bif_re.c:872:31: warning: implicit declaration of function 'erts_pcre_get_stringnumber' is invalid in C99 [-Wimplicit-function-declaration]
        if ((r->v[r->num_spec - 1] = erts_pcre_get_stringnumber(code,name)) ==
                                     ^
beam/erl_bif_re.c:1123:13: warning: incompatible integer to pointer conversion assigning to 'pcre *' (aka 'struct real_pcre *') from 'int' [-Wint-conversion]
            result = erts_pcre_compile2(expr, comp_options, &errcode,
                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
beam/erl_bif_re.c:1213:47: error: use of undeclared identifier 'PCRE_EXTRA_LOOP_LIMIT'
    restart.extra.flags = PCRE_EXTRA_TABLES | PCRE_EXTRA_LOOP_LIMIT;
                                              ^
beam/erl_bif_re.c:1215:19: error: no member named 'loop_limit' in 'struct pcre_extra'
    restart.extra.loop_limit = ERTS_BIF_REDS_LEFT(p) * LOOP_FACTOR;
    ~~~~~~~~~~~~~ ^
beam/erl_bif_re.c:1218:23: error: no member named 'loop_limit' in 'struct pcre_extra'
    if (restart.extra.loop_limit > loop_limit_tmp) {
        ~~~~~~~~~~~~~ ^
beam/erl_bif_re.c:1219:16: error: no member named 'loop_limit' in 'struct pcre_extra'
        restart.extra.loop_limit = loop_limit_tmp;
        ~~~~~~~~~~~~~ ^
beam/erl_bif_re.c:1222:19: error: no member named 'restart_data' in 'struct pcre_extra'
    restart.extra.restart_data = &restart.restart_data;
    ~~~~~~~~~~~~~ ^
beam/erl_bif_re.c:1223:19: error: no member named 'restart_flags' in 'struct pcre_extra'
    restart.extra.restart_flags = 0;
    ~~~~~~~~~~~~~ ^
beam/erl_bif_re.c:1224:19: error: no member named 'loop_counter_return' in 'struct pcre_extra'
    restart.extra.loop_counter_return = &loop_count;
    ~~~~~~~~~~~~~ ^
beam/erl_bif_re.c:1300:10: warning: implicit declaration of function 'erts_pcre_exec' is invalid in C99 [-Wimplicit-function-declaration]
    rc = erts_pcre_exec(restart.code, &(restart.extra), restart.subject,
         ^
beam/erl_bif_re.c:1311:15: error: use of undeclared identifier 'PCRE_ERROR_LOOP_LIMIT'
    if (rc == PCRE_ERROR_LOOP_LIMIT) {
              ^
beam/erl_bif_re.c:1372:21: error: no member named 'loop_limit' in 'struct pcre_extra'
    restartp->extra.loop_limit = ERTS_BIF_REDS_LEFT(BIF_P) * LOOP_FACTOR;
    ~~~~~~~~~~~~~~~ ^
beam/erl_bif_re.c:1375:25: error: no member named 'loop_limit' in 'struct pcre_extra'
    if (restartp->extra.loop_limit > loop_limit_tmp) {
        ~~~~~~~~~~~~~~~ ^
beam/erl_bif_re.c:1376:18: error: no member named 'loop_limit' in 'struct pcre_extra'
        restartp->extra.loop_limit = loop_limit_tmp;
        ~~~~~~~~~~~~~~~ ^
beam/erl_bif_re.c:1378:21: error: no member named 'loop_counter_return' in 'struct pcre_extra'
    restartp->extra.loop_counter_return = &loop_count;
    ~~~~~~~~~~~~~~~ ^
beam/erl_bif_re.c:1379:21: error: no member named 'restart_data' in 'struct pcre_extra'
    restartp->extra.restart_data = &restartp->restart_data;
    ~~~~~~~~~~~~~~~ ^
beam/erl_bif_re.c:1380:21: error: no member named 'restart_flags' in 'struct pcre_extra'
    restartp->extra.restart_flags = 0;
    ~~~~~~~~~~~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
9 warnings and 20 errors generated.
make[3]: *** [obj/x86_64-apple-darwin16.4.0/opt/smp/erl_bif_re.o] Error 1
make[2]: *** [opt] Error 2
make[1]: *** [smp] Error 2
make: *** [emulator] Error 2

@Stratus3D
Copy link
Member Author

@st23am I'm not familiar with that exact error, but from what I have in my notes wxmac and openssl must be installed on OSX. I've also run into issues with grep. Unsetting custom grep options seems to resolve the grep related issues:

unalias grep
export GREP_OPTIONS=""
export GREP_COLOR=""
export GREP_COLORS=""

Are you using any special options when installing Erlang? And what version are you trying to install?

@Stratus3D
Copy link
Member Author

I discovered the readme is wrong when it lists for the Debian dependencies for WxWidget support. The README lists libwxgtk2.8-dev but libwxgtk3.0-dev is required for Debian Jessie.

@st23am
Copy link

st23am commented Jul 25, 2017

I wxmac and openssl installed and tried the grep fix.. I'm still getting errors with beam/erl_bif_re.c:69:5: error: use of undeclared identifier 'erts_pcre_malloc'; did you mean 'pcre_malloc'? erts_pcre_malloc = &erts_erts_pcre_malloc; ^~~~~~~~~~~~~~~~ pcre_malloc that eventually fail the build.

@st23am
Copy link

st23am commented Jul 25, 2017

Anyone else that has this error on OSX this was my issue https://stackoverflow.com/questions/19616891/error-when-installing-erlang

Homebrew installed pcre was conflicting w/ the built_in erlang_pcre library. I'm still getting build errors but I've moved past this one.

@HashNuke
Copy link
Member

HashNuke commented Jul 26, 2017

@st23am I installed wxmac and erlang 20.0 a couple days ago. Build was fine. No issues till now (could start observer too). All fine for you now?

[EDIT] I'm on OSX 10.12.5

@0xradical
Copy link

0xradical commented Jul 26, 2017

Hi @HashNuke I'm on OSX 10.11.6 and I'm having problems with the linker ... I'm not sure it has anything to do with dependencies though ... here's the output for asdf plugin-add for erlang 20.0

 LD	../priv/x86_64-apple-darwin15.6.0/wxe_driver.so
ld: in '/usr/local/lib/libcompression.dylib', file was built for i386 which is not the architecture being linked (x86_64): /usr/local/lib/libcompression.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [../priv/x86_64-apple-darwin15.6.0/wxe_driver.so] Error 1
make[2]: *** [opt] Error 2
make[1]: *** [opt] Error 2
make: *** [libs] Error 2

I'll try to upgrade to sierra and see if the error persists ...

@st23am
Copy link

st23am commented Jul 26, 2017

@HashNuke I'm trying to install 19.2 for a legacy project.

The next dependency issue I am getting is around odbc. I tried installed iodbc from homebrew that didn't fix it.

make[3]: Nothing to be done for `opt'.
 MAKE	opt
 CC	../priv/bin/x86_64-apple-darwin16.6.0/odbcserver
ld: library not found for -lodbc
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [../priv/bin/x86_64-apple-darwin16.6.0/odbcserver] Error 1```

@Stratus3D
Copy link
Member Author

@st23am I think you may need to provide the path to your odbc install if it's installed by brew (it's been a while so I don't remember what flag it was). I typically turn off odbc support when I compile Erlang, since only one of my projects use it. Unless you actually need it's usually easier to just skip it.

@0xradical
Copy link

I just upgraded to Mac OS Sierra and can confirm that OTP 20.0 installs just fine. I couldn't track down the actual issue on the previous version (El Capitan) but maybe someone with more expertise on the Erlang ecosystem could come up with a less intrusive solution and update the dependencies list accordingly.

@Stratus3D
Copy link
Member Author

Closing this issue since we have switched to kerl.

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

No branches or pull requests

4 participants