Erlang/OTP Forums

Author Message

<  Advanced Erlang/OTP  ~  systools:make_tar/2 does not find my beam files.

flodis
Posted: Fri Oct 01, 2010 9:48 am Reply with quote
User Joined: 09 Jul 2008 Posts: 27
Hello.
I have a OTP compliant structure, like this:

lib/connsrv-1.0/
lib/connsrv-1.0/ebin
lib/connsrv-1.0/ebin/ae.connection_server_app.app
lib/connsrv-1.0/ebin/ae/*.beam
lib/connsrv-1.0/src/ae/*.erl

* means all my beam or erl files are located there.

I can make a boot script by running systools:make_script/2

When I run systools:make_tar/2 it fails with this message:
'ae.connection_server_app': Cannot add file /Users/christian/ArenaEngine/arenaengine/ConnectionServer/lib/connsrv-1.0/ebin/ae.connection_server_app.beam to tar file - /Users/christian/ArenaEngine/arenaengine/ConnectionServer/lib/connsrv-1.0/ebin/ae.connection_server_app.beam: no such file or directory

This makes sense because all the beam files are in the ae directory.

I call make_tar/2 with these options (the same options with make_script works).

systools:make_tar(\"connsrv\", [{path, ["/Users/christian/ArenaEngine/arenaengine/ConnectionServer/lib/*/ebin/", "/Users/christian/ArenaEngine/arenaengine/ConnectionServer/lib/*/ebin/ae/"]}, {variables, [{"CONNSRVAPPS", "/Users/christian/ArenaEngine/arenaengine/ConnectionServer"}]}])

I guess having everything stuffed in the ae package/dir mess things up.
As you see I provede both the ebin and the ebin/ae dir to the paths.
Any ideas how I make make_tar understand the correct path to my beam files?

Edit:
I run Erlang 14B.
View user's profile Send private message
Mazen
Posted: Thu Oct 07, 2010 8:03 am Reply with quote
User Joined: 20 Jul 2006 Posts: 164 Location: London
why do you have them in a subdirectory in ebin? doesn't make sense.
View user's profile Send private message
flodis
Posted: Thu May 12, 2011 1:10 pm Reply with quote
User Joined: 09 Jul 2008 Posts: 27
Because I am using namespaces, to my knowledge that requires the beam files to be put into folders.

For example:
-module(ae.foo.bar)

would be in a directory like this
ae/foo/bar.beam

Am I wrong?
View user's profile Send private message
rvirding
Posted: Fri May 13, 2011 3:26 pm Reply with quote
User Joined: 30 Aug 2006 Posts: 452 Location: Stockholm, Sweden
I was going to say avoid using namespaces as that is probably what is messing things up. I honestly don't know how much of the other erlang/OTP tools can handle properly handle namespaces.

_________________
Robert Virding, Erlang Solutions Ltd.
View user's profile Send private message Visit poster's website MSN Messenger

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum