Bug 1371704

Summary: ostree-devel linking requires unavailable symbol g_file_enumerator_iterate
Product: Red Hat Enterprise Linux 7 Reporter: Patrick Uiterwijk <puiterwijk>
Component: ostreeAssignee: Jonathan Lebon <jlebon>
Status: CLOSED NEXTRELEASE QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: dkochuka, jlebon, santiago, wmeng
Target Milestone: rcKeywords: Extras, Reopened
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: 2017-06-06 13:35:14 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:
Bug Depends On:    
Bug Blocks: 1420851    
Attachments:
Description Flags
Example program
none
Add versioned runtime req on glib2 none

Description Patrick Uiterwijk 2016-08-30 21:23:11 UTC
Created attachment 1196083 [details]
Example program

Description of problem:
When trying to link a program against ostree-devel, this is impossible because the libgsystem in the atomic host repository is missing various symbols.

Version-Release number of selected component (if applicable):
ostree-2016.7-2.atomic.el7.x86_64
ostree-devel-2016.7-2.atomic.el7.x86_64
libgsystem-2015.1-1.atomic.el7.x86_64

How reproducible:
Consistent

Steps to Reproduce:
1. Grab the source code attached
2. Run gcc `pkg-config --libs --cflags ostree-1` input.c

Actual results:
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libostree-1.so: undefined reference to `g_file_enumerator_iterate'
collect2: error: ld returned 1 exit status

Expected results:
Compiled a.out.

Additional info:

Comment 1 Patrick Uiterwijk 2016-08-30 21:35:39 UTC
The symbol is be in glib2.
Glib2 version:
glib2-2.42.2-5.el7.x86_64

Comment 2 Patrick Uiterwijk 2016-08-30 21:39:31 UTC
Sorry, wrong glib2 version.
This issue is fixed in 2.46.

Comment 3 Patrick Uiterwijk 2016-09-02 12:00:38 UTC
So, this is an actual bug, in that rpm allowed me to install this set.
I guess that the ostree spec is missing a version specification for the glib2 dependency.

Comment 6 Jonathan Lebon 2017-05-03 16:29:05 UTC
I was surprised to see that glib doesn't use versioned symbols, which lead me to: <https://mail.gnome.org/archives/desktop-devel-list/2010-May/msg00075.html>.

Anyway, specifically for this, it seems like we should just hard require whatever version we were compiled against since the backports are determined at compile time. Though that would be really annoying to maintain in the dist-gits since different Fedora/RHEL releases have different glib2 versions. Not sure if there's an RPM spec trick we can use here to avoid this.

Comment 7 Jhon Honce 2017-06-05 16:46:29 UTC
*** Bug 1458819 has been marked as a duplicate of this bug. ***

Comment 8 Jonathan Lebon 2017-06-05 19:46:29 UTC
Created attachment 1285131 [details]
Add versioned runtime req on glib2

Comment 9 Jonathan Lebon 2017-06-06 13:35:14 UTC
Should be fixed in 7.4.