Created attachment 559776 [details] build.log If I set USE="debug" net-im/spectrum2 fails to build. I notified andrey.utkin about the issue on conference.spectrum.im
Thanks for the bugreport. Will look.
I can reproduce here. > make[2]: *** No rule to make target 'jsoncpp_lib-NOTFOUND', needed by 'libtransport/libtransport.so.2.0'. Stop.
Created attachment 559778 [details, diff] cmake traces diff
Still no clue. The only suspicious difference in cmake traces is around mark_as_advanced() deep in cmake guts. See "built_types.diff" attached. Commands to generate it: $ cmake --trace --debug-output -C /home/j/work/foss/gentoo/spectrum/gentoo_common_config.cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_DOCS=no -DENABLE_FROTZ=no -DENABLE_IRC=yes -DENABLE_MYSQL=yes -DENABLE_PQXX=yes -DENABLE_PURPLE=yes -DENABLE_SMSTOOLS3=no -DENABLE_SQLITE3=yes -DENABLE_TESTS=no -DENABLE_TWITTER=yes -DENABLE_XMPP=yes -DLIB_INSTALL_DIR=lib64 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=/home/j/work/foss/gentoo/spectrum/gentoo_toolchain.cmake .. &> ../../debug.type $ rm -rf * $ cmake --trace --debug-output -C /home/j/work/foss/gentoo/spectrum/gentoo_common_config.cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_DOCS=no -DENABLE_FROTZ=no -DENABLE_IRC=yes -DENABLE_MYSQL=yes -DENABLE_PQXX=yes -DENABLE_PURPLE=yes -DENABLE_SMSTOOLS3=no -DENABLE_SQLITE3=yes -DENABLE_TESTS=no -DENABLE_TWITTER=yes -DENABLE_XMPP=yes -DLIB_INSTALL_DIR=lib64 -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_TOOLCHAIN_FILE=/home/j/work/foss/gentoo/spectrum/gentoo_toolchain.cmake .. &> ../../gentoo.type $ diff -Nurd debug.type gentoo.type > build_types.diff
I think, this is more a bug in the CmakeModule for finding system jsoncpp. As a result of not finding it, it tries to build it manually, which of couse fails, as there are no sources shipped. We are not alone. See for example: https://github.com/OSVR/OSVR-Core/issues/442 Hm, open upstream bug? The CmakeModule is shipped by them.
OK we make some progress with vt from conference.spectrum.im After applying: https://github.com/SpectrumIM/spectrum2/commit/7e55661d5edc6f7932ff79f39640987deee69c6f and removing: /usr/lib/pkgconfig/jsoncpp.pc /usr/lib64/cmake/jsoncpp/jsoncppConfig.cmake /usr/lib64/cmake/jsoncpp/jsoncppConfig-gentoo.cmake I'm able to compile spectrum2 with USE="debug" and without it.
(In reply to Ognian Tenchev from comment #6) > and removing: > /usr/lib/pkgconfig/jsoncpp.pc > /usr/lib64/cmake/jsoncpp/jsoncppConfig.cmake > /usr/lib64/cmake/jsoncpp/jsoncppConfig-gentoo.cmake > > I'm able to compile spectrum2 with USE="debug" and without it. I don't think, this will be some solution, as those files don't belong to spectrum2. And I can't image, that those can be just dropped.
(In reply to Ognian Tenchev from comment #6) > After applying: > https://github.com/SpectrumIM/spectrum2/commit/ > 7e55661d5edc6f7932ff79f39640987deee69c6f Hm, I get a double output: > -- Found JsonCpp: /usr/lib64/cmake/jsoncpp > -- Found jsoncpp: /usr/include/jsoncpp jsoncpp_lib, shared: TRUE Since it successfully finds it, what did the say, why I works, when you do remove those files?
I have no idea. Just done what vt told me to do.
@Andrey: Did you looked further into it? I am out of ideas :/
Conrad, I am thinking about just dropping `debug` USE flag. Gentoo user can just pass extra CFLAGS="-Og -ggdb3" or such, amounting to exactly what spectrum's CMake script does when you ask for Debug build configuration.
(In reply to Andrey Utkin from comment #11) > Conrad, I am thinking about just dropping `debug` USE flag. Gentoo user can > just pass extra CFLAGS="-Og -ggdb3" or such, amounting to exactly what > spectrum's CMake script does when you ask for Debug build configuration. Agreed. I also think, it's a better idea, since everyone can just pass the debug flags. Pushed PR and bumped to 2.0.10.1.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1ffc1ff3349eabd0f7ee13a6fe77407cb284cc1 commit d1ffc1ff3349eabd0f7ee13a6fe77407cb284cc1 Author: Andrey Utkin <andrey_utkin@gentoo.org> AuthorDate: 2019-03-04 19:21:14 +0000 Commit: Andrey Utkin <andrey_utkin@gentoo.org> CommitDate: 2019-03-10 02:18:25 +0000 net-im/spectrum2: drop broken 'debug' USE flag Switching to Debug CMake configuration leads to an odd effect. Users can just supply extra CFLAGS for better debugging info, which is exactly what Debug CMake configuration does. No revbump since this is a build failure issue. Successful installations don't need a rebuild. Bug: https://bugs.gentoo.org/674498 Package-Manager: Portage-2.3.51, Repoman-2.3.12 Signed-off-by: Andrey Utkin <andrey_utkin@gentoo.org> .../files/spectrum2-2.0.9-remove_debug_cflags.patch | 13 ------------- net-im/spectrum2/spectrum2-2.0.10.ebuild | 10 +--------- 2 files changed, 1 insertion(+), 22 deletions(-)
I hope I haven't screwed it up in my commit. Thanks everyone.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d1eb41fa75e4492090deb011d0bc16ea4f1ba3c commit 1d1eb41fa75e4492090deb011d0bc16ea4f1ba3c Author: Conrad Kostecki <conrad@kostecki.com> AuthorDate: 2019-03-04 18:24:12 +0000 Commit: Patrice Clement <monsieurp@gentoo.org> CommitDate: 2019-03-10 22:35:01 +0000 net-im/spectrum2: bump to version 2.0.10.1. Also removed the debug use flag and patch. Users, who wish to enable debug mode, can still compile by adding themself the needed debug cflags to the CFLAGS variable. Closes: https://bugs.gentoo.org/674498 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Conrad Kostecki <conrad@kostecki.com> Closes: https://github.com/gentoo/gentoo/pull/11258 Signed-off-by: Patrice Clement <monsieurp@gentoo.org> net-im/spectrum2/Manifest | 1 + net-im/spectrum2/spectrum2-2.0.10.1.ebuild | 114 +++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+)