Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implicit declaration of xmlParseMemory #2059

Closed
xambroz opened this issue Nov 25, 2023 · 1 comment
Closed

implicit declaration of xmlParseMemory #2059

xambroz opened this issue Nov 25, 2023 · 1 comment

Comments

@xambroz
Copy link
Contributor

xambroz commented Nov 25, 2023

Description of Problem:

Compilation with gcc13 and Fedora 40 hardening parameters will end up with the error about using implicit declaration of a function xmlParseMemory in openscap-1.3.9/src/common/xml_iterate.c:

DEBUG util.py:448:   gcc                                    x86_64  13.2.1-5.fc40                   build   34 M
DEBUG util.py:448:   gcc-c++                                x86_64  13.2.1-5.fc40                   build   13 M
DEBUG util.py:448:   libxml2-devel                          x86_64  2.12.0-1.fc40                   build  494 k

OpenSCAP Version:

1.3.9 RELEASE

Operating System & Version:

Fedora Linux F40/Rawhide

Steps to Reproduce:

https://kojipkgs.fedoraproject.org//work/tasks/4967/109474967/build.log

Actual Results:

cd /builddir/build/BUILD/openscap-1.3.9/redhat-linux-build/src/common && /usr/bin/gcc -DHAVE_CONFIG_H -DOSCAP_BUILD_SHARED -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_DL_LIBLTDL=1 -DXMLSEC_NO_GOST2012=1 -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_SIZE_T -D__XMLSEC_FUNCTION__=__func__ -I/builddir/build/BUILD/openscap-1.3.9/compat -I/builddir/build/BUILD/openscap-1.3.9/src -I/builddir/build/BUILD/openscap-1.3.9/src/common -I/builddir/build/BUILD/openscap-1.3.9/src/common/public -I/builddir/build/BUILD/openscap-1.3.9/src/CPE/public -I/builddir/build/BUILD/openscap-1.3.9/src/CVE/public -I/builddir/build/BUILD/openscap-1.3.9/src/CVRF/public -I/builddir/build/BUILD/openscap-1.3.9/src/CVSS/public -I/builddir/build/BUILD/openscap-1.3.9/src/DS/public -I/builddir/build/BUILD/openscap-1.3.9/src/OVAL/public -I/builddir/build/BUILD/openscap-1.3.9/src/OVAL/probes/public -I/builddir/build/BUILD/openscap-1.3.9/src/OVAL/probes/SEAP -I/builddir/build/BUILD/openscap-1.3.9/src/OVAL/probes/SEAP/public -I/builddir/build/BUILD/openscap-1.3.9/src/OVAL -I/builddir/build/BUILD/openscap-1.3.9/src/source/public -I/builddir/build/BUILD/openscap-1.3.9/src/XCCDF -I/builddir/build/BUILD/openscap-1.3.9/src/XCCDF/public -I/builddir/build/BUILD/openscap-1.3.9/src/XCCDF_POLICY -I/builddir/build/BUILD/openscap-1.3.9/src/XCCDF_POLICY/public -I/builddir/build/BUILD/openscap-1.3.9/yaml-filter/src -I/builddir/build/BUILD/openscap-1.3.9/redhat-linux-build -I/usr/include/libxml2 -I/usr/include/xmlsec1 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -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 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -pipe -W -Wall -Wnonnull -Wshadow -Wformat -Wundef -Wno-unused-parameter -Wmissing-prototypes -Wno-unknown-pragmas -Wno-int-conversion -Werror=implicit-function-declaration -D_GNU_SOURCE -std=c99 -D_POSIX_C_SOURCE=200112L -DNDEBUG -fPIC -fvisibility=hidden -MD -MT src/common/CMakeFiles/common_object.dir/xml_iterate.c.o -MF CMakeFiles/common_object.dir/xml_iterate.c.o.d -o CMakeFiles/common_object.dir/xml_iterate.c.o -c /builddir/build/BUILD/openscap-1.3.9/src/common/xml_iterate.c
/builddir/build/BUILD/openscap-1.3.9/src/common/xml_iterate.c: In function ‘xml_iterate_dfs’:
/builddir/build/BUILD/openscap-1.3.9/src/common/xml_iterate.c:58:20: error: implicit declaration of function ‘xmlParseMemory’ [-Werror=implicit-function-declaration]
   58 |         if ((doc = xmlParseMemory(input_document, strlen(input_document))) == NULL) {
      |                    ^~~~~~~~~~~~~~
[  9%] Building C object src/common/CMakeFiles/common_object.dir/xmltext_priv.c.o

Expected Results:

it should compile without errors/warnings

Additional Information / Debugging Steps:

@evgenyz
Copy link
Contributor

evgenyz commented Feb 6, 2024

Closed with #2061 or #2062, or both.

@evgenyz evgenyz closed this as completed Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants