Bug 2031182

Summary: Building new libvmi fails on Fedora 35 due to bad -L setting related to glib2
Product: [Fedora] Fedora Reporter: W. Michael Petullo <mike>
Component: libvmiAssignee: W. Michael Petullo <redhat>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 35CC: besser82, jreznik, rdieter, redhat, trpost, walter.pete
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-12-15 12:01:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description W. Michael Petullo 2021-12-10 17:45:28 UTC
Description of problem:
I am trying to build libvmi on Fedora 35, but the build fails due to a bad compiler flag. Fedora 34 works.

Version-Release number of selected component (if applicable):
cmake-3.22.0-4.fc35.x86_64

How reproducible:
Every time

Steps to Reproduce:
Building libvmi-0.14.0 on Fedora 35 with the following commands results in the indicated error:

$ mkdir build
$ cd build
$ cmake ..
$ make VERBOSE=1
[...]
/usr/bin/cc  -Wall -Wextra -g -g3 -O0  -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -rdynamic CMakeFiles/map-addr.dir/map-addr.c.o -o map-addr  -Wl,-rpath,/home/mike/Download/libvmi-0.14.0/build/libvmi ../libvmi/libvmi.so.0.0.14 -L/usr/lib64glib-2.0 
/usr/bin/ld: ../libvmi/libvmi.so.0.0.14: undefined reference to `g_direct_hash'
/usr/bin/ld: ../libvmi/libvmi.so.0.0.14: undefined reference to `g_tree_new_full'
/usr/bin/ld: ../libvmi/libvmi.so.0.0.14: undefined reference to `g_slist_free_full'
[...]
collect2: error: ld returned 1 exit status

Notice the use of "-L/usr/lib64glib-2.0". A '/' is missing from the path, and the directory contains headers, not libraries.

Additional info:
See also https://github.com/libvmi/libvmi/issues/1002.

Comment 1 Björn 'besser82' Esser 2021-12-15 12:01:20 UTC
This is actually a bug in libvmi itself, as it doesn't use the output of pkgconfig properly.

Fixed by https://src.fedoraproject.org/rpms/libvmi/c/3d132c9990c0377fcf1b7c7faea159d4d5e9722a

Comment 3 W. Michael Petullo 2021-12-15 14:21:17 UTC
Thank you, Björn!

Comment 4 Björn 'besser82' Esser 2021-12-15 17:05:02 UTC
(In reply to W. Michael Petullo from comment #3)
> Thank you, Björn!

You're welcome!