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

Cannot find erl_nif.h on make command #29

Closed tqwewe closed 6 years ago

tqwewe commented 6 years ago

I'm running windows 10 and attempting to run the install commands (git clone, cd, make), but upon running the make command, I come across the following error:

.../xmpp/deps/fast_xml/c_src/fxml.c(18): fatal error C1083: Cannot open include file: 'erl_nif.h': No such file or directory
ERROR: compile failed while processing .../xmpp/deps/fast_xml: rebar_abort
make: *** [Makefile:7: src] Error 1

I managed to find erl_nif.h inside my erlang installation folder under erl9.3/usr and I tried copying all the header files to my deps/fast_xml/c_str/ folder and also tried executing export PATH=$PATH:/c/Program\ Files/erl9.3/usr/include but the error persists.

Below is my entire output:

$ make
./rebar get-deps compile
==> p1_utils (get-deps)
==> fast_xml (get-deps)
==> stringprep (get-deps)
==> xmpp (get-deps)
==> p1_utils (compile)
==> fast_xml (compile)
Compiling c:/Users/Arise/Documents/Programming/Erlang/xmpp2/xmpp/deps/fast_xml/c_src/fxml.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24225.1 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9002 : ignoring unknown option '-g'
cl : Command line warning D9024 : unrecognized source file type 'Files/erl9.3/lib/erl_interface-3.10.1/include', object file assumed
cl : Command line warning D9027 : source file 'Files/erl9.3/lib/erl_interface-3.10.1/include' ignored
cl : Command line warning D9024 : unrecognized source file type 'Files/erl9.3/erts-9.3/include', object file assumed
cl : Command line warning D9027 : source file 'Files/erl9.3/erts-9.3/include' ignored
fxml.c
c:/Users/Arise/Documents/Programming/Erlang/xmpp2/xmpp/deps/fast_xml/c_src/fxml.c(18): fatal error C1083: Cannot open include file: 'erl_nif.h': No such file or directory
ERROR: compile failed while processing c:/Users/Arise/Documents/Programming/Erlang/xmpp2/xmpp/deps/fast_xml: rebar_abort
make: *** [Makefile:7: src] Error 1
badlop commented 6 years ago

Try copying it to more places, maybe you're lucky, like fast_xml/, fast_xml/include, etc.

In the worst case, you can install ejabberd from binary package, copy the binary files you can't compile, and then uninstall it.

tqwewe commented 6 years ago

For now I just switched my development to a remote machine running FreeBSD and it worked fine. I'm a noob at Erlang and I haven't been able to figure out to how get started with this xmpp library, are there any examples or tutorials? My brain can't understand all this.

badlop commented 6 years ago

Well, ejabberd uses this library, so all it is a big example. Apart from that, nothing that I remember. Of course, I imagine you already looked at https://github.com/processone/xmpp/blob/master/README.md