Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 223891 - dev-db/freetds version 0.82
Summary: dev-db/freetds version 0.82
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: PHP Bugs
URL: http://www.freetds.org
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-27 20:12 UTC by Matthias Sch.
Modified: 2008-07-17 13:56 UTC (History)
0 users

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


Attachments
fix pdo_dblib error (pdo_dblib-freetds-compat.patch,1.90 KB, patch)
2008-07-17 08:16 UTC, Matthias Sch.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Sch. 2008-05-27 20:12:04 UTC
please include in portage!


Reproducible: Always

Steps to Reproduce:
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-05-27 21:00:33 UTC
Seems important:

Version 0.82 Released

Version 0.82 is now available from ftp.ibiblio.org. This is a major release, almost two years in the making. See NEWS and ChangeLog-0.82, included in the distribution, for details. (8 May 2008)
Comment 2 Matthias Sch. 2008-07-14 08:44:00 UTC
hi!

is there any way to help maintaining this package?

thank you, mat
Comment 3 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-14 12:54:18 UTC
Yes, you could try and see if a simple ebuild rename is sufficient for this version bump, and if not, you could try to findout what to change.
The main problem for me is that I have no means of testing this, and I don't really want to commit completely untested stuff to the tree.

So, if you want to test or even proxy-maintain [1] this package, this would be great. :)

[1] http://dev.gentoo.org/~antarus/projects/proxy-maint/
Comment 4 Matthias Sch. 2008-07-14 13:06:29 UTC
i just renamed the ebuild and emerged it...

i'm testing it since i opened the bug with a lot of traffic on my web application...

works without a probelm...

please tell me if you want more info!
and: yes, i'm interested in proxy-maintaining this package
Comment 5 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-14 14:29:51 UTC
Thanks for the testing, I've just committed it to the tree. I did some stylistic and build-related cleanups myself, so it would be cool if you could just re-merge it again (using the version I just committed) and change this bug to "VERIFIED" if everything works as expected. :)

If you are interested in proxy-maintaining (which would be great!) then please contact me using mail or IRC (Freenode, #gentoo-php / hoffie).

Thanks again. :)
Comment 6 Matthias Sch. 2008-07-14 16:14:50 UTC
something is wrong... i emerged freetds without errors but php emerge fails:

checking for MSSQL support via FreeTDS... yes
configure: error: Cannot find FreeTDS in known installation directories

 *
 * ERROR: dev-lang/php-5.2.6-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 4371:  Called src_compile_normal
 *             environment, line 4482:  Called php5_2-sapi_src_compile
 *             environment, line 3411:  Called die
 * The specific snippet of code:
 *       ./configure --prefix=${destdir} --host=${CHOST} --mandir=${destdir}/man --infodir=${destdir}/info --sysconfdir=/etc --cache-file=./config.cache ${my_conf} ${EXTRA_ECONF} || die "configure failed";
 *  The die message:
 *   configure failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-lang/php-5.2.6-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/php-5.2.6-r2/temp/environment'.
 *

[ebuild     U ] dev-lang/php-5.2.6-r2 [5.2.6_rc4] USE="apache2 berkdb bzip2 calendar cgi cli crypt ctype curl doc filter flatfile ftp gd gdbm gmp hash iconv imap inifile iodbc json kerberos ldap mssql mysql mysqli ncurses nls odbc pcntl pcre pdo postgres readline reflection session simplexml soap sockets spell spl tidy tokenizer truetype unicode wddx xml xmlreader xmlrpc xmlwriter xsl zip zlib -adabas -bcmath -birdstep -cdb -cjk -concurrentmodphp -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -empress -empress-bcs -esoob -exif -fastbuild -fdftk -firebird -force-cgi-redirect -frontbase -gd-external -interbase -ipv6 (-java-external) -kolab% -ldap-sasl -libedit -mcve -mhash -msql -oci8 -oci8-instant-client -pic -posix -qdbm -recode -sapdb -sharedext -sharedmem -snmp -solid -sqlite -ssl -suhosin -sybase -sybase-ct -sysvipc -threads -xpm -yaz -zip-external" 0 kB

