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

Crash in Resolving some DNS #45

Open
glechapelain opened this issue May 9, 2020 · 6 comments
Open

Crash in Resolving some DNS #45

glechapelain opened this issue May 9, 2020 · 6 comments

Comments

@glechapelain
Copy link

Hi!

I am getting a crash on start-up:

2020/05/08 21:36:26 [DNS] Resolving [germ] ...
2020/05/08 21:36:26 [DNS] Resolving [www.mldonkey.org] ...

0 in alloc_host_entry
1 in unix_gethostbyname
2 in camlIp__make_entry_from_name_1176 of src/utils/net/ip.ml:172
3 in camlIp__get_entry_cached_1185 of src/utils/net/ip.ml:226
4 in camlIp__from_name_1198 of src/utils/net/ip.ml:240
5 in camlDriverMain__resolve_name_1142 of src/daemon/driver/driverMain.ml:378
6 in camlList__exists_1136 of list.ml:131

GDB is on line 390 of driverMain.ml:
in
let hostnames =
["www.mldonkey.org"; "mldonkey.sf.net"; "www.mldonkey.net"; "www.google.com"]
in
=> DriverInteractive.dns_works := List.exists resolve_name hostnames;

I can (and may) dig deeper by debugging in OCaml as well. I am rolling on the old one though, that OCaml auto-install: 4.01.0)

I updated http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54695 as it could be NetBSD specific

@ygrek
Copy link
Owner

ygrek commented May 9, 2020

4.01.0 is too archaic
there were fixes to unix_gethostbyname in newer versions (e.g. ocaml/ocaml@0178ea4), please try building with at least 4.03

@glechapelain
Copy link
Author

Thank you!

So I change config/configure.in to use ocaml 4.03 but I get the error

gmake: /usr/pkgsrc/net/mldonkey/work/mldonkey-3.1.7/patches/local/bin/camlp4: Command not found
gmake: *** [Makefile:5470: tools/ocamlpp.ml] Error 127
*** Error code 2

I'll keep looking..

I'm leveraging from the local build system for ocaml to try decoupling the packages mldonkey & ocaml in NetBSD's pkgsrc

@ygrek
Copy link
Owner

ygrek commented May 19, 2020

  1. why do you need to make changes to configure.in? what exact changes? did you run autoconf after that?
  2. the log says you are using ocaml installed by mldonkey, but your comment says that you use ocaml from netbsd, I am confused
  3. please always show full configure and make log for such issues

@ygrek
Copy link
Owner

ygrek commented May 19, 2020

(in general - the newer ocaml you can use - the better)

@glechapelain
Copy link
Author

Hi ! Thank you for attending my problem, sorry for the confusion:

I was getting the release 3.1.7 which I made myself by forking your repo, which is probably not the right way to go... I think I did that because another issue was already fixed in the current repo.
When using the local-building of OCaml mechanism, it was taking OCaml 4.01, you said take 4.03 so that's what I changed to where I found it mentioned.

I am trying to not use the OCaml from pkgsrc, (that's what I meant by decoupling) but I am still using a locally modified version of mldonkey's pkgsrc.

@ygrek
Copy link
Owner

ygrek commented May 24, 2020

It should build locally without problems via opam. Install opam with your package manager, then :

git clone git://github.com/ygrek/mldonkey.git
cd mldonkey
opam init # if needed
opam sw create . 4.09.0
eval $(opam env)
opam install camlp4 num
./configure --enable-upnp-natpmp
make

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

2 participants