Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 16335

Summary: fltk-1.1.1 library isn't installed properly
Product: Gentoo Linux Reporter: Steven Dean <zrafnid>
Component: [OLD] LibraryAssignee: Philip Walls (RETIRED) <malverian>
Status: RESOLVED DUPLICATE    
Severity: normal CC: ed, Ricardo.Cordeiro
Priority: High    
Version: 1.4_rc2   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 15572    

Description Steven Dean 2003-02-25 01:10:50 UTC
fltk-1.1.1 compiles well and installs without issue on my machine.  It appears, however, that 
the include files and the .a library files are incorrectly placed. 
 
I have a number of fltk based programs that I tried to compile and found that the following was 
the case:  
 
1) fltk includes are placed in /usr/include/fltk-1.1/(FL|Fl) whereas most software will expect to 
find them in /usr/include/(FL|Fl) 
2) fltk library files are placed in /usr/lib/fltk-1.1/, which is fine given that ld.so.conf is updated 
appropriately, however the .a files are expected to be found in /usr/lib for most programs. 
 
The fix is, of course, to make a symbolic link to FL Fl in /usr/include and a symbolic link to the 
.a files in fltk-1.1 in /usr/lib/fltk-1.1. 
 
Of course, I may be missing something fundamental here - sorry if I am. 
 
Thx. 
 
Steve
Comment 1 Philip Walls (RETIRED) gentoo-dev 2003-03-18 21:37:34 UTC
Can you list all programs you've tried that are looking for them in /usr/include ?
It seems better to keep the includes as they are and tell other programs to look in the proper directory for them.
Comment 2 Alastair Tse (RETIRED) gentoo-dev 2003-03-30 21:47:37 UTC
if there isn't more traffic, i'd mark it as a dup of #15572
Comment 3 Philip Walls (RETIRED) gentoo-dev 2003-04-03 17:08:21 UTC

*** This bug has been marked as a duplicate of 15572 ***
Comment 4 Ed Catmur 2003-11-17 23:44:09 UTC
Please consider reopening - I do not believe this is the same bug as #15572.

Firstly, I am using glibc 2.3.2; secondly my fltk was emerged well after Alastair Tse's patch entered Portage.

Most tellingly, grep '<FL' /usr/include/fltk-1.1/FL/* gives:

FL_Color_Chooser.H:#include <FL/Fl_Group.H>
...
and so on for 98 mentions.

I would argue this shows that the FL header files themselves expect to be found in /usr/include (or, somewhere directly in the include path)

The fltk-1.1.4 ebuild contains the lines:

    econf \
        --includedir=/usr/include/fltk-1.1 \
        --libdir=/usr/lib/fltk-1.1 \
        ${myconf} || die "Configuration Failed"

Thus putting the files in /usr/include/fltk-1.1 and /usr/lib/fltk-1.1 is a Gentoo decision. The default location (as stated in the package README) is /usr/local/include and /usr/local/lib. I understand that Gentoo does not use these locations, but using /usr/include/fltk-1.1 and /usr/lib/fltk-1.1 seems to break things.

If there is a way to make things work with the files in these locations (other than symlinking) I would be interested to know what that is.

Suggest that the ebuild be changed to:

    econf \
        --includedir=/usr/include \
        --libdir=/usr/lib \
        ${myconf} || die "Configuration Failed"
Comment 5 Philip Walls (RETIRED) gentoo-dev 2003-11-18 07:44:24 UTC
I asked this previously, but it would be useful to know which packages break from having fltk installed the way it is. That way we can fix those packages to look in the proper directory rather than changing where fltk installs.
Comment 6 Ed Catmur 2003-11-18 11:07:48 UTC
OK, I'm an idiot:
Of course, one needs to set CPPFLAGS as well as CFLAGS appropriately going into
emake for an ebuild. (and LDLIBS, LDFLAGS...)
I found the following to work:

        local -a mycflagsarr
        local mycppflags
 
        mycflagsarr=($CFLAGS `fltk-config --cflags`)
        mycppflags="${mycflagsarr[@]##-[^I]*}"
 
        emake \
                CFLAGS="$CFLAGS `fltk-config --cflags`" \
                LDLIBS="$LDLIBS `fltk-config --ldflags`" \
                LDFLAGS="$LDFLAGS `fltk-config --ldflags`" \
                CPPFLAGS="$CPPFLAGS ${mycppflags}" \
                || die

(so this just comes down to writing Makefiles and ebuilds to use fltk-config)
I guess this can be changed to RESOLVED INVALID.