Comment 7 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-14 18:47:13 UTC
I just hardmasked it... I don't see how this could work with php. I just tried copying the 0.64 ebuild and it did not install tds.h (and libtds.so?) either, so apparently there have been some upstream changes which break compatibility.

No idea what to do now; unless I messed up something w/ the build system, I think that php in it's current state is simply not compatible with recent versions of tds and as such would need patching.
Comment 8 Matthias Sch. 2008-07-15 07:10:23 UTC
php actually seraches for tds.h...
but after (re-)emerge freetds i can not find any tds.h and libtds.a|so on my system:
--- replaced obj /usr/include/tds_sysdep_public.h
--- replaced obj /usr/include/sybfront.h
--- replaced obj /usr/include/syberror.h
--- replaced obj /usr/include/sybdb.h
--- replaced obj /usr/include/sqlfront.h
--- replaced obj /usr/include/sqldb.h
--- replaced obj /usr/include/ctpublic.h
--- replaced obj /usr/include/cstypes.h
--- replaced obj /usr/include/cspublic.h
--- replaced obj /usr/include/bkpublic.h

but:
when i emerge 0.64 these files are existing...
--- replaced obj /usr/lib/libtdssrv.so.2.0.0
--- replaced sym /usr/lib/libtdssrv.so.2
--- replaced sym /usr/lib/libtdssrv.so
--- replaced obj /usr/lib/libtdssrv.la
--- replaced obj /usr/lib/libtdssrv.a
--- replaced obj /usr/lib/libtdsodbc.so.0.0.0
--- replaced sym /usr/lib/libtdsodbc.so.0
--- replaced sym /usr/lib/libtdsodbc.so
--- replaced obj /usr/lib/libtdsodbc.la
--- replaced obj /usr/lib/libtdsodbc.a
--- replaced obj /usr/lib/libtds.so.5.0.0
--- replaced sym /usr/lib/libtds.so.5
--- replaced sym /usr/lib/libtds.so
--- replaced obj /usr/lib/libtds.la
--- replaced obj /usr/lib/libtds.a
--- replaced obj /usr/lib/libsybdb.so.5.0.0
--- replaced sym /usr/lib/libsybdb.so.5
--- replaced sym /usr/lib/libsybdb.so
--- replaced obj /usr/lib/libsybdb.la
--- replaced obj /usr/lib/libsybdb.a
--- replaced obj /usr/lib/libct.so.4.0.0
--- replaced sym /usr/lib/libct.so.4
--- replaced sym /usr/lib/libct.so
--- replaced obj /usr/lib/libct.la
--- replaced obj /usr/lib/libct.a
--- replaced dir /usr/lib
--- replaced obj /usr/include/tdsver.h
--- replaced obj /usr/include/tdssrv.h
--- replaced obj /usr/include/tdsconvert.h
--- replaced obj /usr/include/tds_sysdep_public.h
--- replaced obj /usr/include/tds.h
--- replaced obj /usr/include/sybfront.h
--- replaced obj /usr/include/syberror.h
--- replaced obj /usr/include/sybdb.h
--- replaced obj /usr/include/sqlfront.h
--- replaced obj /usr/include/sqldb.h
--- replaced obj /usr/include/ctpublic.h
--- replaced obj /usr/include/cstypes.h
--- replaced obj /usr/include/cspublic.h
--- replaced obj /usr/include/bkpublic.h

but while ebuilding, these files exist in version 0.82 too:
./include/tds.h
./src/tds/libtds.la

