Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 277917 - freetds ebuild's 'odbc' USE flag is tied to dev-db/unixODBC, however freetds also supports dev-db/libiodbc but has no 'iodbc' USE flag
Summary: freetds ebuild's 'odbc' USE flag is tied to dev-db/unixODBC, however freetds ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-15 13:00 UTC by Sergey Anufrienko
Modified: 2010-06-14 17:08 UTC (History)
0 users

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


Attachments
proposed patch to support libiodbc (freetds-0.82-r2.patch,23.66 KB, patch)
2010-06-12 09:30 UTC, Sergey Anufrienko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Anufrienko 2009-07-15 13:00:05 UTC
The dev-db/unixODBC package is flawed, but it's use is enforced when emerging freetds with ODBC support. Since freetds also provides support for libiodbc - a more stable and thread safe solution, you should let the users choose which ODBC layer they prefer to install as the dependency.

I believe you should add an "iodbc" USE flag to freetds, which would allow to configure it for libodbc.

P.S. Support for iodbc is enabled with the "--with-iodbc" configure option.

Reproducible: Always

Steps to Reproduce:
1. Try to emerge dev-db/freetds with odbc USE flag

Actual Results:  
unixODBC is added to dependencies, and there is no way to select libiodbc insted.

Expected Results:  
I should be able to choose the ODBC layer to install

Add the 'iodbc' USE flag to dev-db/freetds along with the existing 'odbc' flag.
Comment 1 Matti Bickel (RETIRED) gentoo-dev 2010-06-08 21:27:06 UTC
This is not that simple. Installing freetds with iodbc support runs into this error: http://www.mail-archive.com/libtool@gnu.org/msg08928.html

This seems to be an upstream issue. We also need to patch the iodbc include path to say $with_iodbc/include/iodbc (with an added "iodbc").

I agree having libiodbc as a choice here is desirable, but I've no time to fix it properly. Patches welcome.

You can start by modifying freetds-0.82-r2.ebuild to say 
$(use_enable odbc) $(use odbc && --with-iodbc=/usr)
and in src_prepare():
sed -ie 's:with_iodbc/include":with_iodbc/include/iodbc":' configure.ac
eautoreconf
Comment 2 Sergey Anufrienko 2010-06-12 09:30:15 UTC
Created attachment 235041 [details, diff]
proposed patch to support libiodbc

With this patch it seems to emerge OK. I'm not sure about the cleanliness of such solution though. The missing config.rpath file has been taken from a more recent upstream source tree.
Comment 3 Matti Bickel (RETIRED) gentoo-dev 2010-06-13 23:04:45 UTC
Thanks for pulling that config.rpath thing out. I hadn't had a look at upstreams nightly builds, yet.

I've added dev-db/freetds-0.82-r3 to the php-overlay for testing. You can get it via layman -a php (supposing you have layman installed).

I've already tested it on amd64 and it seems fine so far. After it has spent some time (like 2-3 days) in the overlay without complaints or bugs, i'll push it to the main tree.
Comment 4 Matti Bickel (RETIRED) gentoo-dev 2010-06-14 17:08:33 UTC
freetds-0.82-r3 should fix this issue.