databases/mysql-connector-odbc overwrites DEFAULT_MYSQL_VER, which is 55 at the momemt, to 51. Should it do that? What for? It builds and works with 55. Look: # Created by: sergey@migsoft.com.ua # $FreeBSD: head/databases/mysql-connector-odbc/Makefile 353029 2014-05-05 16:24:00Z bapt $ PORTNAME= mysql-connector-odbc PORTVERSION= 5.1.9 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_MYSQL} MASTER_SITE_SUBDIR= Connector-ODBC/5.1 PKGNAMESUFFIX= -${DRIVER_MANAGER}-mysql${MYSQL_VER} MAINTAINER= sergey@network-asp.biz COMMENT= ODBC driver for MySQL${MYSQL_VER} / ${DRIVER_MANAGER} USE_LDCONFIG= yes USE_MYSQL= yes DEFAULT_MYSQL_VER= 51 USES= cmake PLIST_SUB= VER=${PORTVERSION} PORTDOCS= ChangeLog INSTALL \ README README.debug COPYING Licenses_for_Third-Party_Components.txt ......
Notify maintainer (in CC)
And it would be extremely great if maintained updated this port to lastest 5.2.7 version.
I have poor skills, but I've made a patch. I attached diff and whole ports dir, just in case. Only files/patch-CMakeLists.txt and pkg-descr haven't been changed. It passes stage and other stuff. But it has one problem that I don't know how to fix. Please, help. During build ld tries to find odbc libs in wrong place (in /usr/lib/, for example, which is supposed to be in /usr/local/lib). Here is output of make: ... /usr/include/sys/timeb.h:42:2: warning: #warning "this file includes <sys/timeb.h> which is deprecated" Linking C shared library ../lib/libmyodbc5w.so /usr/bin/ld: cannot find -lodbcinst *** [lib/libmyodbc5w.so] Error code 1 1 error *** [driver/CMakeFiles/myodbc5w.dir/all] Error code 2 Linking C shared library ../lib/libmyodbc5a.so /usr/bin/ld: cannot find -lodbcinst *** [lib/libmyodbc5a.so] Error code 1 .... So as workaround I made sym links # ln -s /usr/local/lib/libodbcinst.a /usr/lib/libodbcinst.a # ln -s /usr/local/lib/libodbcinst.so.2 /usr/lib/libodbcinst.so After that it passes make install and works! Please, help to fix that. P.S. I didn't try it with mariadb, but I think it works.
Created attachment 145441 [details] dont' use it
Created attachment 145442 [details] don't use it
> But it has one problem that I don't know how to fix. Please, help. > During build ld tries to find odbc libs in wrong place (in /usr/lib/, for example, which is supposed to be in /usr/local/lib). Yea, I found how to fix that. Download provided patch file, patch and after that add this line to patched Makefile: LDFLAGS+= -L${LOCALBASE}/lib That's all!
Created attachment 145547 [details] final diff to update port to 5.2.7 That's final version of patch. There is no force mysql version settting and it update port to lastest version. Builds from ports and in poudriere without any problems. P.S. it still needs to be checked with mariadb.
Please, commit it
Comment on attachment 145547 [details] final diff to update port to 5.2.7 It turned out that it compiles normally, but then it's unusable. Sorry for the noise! I return this PR to first request: should it use DEFAULT_MYSQL_VER in existing port.
Returning to the need of "DEFAULT_MYSQL_VER=51" in Makefile. I made some checks with existing port (5.1.9) under FreeBSD 10.0-p7 amd64. Tried to comment "DEFAULT_MYSQL_VER=51" in Makefile, then compiled it with various mysql clients from ports. Made some queries to DBs for tests. databases/mysql51-client - no problems. databases/mysql55-client - no problems. databases/mysql56-client - no problems. databases/mariadb-client - this version of mariadb doesn't compile under FreeBSD 10, so I couldn't check it. databases/mariadb55-client - almost no problems. Compiles only if files/patch-driver__execute.c is removed from mysql-connector-odbc port folder. Works.
I'll create new PR for this a bit later. So close it for now.