[erlang-questions] Help on priv_dir please

Bob Cowdery bob@REDACTED
Wed Jun 20 22:58:44 CEST 2018


This code:priv_dir/1 has me completely baffled. The code for gen_serial 
will only resolve the directory if I leave it in its original directory 
and add the ebin to the code path. If I move the files to my own tree it 
wont give me anything except {error, bad_name}. I've put in the correct 
directory structure according to the docs, added an Application.app file 
and tried various names in the call including ?MODULE, the file I am 
running and the app name. I also added the ebin path to ERL_LIBS to no 
avail.

There is also some weird thing going on with the paths. Even if I remove 
the gen_serial original code path from .erlang and then build it from 
some random directory it still builds that one even though I have a copy 
in my tree and the code path only points there. Is there some cache 
somewhere?


On 6/19/2018 8:40 PM, Vance Shipley wrote:
> Heh, I just posted about this in another thread. You probably have a 
> problem related to your installed path. It's not enough to set the 
> code path, you need to include the parent directory in the ERL_LIBS 
> environment variable.
>
>
> On Tue, Jun 19, 2018, 01:52 Bob Cowdery <bob@REDACTED 
> <mailto:bob@REDACTED>> wrote:
>
>     Hi,
>
>     I'm trying to get gen_serial up and running. I've tracked the problem
>     down to a line which boils down to code:priv_dir(gen_serial).
>
>     This is intending to get the port executable path but returns
>     bad_name.
>     Why would this call fail?
>
>     Thanks
>
>     BobC
>
>     _______________________________________________
>     erlang-questions mailing list
>     erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
>     http://erlang.org/mailman/listinfo/erlang-questions
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180620/a4913789/attachment.htm>


More information about the erlang-questions mailing list