maybe the ebuild does not copy these files?
Comment 9 Matthias Sch. 2008-07-16 07:35:40 UTC
freetds was redesigned :-(
http://bugs.php.net/bug.php?id=44991
Comment 10 Matthias Sch. 2008-07-16 08:48:24 UTC
SOLUTION:

found on http://www.freetds.org/news.html:
 > PHP tests for a FreeTDS installation by looking for files that FreeTDS no
 > longer installs. To assure PHP that FreeTDS is installed, create two files
 > where FreeTDS was installed e.g.:
 >    $ touch /usr/include/tds.h
 >    $ touch /usr/lib/libtds.a

tested with:
[ebuild   R   ] dev-lang/php-5.2.6_rc4  USE="apache2 berkdb bzip2 calendar cgi cli crypt ctype curl doc filter flatfile ftp gd gdbm gmp hash iconv imap inifile iodbc json kerberos ldap mssql mysql mysqli ncurses nls odbc pcntl pcre pdo postgres readline reflection session simplexml soap sockets spell spl tidy tokenizer truetype unicode wddx xml xmlreader xmlrpc xmlwriter xsl zip zlib"

works without troubles!

could you include these 2 commands in the ebuild for compatibility? then everything would be fine...
Comment 11 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-16 19:15:09 UTC
Thanks for those hints again. I don't think it is a good idea to install these pseudo-files (as they're empty), it rather looks like an ugly hack. Installing the files from the source directory would be better, but I don't really want to diverge from upstream if not necessary.
That's why I chose to fix php instead by applying the patch from freetds upstream (as you linked it).
So, can you please try building =dev-lang/php-5.2.6-r3 from php-testing overlay (see layman, or manually use http://overlays.gentoo.org/svn/proj/php/testing (SVN)) against =dev-db/freetds-0.82-r1 (I just committed it, it has some changes regarding configure option handling specific to odbc)?

Compiling the mentioned php version against freetds-0.64 and freetds-0.82* works fine in both cases, so it shouldn't break backwards compatibility. As already noted, I cannot do anything else than compile-testing, so any real-world tests would be nice to have. :)
Comment 12 Matthias Sch. 2008-07-17 06:51:36 UTC
updated freetds -> ok!

tried to compile php:
checking whether to enable PDO support... yes
checking for PDO_DBLIB support via FreeTDS... yes
configure: error: Cannot find FreeTDS in known installation directories

i think i have seen file-checks for tds.h and libtds.la in the pdo-dblib section too...

to reproduce:
compile php with these usefalgs:
[ebuild     U ] dev-lang/php-5.2.6-r4 [5.2.6-r2] USE="apache2 berkdb bzip2 calendar cgi cli crypt ctype curl doc filter flatfile ftp gd gdbm gmp hash iconv imap inifile json kerberos ldap mssql mysql mysqli ncurses nls odbc pcntl pcre pdo postgres readline reflection session simplexml soap sockets spell spl tidy tokenizer truetype unicode wddx xml xmlreader xmlrpc xmlwriter xsl zip zlib -adabas -bcmath -birdstep -cdb -cjk -concurrentmodphp -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -empress -empress-bcs -esoob -exif -fastbuild -fdftk -firebird -force-cgi-redirect -frontbase -gd-external -interbase -iodbc -ipv6 (-java-external) -kolab -ldap-sasl -libedit -mcve -mhash -msql -oci8 -oci8-instant-client -pic -posix -qdbm -recode -sapdb -sharedext -sharedmem -snmp -solid -sqlite -ssl -suhosin -sybase -sybase-ct -sysvipc -threads -xpm -yaz -zip-external" 0 kB
Comment 13 Matthias Sch. 2008-07-17 08:16:48 UTC
Created attachment 160623 [details, diff]
fix pdo_dblib error

please check and include this in php-patchset...
Comment 14 Matthias Sch. 2008-07-17 09:35:43 UTC
compiled dev-lang/php-5.2.6-r4 with my patch and everything works!

also did some heavy-load tests on my 2 production servers -> everything works!
Comment 15 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-17 10:01:42 UTC
Thanks for the patch, this is now in the overlay as php-5.2.6-r5. If this works for you, I'll move it to the main tree.
Tested the patch w/ both freetds-0.64 and freetds-0.82-r1.
Comment 16 Matthias Sch. 2008-07-17 10:56:07 UTC
everything works fine!
no errors found!
performance great!

i think you can move it...
Comment 17 Matthias Sch. 2008-07-17 11:07:11 UTC
btw. unmask freetds ;-)
Comment 18 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-17 13:56:09 UTC
Moved to the tree, freetds unmasked, thanks. :)
Comment 19 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-17 13:56:40 UTC
Meh, fixing status/resolution.