Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 655246 - x11-libs/fltk-1.3.5-r1 ignores LDFLAGS
Summary: x11-libs/fltk-1.3.5-r1 ignores LDFLAGS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Desktop Misc. Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-08 06:21 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2019-04-30 15:24 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2018-05-08 06:21:21 UTC
x11-libs/fltk-1.3.4 ignores LDFLAGS for most files (except /usr/bin/fluid):


 * QA Notice: Files built without respecting LDFLAGS have been detected
 *  Please include the following list of files in your report:
 * /usr/lib64/fltk/libfltk.so.1.3
 * /usr/lib64/fltk/libfltk_cairo.so.1.3
 * /usr/lib64/fltk/libfltk_forms.so.1.3
 * /usr/lib64/fltk/libfltk_gl.so.1.3
 * /usr/lib64/fltk/libfltk_images.so.1.3
Comment 1 Larry the Git Cow gentoo-dev 2019-04-30 11:22:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=106a4fee21c85fb39dfe0c12249ae69a44dc0b47

commit 106a4fee21c85fb39dfe0c12249ae69a44dc0b47
Author:     Jeroen Roovers <jer@gentoo.org>
AuthorDate: 2019-04-30 11:21:53 +0000
Commit:     Jeroen Roovers <jer@gentoo.org>
CommitDate: 2019-04-30 11:22:15 +0000

    x11-libs/fltk: Inject LDFLAGS
    
    Package-Manager: Portage-2.3.65, Repoman-2.3.12
    Fixes: https://bugs.gentoo.org/show_bug.cgi?id=655246
    Signed-off-by: Jeroen Roovers <jer@gentoo.org>

 x11-libs/fltk/fltk-1.3.5-r1.ebuild | 3 ++-
 x11-libs/fltk/fltk-1.3.9999.ebuild | 3 ++-
 x11-libs/fltk/fltk-1.4.9999.ebuild | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)
Comment 2 Arfrever Frehtes Taifersar Arahesis 2019-04-30 12:36:28 UTC
Above change does not help.

In x11-libs/fltk-1.3.5:

Rules for creating libraries in src/Makefile use $(DSOCOMMAND).
Example:
libfltk.so.$(FL_DSO_VERSION): $(OBJECTS)
        echo $(DSOCOMMAND) $@ ...
        $(DSOCOMMAND) $@ $(OBJECTS) $(LDLIBS)
        $(RM) libfltk.so
        $(LN) libfltk.so.$(FL_DSO_VERSION) libfltk.so

configure.ac:
    case $host_os in
        ...
        linux* | *bsd*)
            ...
            DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o"

So the solution is to set DSOFLAGS.
I tested building with this change and it works correctly:
--- fltk-1.3.5-r1.ebuild
+++ fltk-1.3.5-r1.ebuild
@@ -119,6 +119,7 @@ multilib_src_configure() {
                --enable-xfixes \
                --includedir=${FLTK_INCDIR} \
                --libdir=${FLTK_LIBDIR} \
+               DSOFLAGS="${LDFLAGS}" \
                LDFLAGS="${LDFLAGS}"
 }
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2019-04-30 13:55:31 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #2)
> Above change does not help.

What you probably mean is that it didn't fix the problem entirely. Because it absolutely did help.
Comment 4 Larry the Git Cow gentoo-dev 2019-04-30 14:02:07 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b25676040ffc145791d68d52762bf5363c9b4e94

commit b25676040ffc145791d68d52762bf5363c9b4e94
Author:     Jeroen Roovers <jer@gentoo.org>
AuthorDate: 2019-04-30 14:01:29 +0000
Commit:     Jeroen Roovers <jer@gentoo.org>
CommitDate: 2019-04-30 14:02:04 +0000

    x11-libs/fltk: Define DSOFLAGS
    
    Package-Manager: Portage-2.3.65, Repoman-2.3.12
    Closes: https://bugs.gentoo.org/655246
    Signed-off-by: Jeroen Roovers <jer@gentoo.org>

 x11-libs/fltk/{fltk-1.3.5-r1.ebuild => fltk-1.3.5-r2.ebuild} | 1 +
 x11-libs/fltk/fltk-1.3.9999.ebuild                           | 1 +
 x11-libs/fltk/fltk-1.4.9999.ebuild                           | 1 +
 3 files changed, 3 insertions(+)
Comment 5 Arfrever Frehtes Taifersar Arahesis 2019-04-30 15:24:38 UTC
(In reply to Jeroen Roovers from comment #3)
> (In reply to Arfrever Frehtes Taifersar Arahesis from comment #2)
> > Above change does not help.
> 
> What you probably mean is that it didn't fix the problem entirely. Because
> it absolutely did help.

The cause of problem was not that LDFLAGS was somehow not set, but that build system uses a differently named variable when creating shared libraries.
Setting LDFLAGS="${LDFLAGS}" made no difference.