[Home]

Summary:ASTERISK-29986: build: Asterisk 18.11.0 doesn't compile when wget isn't available
Reporter:Stefan Ruijsenaars (stefanr)Labels:
Date Opened:2022-03-25 08:54:00Date Closed:2022-03-29 11:37:52
Priority:MajorRegression?
Status:Closed/CompleteComponents:Core/BuildSystem
Versions:18.11.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) makeopts-truncated.txt
Description:The error we get when running make is:

build_tools/make_xml_documentation: 25: /tmp/ast_makeopts.29219.env: : Permission denied

This happens while running the following command:

build_tools/make_xml_documentation --command=create_xml --source-tree=. --mod-subdirs="channels pbx apps codecs formats cdr cel bridges funcs tests main res addons" --with-moduleinfo --validate --output-file=doc/core-en_US.xml

Which, in turn, runs:

build_tools/get_sourceable_makeopts ./makeopts

Which generates  /tmp/ast_makeopts.29219.env, which, when sourced, tries to parse:

DOWNLOAD="/usr/bin/curl -O --progress-bar -w "%{url_effective}
""
DOWNLOAD_TO_STDOUT="/usr/bin/curl -Ls"

Line 25 is the "" one, which generates a permission denied error.

The newline here looks to be a problem:
DOWNLOAD=/usr/bin/curl -O --progress-bar -w "%{url_effective}\n"

If wget is available, DOWNLOAD Is set to a different value that doesn't contain a newline, and asterisk compiles fine.
Comments:By: Asterisk Team (asteriskteam) 2022-03-25 08:54:01.653-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. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

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.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: George Joseph (gjoseph) 2022-03-25 09:06:04.469-0500

Can you attach a copy of your "makeopts" file?


By: Stefan Ruijsenaars (stefanr) 2022-03-25 09:11:11.302-0500

Copypasted from my terminal scrollback, so truncated. The problematic line was:

DOWNLOAD=/usr/bin/curl -O --progress-bar -w "%{url_effective}\n"

By: George Joseph (gjoseph) 2022-03-25 09:43:56.594-0500

There are patches up on Gerrit (listed above).  Can you see if they fix the issue?


By: Stefan Ruijsenaars (stefanr) 2022-03-25 10:49:15.705-0500

It should, as even just removing the \ n fixed the issue for me at the time. Although the cleaner fix might be to fix build_tools/get_sourceable_makeopts instead, so it doesn't give unparseable output? Other than newlines there might be another couple of edge cases that aren't covered in the script - for instance, when we did ./configure PJPROJECT_CONFIGURE_OPTS='CFLAGS="-DNDEBUG -fno-omit-frame-pointer"' it was giving unparseable output as well.

By: George Joseph (gjoseph) 2022-03-25 13:22:54.455-0500

It was?  OK, I'll take another look.


By: George Joseph (gjoseph) 2022-03-28 08:43:21.973-0500

Try the new patch.  I got rid of the get_sourceable_makeopts so it should work as before.


By: Stefan Ruijsenaars (stefanr) 2022-03-28 08:57:30.556-0500

That works, thanks!

By: Friendly Automation (friendly-automation) 2022-03-29 11:37:53.246-0500

Change 18290 merged by Friendly Automation:
make_xml_documentation: Remove usage of get_sourceable_makeopts

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

By: Friendly Automation (friendly-automation) 2022-03-29 11:39:37.980-0500

Change 18292 merged by Friendly Automation:
make_xml_documentation: Remove usage of get_sourceable_makeopts

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

By: Friendly Automation (friendly-automation) 2022-03-29 11:40:23.872-0500

Change 18291 merged by Friendly Automation:
make_xml_documentation: Remove usage of get_sourceable_makeopts

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

By: Friendly Automation (friendly-automation) 2022-03-29 12:31:13.943-0500

Change 18266 merged by Friendly Automation:
make_xml_documentation: Remove usage of get_sourceable_makeopts

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

By: Friendly Automation (friendly-automation) 2022-03-29 12:33:22.903-0500

Change 18258 merged by Friendly Automation:
make_xml_documentation: Remove usage of get_sourceable_makeopts

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

By: Friendly Automation (friendly-automation) 2022-03-29 12:38:24.557-0500

Change 18268 merged by Friendly Automation:
make_xml_documentation: Remove usage of get_sourceable_makeopts

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

By: Friendly Automation (friendly-automation) 2022-03-29 12:42:03.778-0500

Change 18267 merged by Kevin Harwell:
make_xml_documentation: Remove usage of get_sourceable_makeopts

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