Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 281316 - Fully support 'sybase-ct' USE-flag w/ php5_2-sapi.eclass
Summary: Fully support 'sybase-ct' USE-flag w/ php5_2-sapi.eclass
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-13 12:51 UTC by Alex Kiesel
Modified: 2010-10-31 17:52 UTC (History)
2 users (show)

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


Attachments
Patch proposal (bug-281316.diff,742 bytes, patch)
2010-10-27 13:16 UTC, Alex Kiesel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Kiesel 2009-08-13 12:51:39 UTC
When enabling sybase-ct USE-flag for dev-lang/php, the ebuild says this software is out of portage and that for building it it needs to be manually installed:

"USE flag sybase-ct enables support for software not present in Portage!
This ebuild will continue, but if you haven't already installed the
software required to satisfy the list above, this package will probably
fail to compile later on."

While that is true if you really want to compile against Sybase client libraries, the more common way of builing support for Sybase in PHP nowadays is to build against libct, a library provided by dev-db/freetds.

Also, I always need to build PHP passing an EXTRA_ECONF value:
lost ~ # EXTRA_ECONF='--with-sybase-ct=/usr' emerge -va dev-lang/php

It would be nice, if the eclass would support building against FreeTDS, by default.
Comment 1 Guido Jäkel 2009-09-29 09:21:14 UTC
Dear Axel,

thank you for this useful hint. I think it will provide a way to connect to Sybase without installing this problematic 3rd party binary stuff.


I vote to add a direct USE-flag-support to build against FreeTDS or at least to include a hint.
Comment 2 Doktor Notor 2010-02-15 18:47:01 UTC
You should already have sybase ODBC connectivity (full support) with dev-lang/php[iodbc] and dev-db/freetds[odbc] - see http://www.freetds.org/userguide/php.htm
Comment 3 Matti Bickel (RETIRED) gentoo-dev 2010-04-12 20:19:50 UTC
Hm, php-5.2 is pretty much closed to changes as we work on getting php-5.3 into the tree.

That said, php-5.3 drops support for sybase and only allows sybase-ct.
From what i gather from the list of freetds "client libraries", they support "db-lib", "ct-lib" and odbc, corresponding to ext/sybase, ext/sybase_ct and ext/odbc in php. ext/sybase is what is going to be dropped.

I don't understand why sybase-ct requires external libraries not available through portage, though? Can somebody enlighten me?

If freetds indeed can provide for sybase_ct and odbc extension, we should just add sybase-ct? ( dev-db/freetds ) and make php link against it.

Any obvious reasons why this won't work that i missed?
Comment 4 Alex Kiesel 2010-04-13 05:43:35 UTC
(In reply to comment #3)
> I don't understand why sybase-ct requires external libraries not available
> through portage, though? Can somebody enlighten me?

sybase-ct originally uses a library called ctlib, which comes from Sybase Inc. This library is closed source and has not been made available in Gentoo portage.

FreeTDS is supposed to be a drop-in replacement and exposes (mostly) the same APIs as the original Sybase library does. 

> If freetds indeed can provide for sybase_ct and odbc extension, we should just
> add sybase-ct? ( dev-db/freetds ) and make php link against it.

That's what I was asking. :-)
Comment 5 Matti Bickel (RETIRED) gentoo-dev 2010-06-22 17:26:01 UTC
I've pushed the mentioned change to the php overlay. After review it will migrate to the main tree before php-5.3.2 will get unmasked (2-3 days).
Comment 6 Matti Bickel (RETIRED) gentoo-dev 2010-07-04 12:21:18 UTC
Well, I couldn't hold the 2-3 days, but now sybase-ct has made the cut and php-5.3.2 will get unmasked in a few minutes.
Comment 7 Guido Jäkel 2010-07-05 07:03:53 UTC
Thank you for your efforts!

We're at DNB are using PHP 5.2 with Sybase and the FreeTDS driver since about one year without any issue.
Comment 8 Alex Kiesel 2010-10-27 13:14:37 UTC
This does actually not fix the issue reported in comment #0 - I still have to add EXTRA_ECONF="..." to the environment to have the configure run pass.

The following patch fixes this for me (php-5.3.3-r2.ebuild):

--- files/eblits/src_configure-v2.eblit.orig	2010-10-27 15:12:32.000000000 +0200
+++ files/eblits/src_configure-v2.eblit	2010-10-27 15:12:40.000000000 +0200
@@ -60,7 +60,7 @@
 	phpconfutils_extension_enable  "soap"         "soap"             1
 	phpconfutils_extension_enable  "sockets"      "sockets"          1
 	phpconfutils_extension_without "sqlite3"      "sqlite3"          1 "/usr"
-	phpconfutils_extension_with    "sybase-ct"    "sybase-ct"        1 
+	phpconfutils_extension_with    "sybase-ct"    "sybase-ct"        1 "/usr"
 	phpconfutils_extension_enable  "sysvmsg"      "sysvipc"          1
 	phpconfutils_extension_enable  "sysvsem"      "sysvipc"          1
 	phpconfutils_extension_enable  "sysvshm"      "sysvipc"          1
Comment 9 Alex Kiesel 2010-10-27 13:16:07 UTC
Created attachment 252211 [details, diff]
Patch proposal

Attached possible fix, my manual comment was wrapped.
Comment 10 Matti Bickel (RETIRED) gentoo-dev 2010-10-31 17:52:17 UTC
Thanks, should be fixed properly now.