Bug 2031182 - Building new libvmi fails on Fedora 35 due to bad -L setting related to glib2
Summary: Building new libvmi fails on Fedora 35 due to bad -L setting related to glib2
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libvmi
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: W. Michael Petullo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-10 17:45 UTC by W. Michael Petullo
Modified: 2021-12-15 17:05 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-15 12:01:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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!


Note You need to log in before you can comment on or make changes to this bug.