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

Do not compile and install DHT_bootstrap if it was disabled in configure #324

Merged
merged 1 commit into from
Jan 3, 2017

Conversation

jin-eld
Copy link

@jin-eld jin-eld commented Dec 13, 2016

closes #319


This change is Reviewable

@iphydf iphydf added this to the v0.1.1 milestone Dec 13, 2016
@robinlinden
Copy link
Member

Can you make this change in CMakeLists.txt too? I think most people compiling c-toxcore are using CMake for it.

@nurupo
Copy link
Member

nurupo commented Dec 15, 2016

This PR is invalid as DHT_bootstrap and tox-bootstrapd (the DHT bootstrap daemon) are two separate programs. The thing you disable in configure is the daemon, not DHT_bootstrap.

@jin-eld
Copy link
Author

jin-eld commented Dec 15, 2016

If it is like @nurupo says, then the actual issue is #319 is invalid? I talked to @iphydf before implementing the fix, so I guess there was some confusion on all sides.

@robinlinden Regarding cmake - I can't, I am not familiar with it, I offered iphydf to help out with the autoconf bugs, if the same problem exists in the cmake build, then someone who is familiar with it should fix it too.

@iphydf
Copy link
Member

iphydf commented Dec 15, 2016

@zetok as person filing the issue may have thoughts on this.

@iphydf iphydf modified the milestones: v0.1.2, v0.1.1 Dec 17, 2016
@iphydf
Copy link
Member

iphydf commented Dec 18, 2016

So what do we do about this? @zetok, @nurupo.

@zetok
Copy link

zetok commented Dec 20, 2016

@nurupo what is DHT_bootstrap supposed to do then? Is it needed in a default library install?

Given that there are no docs, the simple assumption is that DHT_bootstrap is not needed for anything and should be removed.

It doesn't really matter which switch would cause it to stop being build/installed when it's not needed, as long as there's such switch.

Right now there's no switch AFAIK.

@nurupo
Copy link
Member

nurupo commented Dec 22, 2016

@nurupo what is DHT_bootstrap supposed to do then?

DHT_bootstrap is a simple DHT bootstrap node program which existed since early days of toxcore and was always built together with toxcore for as long as I can remember. It's not a new behavior of the default toxcore build/install.

Is it needed in a default library install?

I don't have any strong opinion on that matter. Many libraries produce executable binaries in their default build, many also do not. Maybe some other Tox developers have a strong opinion on that?

Given that there are no docs, the simple assumption is that DHT_bootstrap is not needed for anything and should be removed.

What "docs" you are talking about?

It doesn't really matter which switch would cause it to stop being build/installed when it's not needed, as long as there's such switch.

Sure, I don't mind it having a separate build switch, just don't lump it under the same switch as the daemon.

@jin-eld
Copy link
Author

jin-eld commented Dec 22, 2016

So from the above discussion: I'll add another switch for it to keep it separate from the daemon. Do we want to compile it by default (i.e. should the switch default be enabled or disabled)?

@iphydf
Copy link
Member

iphydf commented Dec 22, 2016

I'd suggest adding a new flag and enabling it by default iff the actual bootstrap daemon is also enabled by default. For cmake, see CMakeLists.txt:448. Look for option(BOOTSTRAP_DAEMON. You can do a similar thing for DHT_bootstrap, if you like. That would be enabled by default.

@zetok
Copy link

zetok commented Dec 22, 2016

@nurupo

Is it needed in a default library install?

I don't have any strong opinion on that matter. Many libraries produce executable binaries in their default build, many also do not. Maybe some other Tox developers have a strong opinion on that?

Question is, is it useful for anything? The yes/no answer to that question is also the answer to the question whether it is needed in a default install.

What "docs" you are talking about?

The ones that are missing. Any documentation on using/something DHT_bootstrap.

@nurupo
Copy link
Member

nurupo commented Dec 22, 2016

and enabling it by default iff the actual bootstrap daemon is also enabled by default

