Commit 96de933
build: Fix searching libdnf header files
Previously, a search path for in-source libdnf header files was listed
in the middle of paths for other dependencies. That caused swig to
generate bindings from system header files, possible incompatible with
the in-source library, leading to a build failure like this:
cd /home/test/fedora/libdnf/libdnf-0.74.0-build/libdnf-0.74.0/build-py3/bindings/python && /usr/bin/cmake -E env SWIG_LIB=/usr/share/swig/4.3.1 /usr/bin/swig -python -DSWIGWORDSIZE64 -DLIBDNF_UNSTABLE_API -outdir /home/test/fedora/libdnf/libdnf-0.74.0-build/libdnf-0.74.0/build-py3/bindings/python -c++ -interface _repo -I/usr/include/gio-unix-2.0 -I/usr/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/sysprof-6 -I/usr/include/json-c -I/usr/include/libxml2 -I/home/test/fedora/libdnf/libdnf-0.74.0-build/libdnf-0.74.0 -I/home/test/fedora/libdnf/libdnf-0.74.0-build/libdnf-0.74.0/libdnf/utils -I/usr/include/python3.14 -o /home/test/fedora/libdnf/libdnf-0.74.0-build/libdnf-0.74.0/build-py3/bindings/python/CMakeFiles/_repo.dir/repoPYTHON_wrap.cxx /home/test/fedora/ libdnf/libdnf-0.74.0-build/libdnf-0.74.0/bindings/swig/repo.i
[...]
/home/test/fedora/libdnf/libdnf-0.74.0-build/libdnf-0.74.0/build-py3/bindings/python/CMakeFiles/_conf.dir/confPYTHON_wrap.cxx: In function ‘PyObject* _wrap_ConfigMain_usr_drift_protected_paths(PyObject*, PyObject*)’:
/home/test/fedora/libdnf/libdnf-0.74.0-build/libdnf-0.74.0/build-py3/bindings/python/CMakeFiles/_conf.dir/confPYTHON_wrap.cxx:23913:54: error: ‘class libdnf::ConfigMain’ has no member named ‘usr_drift_protected_paths’
23913 | result = (libdnf::OptionStringList *) &(arg1)->usr_drift_protected_paths();
| ^~~~~~~~~~~~~~~~~~~~~~~~~
This patch fixes the header search path order by placing both paths to
the in-source header files at the very first place.
Resolve: #17161 parent a067e64 commit 96de933
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| |||
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
0 commit comments