[Home]

Summary:ASTERISK-30059: menuselect: libxml include fails under Gentoo
Reporter:waltermoeller (waltermoeller)Labels:patch
Date Opened:2022-05-13 03:04:47Date Closed:2022-05-19 20:40:52
Priority:MajorRegression?
Status:Closed/CompleteComponents:Sounds
Versions:16.26.0 18.12.0 19.4.0 Frequency of
Occurrence
Constant
Related
Issues:
is duplicated byASTERISK-30068 menuselect configure falure
is related toASTERISK-29970 Use pkg-config to find libxml2 headers and libraries
Environment:linux gentoo , kernel 5.18-rc6 in version version 19.4.0 can nit change here . version 19.3.3 is ok !Attachments:( 0) 0001-ast_pkgconfig.m4-AST_PKG_CONFIG_CHECK-relies-on-sed.patch
( 1) asterisk-19-4-0-build.txt
( 2) config.log
( 3) menuselect-config.log
Description:compiling , cant fnd headerfile
Comments:By: Asterisk Team (asteriskteam) 2022-05-13 03:04:49.959-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: Joshua C. Colp (jcolp) 2022-05-13 04:15:22.477-0500

There is not enough information here. You need to attach a console log showing the build failing.

By: Reuben Farrelly (reuben) 2022-05-13 07:08:11.450-0500

console log from 19.4.0 build

By: Reuben Farrelly (reuben) 2022-05-13 07:08:44.939-0500

I'm seeing the same thing on Gentoo.  This breakage is new to 19.4 - not seen on 19.3.  The original report is very thin on details but I'm assuming that what I am observing is the same problem at the OP:

{noformat}
configure: Package configured for:
configure: OS type  : linux-gnu
configure: Host CPU : x86_64
configure: build-cpu:vendor:os: x86_64 : pc : linux-gnu :
configure: host-cpu:vendor:os: x86_64 : pc : linux-gnu :
make -j4 NOISY_BUILD=yes ASTDBDIR=$(ASTDATADIR)/astdb ASTVARRUNDIR=/run/asterisk ASTCACHEDIR=/var/cache/asterisk OPTIMIZE= DEBUG= DESTDIR=/var/tmp/portage/net-misc/asterisk-19.4.0/image CONFIG_SRC=configs/samples CONFIG_EXTEN=.sample menuselect.makeopts
CC="cc" CXX="x86_64-pc-linux-gnu-g++" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" menuselect
make[1]: Entering directory '/var/tmp/portage/net-misc/asterisk-19.4.0/work/asterisk-19.4.0/menuselect'
gcc -g -D_GNU_SOURCE -Wall -Wno-deprecated-declarations -DHAVE_NCURSES    -c -o menuselect.o menuselect.c
gcc -g -D_GNU_SOURCE -Wall -Wno-deprecated-declarations -DHAVE_NCURSES   -c -o strcompat.o strcompat.c
gcc -g -D_GNU_SOURCE -Wall -Wno-deprecated-declarations -DHAVE_NCURSES   -c -o menuselect_stub.o menuselect_stub.c
menuselect.c:35:10: fatal error: libxml/parser.h: No such file or directory
  35 | #include <libxml/parser.h>
     |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [<builtin>: menuselect.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/var/tmp/portage/net-misc/asterisk-19.4.0/work/asterisk-19.4.0/menuselect'
make: *** [Makefile:1061: menuselect/menuselect] Error 2
{noformat}

I imagine the file that the build wants is this one:

{noformat}
supercell ~ # ls -la /usr/include/libxml2/libxml/parser.h
-rw-r--r-- 1 root root 39734 May  4 19:28 /usr/include/libxml2/libxml/parser.h
supercell ~ #
{noformat}

Which is part of:

{noformat}
dev-libs/libxml2-2.9.14-r1 (/usr/include/libxml2/libxml/parser.h)
{noformat}

I will attach a console log of the build to the ticket.


By: Sean Bright (seanbright) 2022-05-13 10:16:22.520-0500

What is the output of {{pkg-config --libs --cflags libxml-2.0}}? Also could you please attach both the {{config.log}} file from the root build directory as well as the one in the {{menuselect}} subdirectory?

By: Reuben Farrelly (reuben) 2022-05-14 00:56:35.008-0500

build logs

By: Reuben Farrelly (reuben) 2022-05-14 00:56:40.180-0500

Sure:

supercell ~ # pkg-config --libs --cflags libxml-2.0
-I/usr/include/libxml2 -lxml2
supercell ~ #



By: Alexander Wetzel (deagol) 2022-05-15 09:40:37.130-0500

Also using Gentoo, same problem. It's probably tied to something in the gentoo ebuild, or at least triggered by some setup done here.
I did not dig deeper but with my custom ebuild ebuild for asterisk I got the same error.
When I used the official tarball and just run configure/make on it it's working.

That said the issue seems to be, that "menuselect/makeopts" for some reasons doesn't get the xml variables filled in correctly:
Here the diffs of the file when I compare the "normal compile" and "my own asterisk ebuild"

--- /usr/src/asterisk-18.12.0/menuselect/makeopts       2022-05-15 14:42:36.633752682 +0200
+++ makeopts    2022-05-15 14:50:04.364355614 +0200
@@ -25,5 +25,5 @@
NEWT_INCLUDE=
NEWT_LIB=

-LIBXML2_INCLUDE=-I/usr/include/libxml2
+LIBXML2_INCLUDE=
LIBXML2_LIB=-lxml2

After fixing the file manually I was able to merge asterisk fine.

edit:
issue is only for makeopts in "menuselect". In the directory above that it's filled in.

edit2:
And I have the issue with 18.12.0 while the the same ebuild did work with  18.11.3


By: Sean Bright (seanbright) 2022-05-17 12:18:46.997-0500

[~waltermoeller], I've attached [a patch|^0001-ast_pkgconfig.m4-AST_PKG_CONFIG_CHECK-relies-on-sed.patch] for 19.4.0 which should resolve the problem. Can you test and confirm that it works for you?

{noformat}
$ cd /path/to/asterisk/src
$ patch -p1 < 0001-ast_pkgconfig.m4-AST_PKG_CONFIG_CHECK-relies-on-sed.patch
$ ./configure
{noformat}

I can provide patches against other release versions if others would like to test or you can just grab it from the Gerrit review linked above.

By: Alexander Wetzel (deagol) 2022-05-18 04:46:48.743-0500

I tested the patch with my custom ebuild. Works for both 19.4.0 and 18.12.0. (Also applied fine without modification to 18.12.0).
Without the patch the builds are failing, with the patch it's working.
18.12.0 should probably be added to the affected version.

To be sure I checked my ebuild with older asterisk versions (without the patch):
18.11.3 compiles
18.12.0 libxml/parser.h error
19.3.3 compiles
19.4.0 libxml/parser.h error


By: Reuben Farrelly (reuben) 2022-05-18 23:30:47.246-0500

I can confirm that the patch fixes the issue for me as well.  Successfully built to completion on 19.4.0 after being applied.

By: waltermoeller (waltermoeller) 2022-05-19 12:45:11.466-0500

hi ,

me has testet new version --- on download site , from 19.5

same errror --- probleme is loading of include , change it in opts --- it is compling

regards


By: Friendly Automation (friendly-automation) 2022-05-19 20:40:53.845-0500

Change 18570 merged by Friendly Automation:
ast_pkgconfig.m4: AST_PKG_CONFIG_CHECK() relies on sed.

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

By: Friendly Automation (friendly-automation) 2022-05-22 15:40:15.359-0500

Change 18554 merged by Joshua Colp:
ast_pkgconfig.m4: AST_PKG_CONFIG_CHECK() relies on sed.

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

By: Friendly Automation (friendly-automation) 2022-05-22 16:35:50.846-0500

Change 18556 merged by Friendly Automation:
ast_pkgconfig.m4: AST_PKG_CONFIG_CHECK() relies on sed.

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

By: Friendly Automation (friendly-automation) 2022-05-22 16:36:39.754-0500

Change 18555 merged by Friendly Automation:
ast_pkgconfig.m4: AST_PKG_CONFIG_CHECK() relies on sed.

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