Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 894560 - app-text/discount-2.2.7c fails to compile (MUSL-CLANG-SYSTEM): main.c:311:29: error: incompatible function pointer types passing char (char , int, char ) to parameter of type mkd_callback_t (aka char ()(const char , const int, void )) [-Wincompatible-fun
Summary: app-text/discount-2.2.7c fails to compile (MUSL-CLANG-SYSTEM): main.c:311:29:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ben Kohler
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: c99-porting
  Show dependency tree
 
Reported: 2023-02-15 09:43 UTC by Agostino Sarubbo
Modified: 2024-05-13 14:33 UTC (History)
5 users (show)

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


Attachments
build.log (build.log,55.11 KB, text/plain)
2023-02-15 09:43 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-02-15 09:43:41 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: app-text/discount-2.2.7b fails to compile (MUSL-CLANG-SYSTEM).
Discovered on: amd64 (internal ref: tinderbox_musl)

NOTE:
(MUSL-CLANG-SYSTEM) in the summary means that bug was found on a machine that runs MUSL libc + clang16 but this bug MAY or MAY NOT BE related to musl/clang16.
Comment 1 Agostino Sarubbo gentoo-dev 2023-02-15 09:43:43 UTC
Created attachment 851222 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-02-15 09:43:45 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


generate.c:629:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
gethopt.c:13:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
gethopt.c:26:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
gethopt.c:33:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
gethopt.c:40:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
gethopt.c:48:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
gethopt.c:59:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
makepage.c:33:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
mkd2html.c:88:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
theme.c:530:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
tools/branch.c:7:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
tools/cols.c:5:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
tools/echo.c:7:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
tools/pandoc_headers.c:53:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
main.c:311:29: error: incompatible function pointer types passing 'char *(char *, int, char *)' to parameter of type 'mkd_callback_t' (aka 'char *(*)(const char *, const int, void *)') [-Wincompatible-function-pointer-types]
Comment 3 Jonathan Marten 2023-07-12 06:43:05 UTC
Confirmed still a problem for app-text/discount-2.2.7c, but
currently masked version app-text/discount-3.0.0a compiles and installs correctly.
Comment 4 Brahmajit Das 2023-07-19 07:25:05 UTC
(In reply to Jonathan Marten from comment #3)
> Confirmed still a problem for app-text/discount-2.2.7c, but
> currently masked version app-text/discount-3.0.0a compiles and installs
> correctly.

I can confirm that as well.
Comment 5 Brahmajit Das 2023-08-16 05:27:00 UTC
Looks like its fixed with discount-3.0.0a
Comment 6 Ben Kohler gentoo-dev 2023-08-16 14:05:07 UTC
Yes unfortunately when I last checked, it breaks most consumers of discount, due to API changes.  I'll take a look and see if the situation has improved.

If you're just using discount directly (not as a dep of something else), feel free to unmask 3.0.0a and use it.
Comment 7 Agostino Sarubbo gentoo-dev 2023-12-22 07:54:29 UTC
gcc14_tinderbox has reproduced this issue with version 2.2.7c - Updating summary.
Comment 8 tdr 2024-03-23 22:20:57 UTC
app-text/discount-2.2.7c (as per original bug titel) is not contained to muscl, fails wtih with gcc-14 on glibc and requires use of -fpermissive

main.c:311:36: warning: passing argument 2 of ‘mkd_e_code_format’ from incompatible pointer type [-Wincompatible-pointer-types]
  311 |             mkd_e_code_format(doc, external_codefmt);
      |                                    ^~~~~~~~~~~~~~~~
      |                                    |
      |                                    char * (*)(char *, int,  char *)
Comment 9 Larry the Git Cow gentoo-dev 2024-05-13 14:33:42 UTC
The bug has been closed via the following commit(s):

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

commit 261d388060c886afade681b01b650905be87e3a5
Author:     Ian Jordan <immoloism@gmail.com>
AuthorDate: 2024-05-13 14:04:58 +0000
Commit:     Ben Kohler <bkohler@gentoo.org>
CommitDate: 2024-05-13 14:27:55 +0000

    app-text/discount: C99 Fixes
    
    Cherrypicked patch from Atri Bhattacharya to fix C99 compile time errors.
    Upstream are not interested in this as it works in v3 so this seems the best way forward.
    
    Closes: https://bugs.gentoo.org/894560
    Signed-off-by: Ian Jordan <immoloism@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/36662
    Signed-off-by: Ben Kohler <bkohler@gentoo.org>

 app-text/discount/discount-2.2.7c-r1.ebuild        | 71 ++++++++++++++++++++++
 .../discount/files/discount-2.2.7c-C99-fix.patch   | 38 ++++++++++++
 2 files changed, 109 insertions(+)