Bug 1871089

Summary: bsd-games (probably incorrectly) build-depends on flex-devel
Product: [Fedora] Fedora Reporter: Arjun Shankar <ashankar>
Component: bsd-gamesAssignee: Jeff Makey <jeff>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jaromir.capik, jeff, sergio, wart
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: 2020-10-06 20:49:29 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 Arjun Shankar 2020-08-21 10:16:11 UTC
I'm filing this report because when I run the following command:
dnf repoquery --disablerepo="*" --enablerepo="*-source" --arch=src --whatdepends flex-devel

I see bsd-games listed among the results.

flex-devel used to provide only libfl.a, a static library.

As per Fedora packaging guidelines, a build dependency on a static library should be represented by depending on the -static subpackage, not the -devel one that might actually contain the static library:

https://docs.fedoraproject.org/en-US/packaging-guidelines/#_statically_linking_executables

I just changed the subpackage split of flex, and have obsoleted flex-devel.

Although build-dependent packages will continue to build, a build-dependency requiring libfl.a should now ideally build-depend on libfl-static. flex now also provides shared libraries, and a build-dependency on libfl.so, should now depend on libfl2 (shared library) and libfl2-devel (headers).

Comment 1 Sergio Basto 2020-08-25 08:36:40 UTC
bsd-games needs flex-devel without flex-devel [1] , what you suggest ? 

[1]
gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -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 -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings    -Iinclude   -Itrek  -c trek/warp.c -o trek/warp.o
gcc  atc/extern.o atc/grammar.o atc/graphics.o atc/input.o atc/lex.o atc/list.o atc/log.o atc/main.o atc/tunable.o atc/update.o lib/strlcpy.o -lm -lncurses -lfl  -o atc/atc
/usr/bin/ld: cannot find -lfl
collect2: error: ld returned 1 exit status

Comment 2 Arjun Shankar 2020-09-08 12:44:29 UTC
> bsd-games needs flex-devel without flex-devel [1] , what you suggest ?
> 
> [1]
> gcc  atc/extern.o atc/grammar.o atc/graphics.o atc/input.o atc/lex.o
> atc/list.o atc/log.o atc/main.o atc/tunable.o atc/update.o lib/strlcpy.o -lm
> -lncurses -lfl  -o atc/atc
> /usr/bin/ld: cannot find -lfl
> collect2: error: ld returned 1 exit status

You may declare a build-dependency on libfl-static instead. This subpackage is
available in rawhide now.

Comment 3 Sergio Basto 2020-09-14 19:36:41 UTC
No matching package to install: 'libfl-static' on F33, 
libfl-static just exist on F34 , for F31 to F33 can you provide libfl-static ? you may just add "Provides:libfl-static" to flex-devel of flex.spec

Comment 4 Sergio Basto 2020-09-14 19:45:42 UTC
Forget , I added [1] , I hope this fix build in all branches and HTH you, feel free to suggest more modifications .
Thanks

[1]
%if 0%{?fedora} > 33
BuildRequires: libfl-static
%else
BuildRequires: flex-devel
%endif

Comment 5 Jeff Makey 2020-10-06 20:49:29 UTC
This is resolved in bsd-games-2.17-64.