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

Cannot include ex_uri.hrl #61

Open
marccampbell opened this issue Sep 11, 2011 · 7 comments
Open

Cannot include ex_uri.hrl #61

marccampbell opened this issue Sep 11, 2011 · 7 comments

Comments

@marccampbell
Copy link

From a fresh clone of the hithub repo, I get:

src/socketio_listener.erl:4: can't find include lib "ex_uri.hrl"

when running rebar compile.

@ferd
Copy link
Collaborator

ferd commented Sep 12, 2011

This seems to work for me:

$ git clone [email protected]:yrashk/socket.io-erlang.git
Cloning into socket.io-erlang...
remote: Counting objects: 666, done.
remote: Compressing objects: 100% (239/239), done.
remote: Total 666 (delta 454), reused 623 (delta 421)
Receiving objects: 100% (666/666), 1.25 MiB, done.
Resolving deltas: 100% (454/454), done.
~ $ cd socket.io-erlang/
~/socket.io-erlang $ git submodule init && git submodule update
Submodule 'priv/Socket.IO' (https://github.com/LearnBoost/socket.io-client.git) registered for path 'priv/Socket.IO'
Cloning into priv/Socket.IO...
remote: Counting objects: 3839, done.
remote: Compressing objects: 100% (1566/1566), done.
remote: Total 3839 (delta 2467), reused 3499 (delta 2179)
Receiving objects: 100% (3839/3839), 2.14 MiB | 2.03 MiB/s, done.
Resolving deltas: 100% (2467/2467), done.
Submodule path 'priv/Socket.IO': checked out 'ec023737a4d54df1fe6e6f198cd87ed8677b6676'
~/socket.io-erlang $ rebar get-deps
==> socket.io-erlang (get-deps)
[Processing dependency: jsx]
remote: Counting objects: 2129, done.
Receiving objects: 100% (2129/2129), 699.71 KiB, done.9)   
Resolving deltas: 100% (1259/1259), done.
[Processing dependency: ex_uri]
remote: Counting objects: 80, done.
remote: Compressing objects: 100% (67/67), done.
remote: Total 80 (delta 41), reused 0 (delta 0)
Unpacking objects: 100% (80/80), done.
[Processing dependency: misultin]
remote: Counting objects: 1235, done.
remote: Compressing objects: 100% (380/380), done.
remote: Total 1235 (delta 916), reused 1130 (delta 831)
Receiving objects: 100% (1235/1235), 345.27 KiB, done.
Resolving deltas: 100% (916/916), done.
[Processing dependency: ossp_uuid]
remote: Counting objects: 65, done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 65 (delta 24), reused 15 (delta 3)
Unpacking objects: 100% (65/65), done.
[Processing dependency: proper]
remote: Counting objects: 2375, done.
remote: Compressing objects: 100% (576/576), done.
remote: Total 2375 (delta 1838), reused 2298 (delta 1764)
Receiving objects: 100% (2375/2375), 831.73 KiB, done.
Resolving deltas: 100% (1838/1838), done.

~/socket.io-erlang $ rebar compile
==> socket.io-erlang (compile)
Compiled src/socketio_http_server.erl
Compiled src/socketio_transport_websocket.erl
Compiled src/socketio_transport_xhr_multipart.erl
Compiled src/socketio_sup.erl
Compiled src/socketio_listener_sup_sup.erl
Compiled src/socketio_listener_sup.erl
Compiled src/socketio_transport_polling.erl
Compiled src/socketio_http_sup.erl
Compiled src/socketio_transport_htmlfile.erl
Compiled src/socketio_listener.erl
Compiled src/socketio_http_misultin.erl
Compiled src/socketio_http.erl
Compiled src/socketio_client_sup.erl
Compiled src/socketio_client.erl
Compiled src/socketio_app.erl
Compiled src/socketio_data.erl
Compiled src/socketio_data_v1.erl
[Processing dependency: jsx]
==> nicefloats (get-deps)
==> jsx (get-deps)
[Building...]
...
~/socket.io-erlang $ 

What build steps do you use?

@omarkj
Copy link
Collaborator

omarkj commented Sep 16, 2011

I get this as well now, am looking at it.

My steps are:

git clone https://github.com/yrashk/socket.io-erlang.git
cd socket.io-erlang
make

@ferd
Copy link
Collaborator

ferd commented Sep 16, 2011

I would bet on an outdated rebar version. The Makefile uses './rebar compile' while my own code snippet above uses 'rebar compile', aka the global rebar I have installed.

@omarkj
Copy link
Collaborator

omarkj commented Sep 16, 2011

That was my idea as well, I'm using:
rebar version: 2 date: 20110916_115720 vcs: git fa1bbc6

Oddly enough, if I run

rebar get-deps
rebar compile <-This fails
rebar compile <- Second one is successful

Any idea what that can be?

ferd added a commit that referenced this issue Sep 16, 2011
This commit upgrades the current agnerized version being used by
the Makefile. This prompted changes to the rebar config.

The true build problems were caused by the merge #63, which added
a fix to the -include_lib path to better work with release.
However, this introduced a problem when compiling with rebar
given rebar calls 'erlc', which ignores all ERL_LIBS options
and thus will only support the default system libs (apparently).

This commit adds a macro definition to rebar.config and a
preprocessor switch to the socketio_listener module (which had
the include_lib changed) so that when compiled from rebar, we
use the old code that worked, and when going without rebar, we
use the fix that existed.

Hopefully that will make everyone happy.
@ferd
Copy link
Collaborator

ferd commented Sep 16, 2011

The true build problems were caused by the merge #63, which added
a fix to the -include_lib path to better work with release.
However, this introduced a problem when compiling with rebar
given rebar calls 'erlc', which ignores all ERL_LIBS options
and thus will only support the default system libs (apparently).

I fixed this by adding a macro definition to rebar.config and a
preprocessor switch to the socketio_listener module (which had
the include_lib changed) so that when compiled from rebar, we
use the old code that worked, and when going without rebar, we
use the fix that existed.

Hopefully this won't break the fixes brought by merge #63

Let me know if this fixed the issue

sbalea added a commit to sbalea/socket.io-erlang that referenced this issue Sep 19, 2011
@sbalea
Copy link

sbalea commented Sep 19, 2011

My initial fix failed because it was missing a rebar.conf tweak (needed to include "deps/". My bad, forgot to include it in the pull request.
Unfortunately ferd's fix to my fix did break the scenario where socketio is a dependency or a larger, rebar-based application. Rebar is funny sometimes: it dumps all deps and sub-deps into a flat deps/ directory, while at the same time it descends into deps directories and applies rebar.config setting as if they would be top level. Bottom line is what works in standalone mode, might not work in dependency mode.
In any case, I'm prepping a new pull request that hopefully fixes things for everybody. Stay tuned.

@luisgerhorst
Copy link

I had the same problem, didn't work with rebar get-deps + rebar compile but instead only running make worked.

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

5 participants