Skip to content

Generate only one large library "libtoxcore".#442

Merged
iphydf merged 1 commit into
TokTok:masterfrom
iphydf:one-big-lib
Dec 29, 2017
Merged

Generate only one large library "libtoxcore".#442
iphydf merged 1 commit into
TokTok:masterfrom
iphydf:one-big-lib

Conversation

@iphydf

@iphydf iphydf commented Jan 16, 2017

Copy link
Copy Markdown
Member

This library contains all the code for the old libtoxcore, libtoxav,
libtoxdns, and libtoxencryptsave. The build for toxav is still optional,
and disabling it causes libtoxcore to simply not contain those symbols
and the pkg-config file to not include opus and vpx as dependencies.


This change is Reviewable

@iphydf iphydf added this to the v0.2.0 milestone Jan 16, 2017
@cebe

cebe commented Jan 17, 2017

Copy link
Copy Markdown
Member

@iphydf can you explain what you are doing here and why?

@iphydf iphydf force-pushed the one-big-lib branch 10 times, most recently from da4c1ea to 183033a Compare January 22, 2017 00:26
@iphydf

iphydf commented Jan 22, 2017

Copy link
Copy Markdown
Member Author

@cebe I've added a top level comment to the CMakeLists.txt explaining what it does. Why: avoiding the ABI mess that is toxcore.

@robinlinden

Copy link
Copy Markdown

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


Comments from Reviewable

@cebe cebe removed their assignment Jan 29, 2017
@SkyzohKey SkyzohKey added packaging Packaging P1 High priority labels Feb 13, 2017
@SkyzohKey

Copy link
Copy Markdown

:lgtm_strong:


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


Comments from Reviewable

@iphydf iphydf force-pushed the one-big-lib branch 2 times, most recently from f6a3602 to 384e62b Compare February 26, 2017 13:27
@iphydf iphydf force-pushed the one-big-lib branch 2 times, most recently from acdedb4 to e5ad258 Compare March 26, 2017 19:44
@iphydf iphydf force-pushed the one-big-lib branch 2 times, most recently from 3be4ea0 to 557baf8 Compare September 18, 2017 19:15
@iphydf

iphydf commented Oct 4, 2017

Copy link
Copy Markdown
Member Author

@zoff99 it's always activated when building with CMake.

@zoff99

zoff99 commented Oct 4, 2017

Copy link
Copy Markdown

@iphydf making cmake and autotools build even more different is a bad idea.
it will break builds :-(

@Diadlo

Diadlo commented Oct 5, 2017

Copy link
Copy Markdown

@iphydf What if someone wants to link his app without toxav, and simultaneously link with toxav for another app, for example?

@iphydf

iphydf commented Nov 20, 2017

Copy link
Copy Markdown
Member Author

@Diadlo do you or someone you know have that use case? Otherwise, YAGNI.

@iphydf

iphydf commented Nov 20, 2017

Copy link
Copy Markdown
Member Author

@zoff99 I agree. So after this we should make autotools do the same.

@Diadlo

Diadlo commented Nov 20, 2017

Copy link
Copy Markdown

@iphydf It's just like interface segregation. I just don't understand, why you want to merge all function of public API in one library, if they logically different

@iphydf iphydf force-pushed the one-big-lib branch 2 times, most recently from 3e9c956 to 8ac463f Compare December 28, 2017 18:33
@iphydf

iphydf commented Dec 28, 2017

Copy link
Copy Markdown
Member Author

@Diadlo I'll happily split it out again if and when toxav does not depend on toxcore internals.

The alternative is to have libraries split along the layer boundaries, so we end up having the many-small-libs situation, which we had before. That has different pros and cons. I hope toxav will eventually become independent of toxcore internals (@mannol has plans for this). At that point, I'd like toxav to be a separate repository, developed independently. In the meantime, the split is headaches for developers for no reason.

@iphydf

iphydf commented Dec 28, 2017

Copy link
Copy Markdown
Member Author

Oh, and why that is an alternative: because then toxav can correctly depend on toxnetcrypto and other things it uses. Right now, toxav is lying because it says it only depend on toxcore, while actually it depends on its internals. If we expose the internals correctly (through libraries), we can have everything separated.

@robinlinden

Copy link
Copy Markdown

Reviewed 1 of 11 files at r1, 2 of 3 files at r2, 3 of 3 files at r3.
Review status: all files reviewed at latest revision, 6 unresolved discussions, all commit checks successful.


CMakeLists.txt, line 323 at r3 (raw file):

    toxav/video.h)
  target_link_modules(toxav toxgroup ${OPUS_LIBRARIES} ${VPX_LIBRARIES})
  #message("*** toxav_LINK_MODULES: ${toxav_LINK_MODULES}")

This should probably be removed.


CMakeLists.txt, line 359 at r3 (raw file):

# Link it to all dependencies.
foreach(sublib ${toxcore_SUBLIBS})
  #message("*** toxcore_LINK_MODULES += ${${sublib}_LINK_MODULES}  # ${sublib}_LINK_MODULES")

This should probably be removed.


cmake/ModulePackage.cmake, line 154 at r3 (raw file):

  foreach(dep ${ARGN})
    #message("*** Processing dep ${dep} for ${target}")

This should probably be removed.


cmake/ModulePackage.cmake, line 165 at r3 (raw file):

        list(FIND LINK_MODULES ${dep} _index)
        if(_index EQUAL -1)
          #message("*** Adding ${dep} to ${target}_LINK_MODULES.")

This should probably be removed.


cmake/StrictAbi.cmake, line 36 at r3 (raw file):

      OUTPUT_STRIP_TRAILING_WHITESPACE)
    string(REPLACE "\n" ";" sublib_SYMS ${sublib_SYMS})
  

Stray whitespace.


Comments from Reviewable

This library contains all the code for the old libtoxcore, libtoxav,
libtoxdns, and libtoxencryptsave. The build for toxav is still optional,
and disabling it causes libtoxcore to simply not contain those symbols
and the pkg-config file to not include opus and vpx as dependencies.
@iphydf

iphydf commented Dec 28, 2017

Copy link
Copy Markdown
Member Author

Review status: all files reviewed at latest revision, 6 unresolved discussions, all commit checks successful.


CMakeLists.txt, line 386 at r2 (raw file):

Previously, cebe (Carsten Brandt) wrote…

what is this? looks super specific to a certain environment.

It's specific to toktok-stack, which is available to everyone (it's a github repo).


CMakeLists.txt, line 323 at r3 (raw file):

Previously, robinlinden (Robin Lindén) wrote…

This should probably be removed.

Done.


CMakeLists.txt, line 359 at r3 (raw file):

Previously, robinlinden (Robin Lindén) wrote…

This should probably be removed.

Done.


cmake/ModulePackage.cmake, line 154 at r3 (raw file):

Previously, robinlinden (Robin Lindén) wrote…

This should probably be removed.

Done.


cmake/ModulePackage.cmake, line 165 at r3 (raw file):

Previously, robinlinden (Robin Lindén) wrote…

This should probably be removed.

Done.


cmake/StrictAbi.cmake, line 36 at r3 (raw file):

Previously, robinlinden (Robin Lindén) wrote…

Stray whitespace.

Done.


Comments from Reviewable

@robinlinden

Copy link
Copy Markdown

:lgtm_strong:


Reviewed 3 of 3 files at r4.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


Comments from Reviewable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P1 High priority packaging Packaging

Development

Successfully merging this pull request may close these issues.

8 participants