Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1977579

Summary: asterisk-18.4.0-1.fc35.1 FTBFS: asterisk-18.4.0/include/asterisk/astmm.h:160:42: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: asteriskAssignee: Jared Smith <jsmith.fedora>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 35CC: bennie.joubert, jsmith.fedora, mspacek, odubaj, rbryant
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://koschei.fedoraproject.org/package/asterisk
Whiteboard:
Fixed In Version: asterisk-18.4.0-1.fc36.5 asterisk-18.4.0-1.fc35.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-07 01:15:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1927309, 1936597, 1992484, 2045102, 2090762    

Description Petr Pisar 2021-06-30 06:33:48 UTC
asterisk-18.4.0-1.fc35.1 fails to build in Fedora 35:

make[1]: Entering directory '/builddir/build/BUILD/asterisk-18.4.0/channels'
gcc -o console_board.o -c console_board.c -MD -MT console_board.o -MF .console_board.o.d -MP -pthread -I/builddir/build/BUILD/asterisk-18.4.0/include -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Werror-implicit-function-declaration -DLUA_COMPAT_MODULE -fPIC  -I/usr/include/libxml2 -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations     -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC -DAST_MODULE=\"chan_oss\" -DAST_MODULE_SELF_SYM=__internal_chan_oss_self  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT     
In file included from /builddir/build/BUILD/asterisk-18.4.0/include/asterisk.h:23,
                 from console_board.c:44:
/builddir/build/BUILD/asterisk-18.4.0/include/asterisk/astmm.h:160:42: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
  160 |         Do_not_use_malloc__use_ast_malloc->fail(a)
      |                                          ^~
/builddir/build/BUILD/asterisk-18.4.0/include/asterisk/astmm.h:158:42: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
  158 |         Do_not_use_calloc__use_ast_calloc->fail(a, b)
      |                                          ^~
/builddir/build/BUILD/asterisk-18.4.0/include/asterisk/astmm.h:164:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
  164 |         Do_not_use_realloc__use_ast_realloc->fail(a, b)
      |                                            ^~
/builddir/build/BUILD/asterisk-18.4.0/include/asterisk/astmm.h:162:84: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
  162 |         Do_not_use_free__use_ast_free_or_ast_std_free_for_remotely_allocated_memory->fail(a)
      |                                                                                    ^~
make[1]: *** [/builddir/build/BUILD/asterisk-18.4.0/Makefile.rules:165: console_board.o] Error 1

A difference between passing and failing build root is at <https://koschei.fedoraproject.org/build/10392462>.

Comment 1 Fedora Release Engineering 2021-07-11 04:23:07 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 35.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2021-08-25).

A week before the mass branching of Fedora 36 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 34 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-36/f-36-key-tasks.html

Comment 2 Fedora Release Engineering 2021-08-01 04:23:02 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 35.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2021-08-25).

A week before the mass branching of Fedora 36 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 34 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-36/f-36-key-tasks.html

Comment 3 Ben Cotton 2021-08-10 13:10:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle.
Changing version to 35.

Comment 4 Fedora Release Engineering 2021-08-22 04:22:23 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 35.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2021-08-25).

A week before the mass branching of Fedora 36 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 34 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-36/f-36-key-tasks.html

Comment 5 Fedora Release Engineering 2021-09-12 04:22:20 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 35.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2021-08-25).

A week before the mass branching of Fedora 36 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 34 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-36/f-36-key-tasks.html

Comment 6 Jared Smith 2021-09-23 15:51:11 UTC
I'm working on this.

Comment 7 Petr Pisar 2022-02-07 08:49:11 UTC
*** Bug 1999433 has been marked as a duplicate of this bug. ***

Comment 8 Michal Josef Spacek 2022-04-07 16:24:24 UTC
This issue(s) seems to be related to gcc 11.

There is no possibility to rebuild f35 version of asterisk, which was build. With same issue.

I observed two things:
* ASTMM issue mentioned in this ticket.
** It could be muted by #define ASTMM_LIBC ASTMM_IGNORE in channels/console_board.c before calling of #include "asterisk.h".
** I don't understand root cause
* Issue with res_snmp and -fPIC (https://issues.asterisk.org/jira/browse/ASTERISK-29634)

I prepared PR for it, but will be good to review.
https://src.fedoraproject.org/rpms/asterisk/pull-request/15

Tested build on systems:
* rawhide
* f36
* f35

Comment 9 Michal Josef Spacek 2022-06-15 17:18:32 UTC
I updated PR (rebase, add 18.11.2, fix issue witl ilbc v3)
Still no one to merge it.

Comment 10 Fedora Update System 2022-06-28 14:24:36 UTC
FEDORA-2022-25ba58cc83 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-25ba58cc83

Comment 11 Fedora Update System 2022-06-28 14:24:38 UTC
FEDORA-2022-39e20b8128 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-39e20b8128

Comment 12 Fedora Update System 2022-06-29 01:17:46 UTC
FEDORA-2022-25ba58cc83 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-25ba58cc83`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-25ba58cc83

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2022-06-29 01:33:33 UTC
FEDORA-2022-39e20b8128 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-39e20b8128`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-39e20b8128

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2022-07-07 01:15:28 UTC
FEDORA-2022-39e20b8128 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2022-07-07 01:17:49 UTC
FEDORA-2022-25ba58cc83 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.