Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 232755 - sci-mathematics/glpk-4.29 with USE=iodbc wants libiodbc but does not get the .h files from the right place
Summary: sci-mathematics/glpk-4.29 with USE=iodbc wants libiodbc but does not get the ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Science Mathematics related packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-23 14:27 UTC by Ferris McCormick (RETIRED)
Modified: 2008-07-23 17:36 UTC (History)
2 users (show)

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


Attachments
glpk-4.29.ebuild.patch (glpk-4.29.ebuild.patch,1.21 KB, text/plain)
2008-07-23 16:23 UTC, Sébastien Fabbro (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ferris McCormick (RETIRED) gentoo-dev 2008-07-23 14:27:43 UTC
With USE=iodbc sci-mathematics/glpk-4.29 has a dependency on dev-db/libiodbc, and when it builds, it wants to #include sql.h and sqlext.h from this package.  The libiodbc package puts these files into /usr/include/iodbc, where glpk cannot find them because it does not -I/usr/include/iodbc.  However, if you also have dev-db/unixODBC installed, glpk picks up sql.h and sqlext.h from the unixODBC versions of them, because unixODBC puts them into /usr/include/sql.h, etc.

The failure is consistent across systems, but as a test, adding -I/usr/include/iodbc to CFLAGS cures the problem.
Comment 1 Sébastien Fabbro (RETIRED) gentoo-dev 2008-07-23 15:09:20 UTC
Hi Ferris,

Good you caught this one. I personally never used odbc.
If I understand from wikipedia, libiodbc and unixODBC provide the same. If this is the case the dependency could be || too, add an 
append-cppflags $(pkg-config --cflags libiodbc),
only in libodbc case, and probably the flag to odbc.

Anyone has an idea why it's not a virtual?
Comment 2 Ferris McCormick (RETIRED) gentoo-dev 2008-07-23 15:50:21 UTC
Yes, if I add
inherit flag-o-matic
to the ebuild then put
        use iodbc && append-cppflags $(pkg-config --cflags libiodbc)
inside the database check, thus:

    if use mysql || use iodbc; then
        myconf="--enable-dl"       
        use iodbc && append-cppflags $(pkg-config --cflags libiodbc)
    fi
everything works fine.
Comment 3 Sébastien Fabbro (RETIRED) gentoo-dev 2008-07-23 16:23:16 UTC
Created attachment 161201 [details]
glpk-4.29.ebuild.patch

I would add something like this instead: either unixODBC or libiodbc.
Comment 4 Ferris McCormick (RETIRED) gentoo-dev 2008-07-23 17:07:08 UTC
That works, no matter which odbc is installed.
Comment 5 Sébastien Fabbro (RETIRED) gentoo-dev 2008-07-23 17:36:50 UTC
Ok, fixed in cvs. Thanks.