0

I am running Yaws server version 2.0.2 with Erlang/OTP 18 [erts-7.3] on ubuntu 16.04 and installed it using apt. Now when i try to run this example i get undef yaws_dynopts random_seed. I have verified that module yaws_dynopts is not loaded OR compiled.

error is:

{undef,[{yaws_dynopts,random_seed,[6885,441906,806568],[]},
        {m1,'-out/1-fun-0-',1,
            [{file,"/home/my_account/.yaws/yaws/default/m1.erl"},{line,16}]}]}

which corresponds to line in example:

yaws_dynopts:random_seed(erlang:phash(node(), 100000),
                                           erlang:phash(A2, A3),
                                           A3),

Do anyone have solution to this? And is it a bug?

Kuna Prime
  • 265
  • 3
  • 8
  • What version of Erlang/OTP are you running? I don't know of any bugs reported against `yaws_dynopts`. Can you show the full error you're getting? – Steve Vinoski Sep 28 '16 at 21:14
  • @SteveVinoski just done that – Kuna Prime Sep 28 '16 at 22:02
  • Thanks for the info. If you run `yaws -i` from a Linux shell, you get an interactive Erlang shell. Can you run the command `m(yaws_dynopts).` there and tell me what you see? – Steve Vinoski Sep 28 '16 at 22:18
  • @SteveVinoski output is: `** exception error: undefined function yaws_dynopts:module_info/0 in function c:m/1 (c.erl, line 510) ` – Kuna Prime Sep 29 '16 at 04:24

1 Answers1

1

Does l(yaws_dynopts). also cause an error? I'm starting to believe whoever packaged your version of Yaws didn't do it correctly, leaving out this critical module. You should look to see if version 2.0.3 is available, or alternatively consider building your own from source. We're currently at 2.0.4.

Steve Vinoski
  • 19,847
  • 3
  • 31
  • 46