People often confuse the two, the DHT_bootstrap and the bootstrap daemon, thinking that DHT_bootstrap is the daemon and asking the help for the DHT daemon, for whoever tries to help them to figure out later that they are not actually using the daemon. That's one of the reasons why I did't want a single flag which will enable both of them.

The ones that are missing. Any documentation on using/something DHT_bootstrap.

Yeah, there is no documentation on DHT_bootstrap aside from the help/usage example when you run it with no arguments. Anyone willing to make manpages for DHT_bootstrap and tox-bootstrapd?

@iphydf iphydf modified the milestones: v0.1.2, v0.1.3 Dec 23, 2016
@jin-eld
Copy link
Author

jin-eld commented Dec 28, 2016

Updated.

Added an option --disable-dht-bootstrap (default: enabled) as discussed above.
The --enable-daemon option stays unchanged.

@robinlinden
Copy link
Member

It might be easier to remember the options if both are --enable-x instead of mixing disabling and enabling features. I'm fine with the default being to not build it though.

@jin-eld
Copy link
Author

jin-eld commented Dec 28, 2016

Usually you describe the opposite of the default, because that's what the user will be using. @iphydf suggested that it should be enabled, therefore the option is called --disable-....

I can change it if everyone agrees on something, so please decide and either merge it or let me know what to change it to.

@iphydf
Copy link
Member

iphydf commented Dec 29, 2016

I think AC_ARG_ENABLE generates both --enable- and --disable- options, so it doesn't really matter. I have no opinion - @zetok and @nurupo decide.

@zetok
Copy link

zetok commented Dec 29, 2016

I don't really care about the naming, as long as there is an option and it's documented.

@jin-eld could you add docs about the switch to the INSTALL.md under Advanced configure options ?

I don't think though that it should be enabled by default though, since it doesn't seem to have any use.

If the default is set to enable, "packaged" toxcore in Gentoo is going to have it disabled anyways – defaulting to enabled will just add a bit more work for me.

@jin-eld
Copy link
Author

jin-eld commented Dec 29, 2016

I think AC_ARG_ENABLE generates both --enable- and --disable- options, so it doesn't really matter. I have no opinion - @zetok and @nurupo decide.

This is correct, we are only talking about the help description here, sorry if it was not clear. That's what I meant, usually you pick the opposite as the help text description, because that's what the user will have to specify in order to change the default behavior.

@zetok: I would add it to the docs if I knew how to describe it :) Would the bellow be enough?

  • --enable-dht-bootstrap build DHT bootstrap utility (default=disabled)

I really don't know what this utility is doing so I can't describe it any further, as @nurupo mentioned there is hardly any information about it. If you think that the above line is not enough, please help me out and write up something that I could paste into the INSTALL.md

PR updated:

  • switched option default to "disabled"
  • updated help text to --enable-dht-bootstrap
  • updated INSTALL.md

@iphydf
Copy link
Member

iphydf commented Dec 30, 2016

This looks done. @zetok @nurupo?

@zetok
Copy link

zetok commented Dec 30, 2016

:lgtm_strong:


Reviewed 3 of 3 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@iphydf
Copy link
Member

iphydf commented Jan 2, 2017

Looks fine. I believe @nurupo's concerns are addressed. This PR is ready to be merged (modulo coveralls, which is currently broken for C/C++).

@iphydf
Copy link
Member

iphydf commented Jan 3, 2017

Coveralls is fixed (#377). Please rebase on master so the build is restarted.

@nurupo
Copy link
Member

nurupo commented Jan 3, 2017

:lgtm_strong:

What does cmake do? Should we also backport this behaviour to our cmake configuration?


Reviewed 3 of 3 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@iphydf
Copy link
Member

iphydf commented Jan 3, 2017

It's probably a good idea, yes.

@iphydf iphydf merged commit 4c9ed8f into TokTok:master Jan 3, 2017
This pull request was closed.
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

Successfully merging this pull request may close these issues.

toxcore installs DHT_bootstrap even though --disable-daemon is passed to ./configure
5 participants