[Home]

Summary:ASTERISK-28374: latest asterisk unconditionally launch gcc --version, even if the compiler is different
Reporter:Guido Falsi (madpilot)Labels:
Date Opened:2019-04-07 11:36:22Date Closed:2019-04-23 15:25:36
Priority:MinorRegression?Yes
Status:Closed/CompleteComponents:Core/BuildSystem
Versions:13.26.0 16.3.0 Frequency of
Occurrence
Occasional
Related
Issues:
Environment:Any where main compiler is named differently than gcc, but there is also gcc 8.x around. Encountered in the FreeBSD port.Attachments:
Description:In latest asterisk a check for GCC version has been added. It is performed by unconditionally running "gcc --version".

If the main compiler being used is another one (F.E. cc) this check will test the wrong compiler and add compiler flags which may be incorrect.

On FreeBSD the main compiler is clang, named cc. When gcc 8 is installed on the system, this check will return true, and add a compiler flag which is refused by clang, causing the build to fail.

I'm going to propose a review on gerrit patching the Makefile to perform the check using the $(CC) variable, containing the actual compiler being used for the build.
Comments:By: Asterisk Team (asteriskteam) 2019-04-07 11:36:23.646-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Friendly Automation (friendly-automation) 2019-04-23 15:25:36.650-0500

Change 11238 merged by Friendly Automation:
core/buildsystem: check the actual compiler being version

[https://gerrit.asterisk.org/c/asterisk/+/11238|https://gerrit.asterisk.org/c/asterisk/+/11238]

By: Friendly Automation (friendly-automation) 2019-04-23 15:25:49.085-0500

Change 11240 merged by Friendly Automation:
core/buildsystem: check the actual compiler being version

[https://gerrit.asterisk.org/c/asterisk/+/11240|https://gerrit.asterisk.org/c/asterisk/+/11240]

By: Friendly Automation (friendly-automation) 2019-04-23 15:28:07.306-0500

Change 11239 merged by Friendly Automation:
core/buildsystem: check the actual compiler being version

[https://gerrit.asterisk.org/c/asterisk/+/11239|https://gerrit.asterisk.org/c/asterisk/+/11239]

By: Alexander Traud (traud) 2020-03-26 05:15:42.608-0500

Although the latest ‘Certified Asterisk’ was released in December, it is still affected by this issue because it is based on Asterisk 16.3. The change was not backported but is going to come when ‘Certified Asterisk 16.8’ is released. Therefore, I am adding the shown error message for those who have GCC installed alongside, so it is found easier perhaps:
{code}clang: error: unknown argument: '-fno-partial-inlining'{code}
Until asterisk-certified-16.8-cert1 is released, either go for
a) the patch from the review ([Gerrit|https://gerrit.asterisk.org/changes/asterisk~11239/revisions/2/patch?zip&path=Makefile.rules] or [GitHub|https://github.com/asterisk/asterisk/commit/4dcfa8d1277b23a933152e37db342ff3e6c07c51.patch]) or
b) {{make menuselect}} → Compiler Flags → DONT_OPTIMIZE: Enable _and_ (because of ASTERISK-28792) Codec Translator → codec_gsm: Disable
c) not a certified release but the [current release…|https://www.asterisk.org/downloads/asterisk/all-asterisk-versions]