Bug 261884 - net/asterisk18: fails to build on FreeBSD-12.3
Summary: net/asterisk18: fails to build on FreeBSD-12.3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Guido Falsi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-11 11:55 UTC by jau
Modified: 2022-03-05 12:09 UTC (History)
0 users

See Also:
madpilot: maintainer-feedback+


Attachments
typsecript of a failed build (9.76 KB, text/plain)
2022-02-11 11:55 UTC, jau
no flags Details
A typescript showing the complete build starting from fetch (907.05 KB, text/plain)
2022-02-12 12:00 UTC, jau
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description jau 2022-02-11 11:55:07 UTC
Created attachment 231750 [details]
typsecript of a failed build

See the attached typescript.
Comment 1 Guido Falsi freebsd_committer freebsd_triage 2022-02-11 13:42:50 UTC
The log of the build you attached shows a make command followed only by the staging and packaging phases only of the build.

The errors shown there are not enough to understand what is going on.

Could you try again after a "make clean" in the port directory and in case of error attach a full log of the full port build process?
Comment 2 jau 2022-02-12 11:58:22 UTC
(In reply to Guido Falsi from comment #1)

Right... Here is a new typescript showing the whole build process including
everything starting from fetching the package files.
Comment 3 jau 2022-02-12 12:00:20 UTC
Created attachment 231769 [details]
A typescript showing the complete build starting from fetch

A typescript showing the complete build starting from fetch
Comment 4 Guido Falsi freebsd_committer freebsd_triage 2022-02-12 13:39:26 UTC
Looks like a part of a Makefile normally not executed on FreeBSD gets triggered on on your system.

That part of Makefile is not applicable to the ports tree, and is also using a command only available on Linux.

If I'm correct (I'm testing this here tight now) the presence of the textproc/xmlstarlet triggers such condition.

On BSD systems such command installs an "xml" executable and it looks like you have it:

```
checking for xmlstarlet... no
checking for xml... /usr/local/bin/xml
```

You can work around the issue by temporarily unistalling the textproc/xmlstarlet port or temporarily renaming the /usr/local/bin/xml program.

I'm going to test a fix that prevents the asterisk ports from using that command. The part of the Makefile where it is used is not needed for the ports tree and in fact wrong, it tries to download files during the install phase.

I'll commit it as soon as I'm done testing, please stand by a little while.
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-02-12 14:28:50 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9267d1fb2f64b42c306d51453d71cdf4ca5ecf6b

commit 9267d1fb2f64b42c306d51453d71cdf4ca5ecf6b
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2022-02-12 14:26:59 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2022-02-12 14:28:05 +0000

    net/asterisk18: Fix build when textproc/xmlstarlet is installed

    Asterisk build system checks for presence of xmlstarlet as "xml"
    binary on the system.

    If found it triggers part of the build system trying to download
    some external files during the install phase which even uses a
    command line tool not available on FreeBSD.

    Such code is not necessary for the port, as all supported modules
    are downloaded using ports tree provided functionality. Furthermore
    downloading files from the internet is forbidden during the install
    phase.

    This patch forces the variable used by the Makefiles to identify
    xmlstarlet presence to be empty. so the code path described above
    is not triggered.

    PR:             261884

 net/asterisk18/Makefile | 1 +
 1 file changed, 1 insertion(+)
Comment 6 commit-hook freebsd_committer freebsd_triage 2022-02-12 14:28:51 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f0f667985b8db89511e7caf5a37fa151f10e1cde

commit f0f667985b8db89511e7caf5a37fa151f10e1cde
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2022-02-12 14:25:52 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2022-02-12 14:28:05 +0000

    net/asterisk16: Fix build when textproc/xmlstarlet is installed

    Asterisk build system checks for presence of xmlstarlet as "xml"
    binary on the system.

    If found it triggers part of the build system trying to download
    some external files during the install phase which even uses a
    command line tool not available on FreeBSD.

    Such code is not necessary for the port, as all supported modules
    are downloaded using ports tree provided functionality. Furthermore
    downloading files from the internet is forbidden during the install
    phase.

    This patch forces the variable used by the Makefiles to identify
    xmlstarlet presence to be empty. so the code path described above
    is not triggered.

    PR:             261884

 net/asterisk16/Makefile | 1 +
 1 file changed, 1 insertion(+)
Comment 7 Guido Falsi freebsd_committer freebsd_triage 2022-02-12 14:30:14 UTC
Fix committed right now.

Can you test again and report back, also close this bug report if you can confirm the issue as fixed?

Thanks!
Comment 8 jau 2022-02-15 12:10:19 UTC
(In reply to Guido Falsi from comment #7)

Now it seems to configure and build just fine.
Thanks.
Comment 9 Guido Falsi freebsd_committer freebsd_triage 2022-02-18 15:36:02 UTC
Fix committed. Thanks!
Comment 10 commit-hook freebsd_committer freebsd_triage 2022-03-05 12:09:03 UTC
A commit in branch 2022Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e00d16832d53fa4a6872eeddbc4c505e683eb5c6

commit e00d16832d53fa4a6872eeddbc4c505e683eb5c6
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2022-02-12 14:25:52 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2022-03-05 12:07:06 +0000

    net/asterisk16: Fix build when textproc/xmlstarlet is installed

    Asterisk build system checks for presence of xmlstarlet as "xml"
    binary on the system.

    If found it triggers part of the build system trying to download
    some external files during the install phase which even uses a
    command line tool not available on FreeBSD.

    Such code is not necessary for the port, as all supported modules
    are downloaded using ports tree provided functionality. Furthermore
    downloading files from the internet is forbidden during the install
    phase.

    This patch forces the variable used by the Makefiles to identify
    xmlstarlet presence to be empty. so the code path described above
    is not triggered.

    PR:             261884
    (cherry picked from commit f0f667985b8db89511e7caf5a37fa151f10e1cde)

 net/asterisk16/Makefile | 1 +
 1 file changed, 1 insertion(+)
Comment 11 commit-hook freebsd_committer freebsd_triage 2022-03-05 12:09:04 UTC
A commit in branch 2022Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=17ade4ed2f181515f7516573328ebbd245bb3964

commit 17ade4ed2f181515f7516573328ebbd245bb3964
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2022-02-12 14:26:59 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2022-03-05 12:08:10 +0000

    net/asterisk18: Fix build when textproc/xmlstarlet is installed

    Asterisk build system checks for presence of xmlstarlet as "xml"
    binary on the system.

    If found it triggers part of the build system trying to download
    some external files during the install phase which even uses a
    command line tool not available on FreeBSD.

    Such code is not necessary for the port, as all supported modules
    are downloaded using ports tree provided functionality. Furthermore
    downloading files from the internet is forbidden during the install
    phase.

    This patch forces the variable used by the Makefiles to identify
    xmlstarlet presence to be empty. so the code path described above
    is not triggered.

    PR:             261884
    (cherry picked from commit 9267d1fb2f64b42c306d51453d71cdf4ca5ecf6b)

 net/asterisk18/Makefile | 1 +
 1 file changed, 1 insertion(+)