Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 618330 - net-libs/loudmouth-1.5.3 fails to compile with sys-devel/gcc-7.1.0-r1 lm-sasl.c:532:32: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
Summary: net-libs/loudmouth-1.5.3 fails to compile with sys-devel/gcc-7.1.0-r1 lm-sasl...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Wolfram Schlich (RETIRED)
URL: https://github.com/mcabber/loudmouth/...
Whiteboard:
Keywords: PATCH
: 638498 649896 (view as bug list)
Depends on:
Blocks: gcc-7
  Show dependency tree
 
Reported: 2017-05-13 04:31 UTC by Alpha Bravo
Modified: 2018-06-08 20:39 UTC (History)
4 users (show)

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


Attachments
emerge --info (emergeinfo0517loudmouth,5.46 KB, text/plain)
2017-05-13 04:31 UTC, Alpha Bravo
Details
build.log (buildlogloudmouth,35.68 KB, text/plain)
2017-05-13 04:33 UTC, Alpha Bravo
Details
build.log (buildlogloudmouth0517,34.95 KB, application/octet-stream)
2017-05-13 08:37 UTC, Alpha Bravo
Details
Patch according to upstream (loudmouth-1.5.3-lm-sasl-typo.patch,565 bytes, patch)
2017-05-15 15:35 UTC, Alpha Bravo
Details | Diff
fixed ebuild to include the patch (attachment 472662) (loudmouth-1.5.3-r1.ebuild,1.18 KB, text/plain)
2017-05-15 15:37 UTC, Alpha Bravo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alpha Bravo 2017-05-13 04:31:44 UTC
Created attachment 472462 [details]
emerge --info

net-libs/loudmouth-1.5.3 fails to compile with sys-devel/gcc-7.1.0-r1

lm-sasl.c: In function 'sasl_md5_prepare_response':
lm-sasl.c:532:32: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
     if (nonce == NULL || nonce == '\0') {
                                ^~
Comment 1 Alpha Bravo 2017-05-13 04:33:28 UTC
Created attachment 472464 [details]
build.log
Comment 2 Alpha Bravo 2017-05-13 08:37:15 UTC
Created attachment 472486 [details]
build.log
Comment 3 Alpha Bravo 2017-05-14 21:36:38 UTC
Fix (cf. https://github.com/mcabber/loudmouth/pull/31/files#diff-78b98fe25577194d06bdb8e3f40946a1):

loudmouth/lm-sasl.c

@@ -529,7 +529,7 @@ sasl_md5_prepare_response (LmSASL *sasl, GHashTable *challenge)
     }
 
     nonce = g_hash_table_lookup (challenge, "nonce");
-    if (nonce == NULL || nonce == '\0') {
+    if (nonce == NULL || nonce[0] == '\0') {
         g_log (LM_LOG_DOMAIN, LM_LOG_LEVEL_SASL,
                "%s: server didn't provide a nonce in the challenge",
                G_STRFUNC);
Comment 4 Alpha Bravo 2017-05-15 15:35:36 UTC
Created attachment 472662 [details, diff]
Patch according to upstream
Comment 5 Alpha Bravo 2017-05-15 15:37:20 UTC
Created attachment 472664 [details]
fixed ebuild to include the patch (attachment 472662 [details, diff])
Comment 6 Toralf Förster gentoo-dev 2018-02-02 18:51:56 UTC
*** Bug 638498 has been marked as a duplicate of this bug. ***
Comment 7 Pacho Ramos gentoo-dev 2018-04-03 10:29:49 UTC
*** Bug 649896 has been marked as a duplicate of this bug. ***
Comment 8 Sarah Salzstein 2018-04-10 20:16:56 UTC
Hi,

This is the same with gcc-7.3.0.


Regards,
Sarah
Comment 9 Larry the Git Cow gentoo-dev 2018-04-14 16:01:32 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5609fa27ea0e940719fa9b89302552fa43699e5

commit b5609fa27ea0e940719fa9b89302552fa43699e5
Author:     Peter Levine <plevine457@gmail.com>
AuthorDate: 2018-03-26 05:25:59 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2018-04-14 15:59:02 +0000

    net-libs/loudmouth: Fix building with GCC-7
    
    Bug: https://bugs.gentoo.org/618330
    Closes: https://bugs.gentoo.org/618330
    Package-Manager: Portage-2.3.16, Repoman-2.3.6

 .../loudmouth/files/loudmouth-1.5.3-gcc7.patch     | 25 ++++++++++++++++++++++
 net-libs/loudmouth/loudmouth-1.5.3.ebuild          |  3 ++-
 2 files changed, 27 insertions(+), 1 deletion(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5609fa27ea0e940719fa9b89302552fa43699e5

commit b5609fa27ea0e940719fa9b89302552fa43699e5
Author:     Peter Levine <plevine457@gmail.com>
AuthorDate: 2018-03-26 05:25:59 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2018-04-14 15:59:02 +0000

    net-libs/loudmouth: Fix building with GCC-7
    
    Bug: https://bugs.gentoo.org/618330
    Closes: https://bugs.gentoo.org/618330
    Package-Manager: Portage-2.3.16, Repoman-2.3.6

 .../loudmouth/files/loudmouth-1.5.3-gcc7.patch     | 25 ++++++++++++++++++++++
 net-libs/loudmouth/loudmouth-1.5.3.ebuild          |  3 ++-
 2 files changed, 27 insertions(+), 1 deletion(-)}
Comment 10 Sarah Salzstein 2018-04-15 17:32:36 UTC
Thanks, this worked for me now!

Regards,
Sarah