Compiling .rel-files - module search path

Gunilla Arendt gunilla@REDACTED
Mon Aug 29 15:51:35 CEST 2005


erlc for a .rel file calls systools:make_script/2 to generate the boot 
script. For every application, systools:make_script/2 looks for the .app 
file in the code path, and then assumes that all .beam files for this 
application are located in the same directory - ie does *not* search for 
them in the path. Could this be what is causing your problem?

/ Gunilla


Fredrik Thulin wrote:
> I give up. I've searched the mailing lists and the rest of the 
> google-indexed web but I can't get this to work.
> 
> I am trying to compile a .rel-file into a boot file. I want to be able 
> to build my project in a build-directory as opposed to having to do it 
> inside the source tree.
> 
> erlc with output directory set to "." and a relative path to 
> the .rel-file gives me a lot of "module_not_found" even though I've 
> littered the command line with paths to all my source files AND the 
> corresponding .beam files. What am I doing wrong?
> 
> As seen in this strace-output, erlc only looks for tcp_receiver.beam in 
> the current working directory, despite all my -I's :
> 
> host:~/tmp/build-test-yxa/ebin$ strace -f /pkg/erlang/R10B-6/bin/erlc 
> 	-Wall -I"../../test-yxa-svn/src" 
> 	-I"../../test-yxa-svn/src/*/"
> 	-I"../src/" -I"../src/*/" 
> 	-o . ../../test-yxa-svn/ebin/incomingproxy.rel 2>&1 |
> 		grep 'tcp_receiver'
> stat64("./tcp_receiver.beam", 0xbfffee9c) = -1 ENOENT
> 	(No such file or directory)
> {{module_not_found,incomingproxy,tcp_receiver},
>  {tcp_receiver,'$$ignore$$',incomingproxy,"0.0","."}}
> host:~/tmp/build-test-yxa/ebin$ ls ../src/*/tcp_receiver.beam 
> 	../../test-yxa-svn/src/*/tcp_receiver.erl
> ../../test-yxa-svn/src/transportlayer/tcp_receiver.erl  ../src/transportlayer/tcp_receiver.beam
> host:~/tmp/build-test-yxa/ebin$  
> 
> I've tried with having the .rel-file in both a directory called 
> "applications/" (my preferred choice), and in "ebin/" (as above).
> 
> Thanks in advance
> 
> /Fredrik
> 



More information about the erlang-questions mailing list