Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 674498 - net-im/spectrum2 fails to build with USE="debug"
Summary: net-im/spectrum2 fails to build with USE="debug"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Andriy Utkin (RETIRED)
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-01-04 12:37 UTC by Ognian Tenchev
Modified: 2019-03-10 22:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (debug-build.log,95.52 KB, text/x-log)
2019-01-04 12:37 UTC, Ognian Tenchev
Details
cmake traces diff (build_types.diff,31.54 KB, patch)
2019-01-04 13:43 UTC, Andriy Utkin (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ognian Tenchev 2019-01-04 12:37:39 UTC
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
Comment 1 Andriy Utkin (RETIRED) gentoo-dev 2019-01-04 12:41:48 UTC
Thanks for the bugreport. Will look.
Comment 2 Conrad Kostecki gentoo-dev 2019-01-04 12:50:14 UTC
I can reproduce here.

> make[2]: *** No rule to make target 'jsoncpp_lib-NOTFOUND', needed by 'libtransport/libtransport.so.2.0'.  Stop.
Comment 3 Andriy Utkin (RETIRED) gentoo-dev 2019-01-04 13:43:28 UTC
Created attachment 559778 [details, diff]
cmake traces diff
Comment 4 Andriy Utkin (RETIRED) gentoo-dev 2019-01-04 13:44:58 UTC
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
Comment 5 Conrad Kostecki gentoo-dev 2019-01-05 20:23:10 UTC
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.
Comment 6 Ognian Tenchev 2019-01-06 12:27:15 UTC
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.
Comment 7 Conrad Kostecki gentoo-dev 2019-01-06 20:08:11 UTC
(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.
Comment 8 Conrad Kostecki gentoo-dev 2019-01-06 20:15:36 UTC
(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?
Comment 9 Ognian Tenchev 2019-01-06 20:19:10 UTC
I have no idea. Just done what vt told me to do.
Comment 10 Conrad Kostecki gentoo-dev 2019-01-18 14:30:17 UTC
@Andrey: Did you looked further into it? I am out of ideas :/
Comment 11 Andriy Utkin (RETIRED) gentoo-dev 2019-03-04 17:54:07 UTC
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.
Comment 12 Conrad Kostecki gentoo-dev 2019-03-04 18:27:48 UTC
(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.
Comment 13 Larry the Git Cow gentoo-dev 2019-03-10 02:19:30 UTC
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(-)
Comment 14 Andriy Utkin (RETIRED) gentoo-dev 2019-03-10 02:20:44 UTC
I hope I haven't screwed it up in my commit.
Thanks everyone.
Comment 15 Larry the Git Cow gentoo-dev 2019-03-10 22:38:14 UTC
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(+)