Bug 248902

Summary: multimedia/obs-studio: fix new linker duplicate symbol error
Product: Ports & Packages Reporter: Dave Cottlehuber <dch>
Component: Individual Port(s)Assignee: Tobias C. Berner <tcberner>
Status: Closed FIXED    
Severity: Affects Many People CC: kevans, yuri
Priority: --- Keywords: needs-qa
Version: LatestFlags: bugzilla: maintainer-feedback? (yuri)
koobs: merge-quarterly?
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 248756    
Attachments:
Description Flags
patch linker duplicate symbol error
none
same patch but bump PORTREVISION also koobs: maintainer-approval+

Description Dave Cottlehuber freebsd_committer freebsd_triage 2020-08-25 09:16:22 UTC
Created attachment 217515 [details]
patch linker duplicate symbol error

fix linker duplicate symbol gladGetProcAddressPtr

The following error comes during build (poudriere 13.0-CURRENT amd64)"
    
    ld: error: duplicate symbol: gladGetProcAddressPtr
    >>> defined at glad.c
    >>>            deps/glad/CMakeFiles/glad.dir/src/glad.c.o:(gladGetProcAddressPtr)
    >>> defined at glad_glx.c
    >>>            deps/glad/CMakeFiles/glad.dir/src/glad_glx.c.o:(.bss+0x8)
    cc: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.

Plucked from upstream commit c7f84f8fc4e90ef779a204ac268f5ee1a962e324 from Jimi Huotari <chiitoo@gentoo.org>:

    deps/glad: Fix build with GCC-10
    
    GCC-10 defaults to '-fno-common' [1], which triggers issues with
    defining global variables multiple times.  To fix the build, use
    'extern' to turn the first definition of 'gladGetProcAddressPtr'
    into a declaration.
    
    1. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678
    
    Closes https://github.com/obsproject/obs-studio/issues/2828
Comment 1 Dave Cottlehuber freebsd_committer freebsd_triage 2020-08-25 09:47:27 UTC
Created attachment 217517 [details]
same patch but bump PORTREVISION also

Mea culpa, this should have PORTREVISION bumped as well.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2020-08-26 05:52:07 UTC
Comment on attachment 217517 [details]
same patch but bump PORTREVISION also

@Dave, build, run, package fixes are:

Approved by: portmgr (blanket: build fix)
MFH: 2020Q3 (blanket: build fix)
Comment 3 Kyle Evans freebsd_committer freebsd_triage 2020-08-29 00:38:12 UTC
Fix was committed as r546339 independently, but the same patch. Thanks! Assigning to committer that committed and closing as FIXED.