Hello all,
I've need of MariaDB ODBC in addition to the client/server installed. I've looked at the ODBC dependent databases/mariadb-connector-c and it seems to be subset of databases/mariadb10[3,4]-client. Thus, I tried creating a custom port where the ODBC depends/links to the client instead of the connector C so there wouldn't be a conflict. The port builds successfully. However, upon test execution of
The current port databases/mariadb-connector-c outputs
And the output from the client:
As you can see they all link to the OpenSSL from port. Would someone please help me getting past this undefined symbol error?
Thanks,
Tommy
[EDIT]
Here's the output of configure:
As you can see, it did find the libcrypto from OpenSSL port.
I've need of MariaDB ODBC in addition to the client/server installed. I've looked at the ODBC dependent databases/mariadb-connector-c and it seems to be subset of databases/mariadb10[3,4]-client. Thus, I tried creating a custom port where the ODBC depends/links to the client instead of the connector C so there wouldn't be a conflict. The port builds successfully. However, upon test execution of
isql mysql root
, the library complained: ld-elf.so.1: /usr/local/lib/libmaodbc.so: Undefined symbol "OPENSSL_init_ssl"
. I'm at stuck at trying to get the port to link properly. Below is the relevant portion of the Makefile:
Makefile:
LIB_DEPENDS= libodbc.so:databases/unixODBC \
libmariadb.so:databases/mariadb104-client
CONFLICTS_INSTALL= mariadb-connector-* \
mariadb10[2,3]-client-odbc \
mysql-connector-c* \
mysql-connector-odbc*
#USES= cmake:insource
USES= cmake:insource ssl compiler:c++11-lib
USE_LDCONFIG= ${PREFIX}/lib/mariadbconnector-odbc
SITESDIR= ${PORTNAME}/${PKGNAMESUFFIX:S/^-//}-${PORTVERSION:S/.b$//}
DOCSDIR= ${PREFIX}/share/doc/mysql
CMAKE_ARGS+= -DCOMPILATION_COMMENT="FreeBSD Ports" \
-DWITH_SSL="${OPENSSLBASE}"
#CFLAGS+= -I${LOCALBASE}/include/mysql
CFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/mysql -I${LOCALBASE}/include/openssl
#LDFLAGS+= -L${LOCALBASE}/lib/mysql
LDFLAGS+= -L${LOCALBASE}/lib/mysql -L${LOCALBASE}/lib/
PLIST_FILES= lib/libmaodbc.so
post-install:
${RM} -r ${STAGEDIR}${PREFIX}/share/doc/mariadb_connector_odbc
.include <bsd.port.mk>
Code:
# mariadb-connector-c/work/stage/usr/local/bin/mariadb_config
Copyright 2011-2015 MariaDB Corporation AB
Get compiler flags for using the MariaDB Connector/C.
Usage: mariadb-connector-c/work/stage/usr/local/bin/mariadb_config [OPTIONS]
--cflags [-I/usr/local/include/mariadb -I/usr/local/include/mariadb/mysql]
--include [-I/usr/local/include/mariadb -I/usr/local/include/mariadb/mysql]
--libs [-L/usr/local/lib/mariadb/ -lmariadb -lz -lm -liconv -lssl -lcrypto -liconv]
--libs_r [-L/usr/local/lib/mariadb/ -lmariadb -lz -lm -liconv -lssl -lcrypto -liconv]
--libs_sys [-lz -lm -liconv -lssl -lcrypto -liconv]
--version [10.3.6]
--cc_version [3.0.9]
--socket [/tmp/mysql.sock]
--port [3306]
--plugindir [/usr/local/lib/mariadb/plugin]
--tlsinfo [OpenSSL 1.1.1e][/CMD]
This is the output of the current version of that connector C:
[CMD] # mariadb-connector-c_tmp/work/stage/usr/local/bin/mariadb_config
Copyright 2011-2019 MariaDB Corporation AB
Get compiler flags for using the MariaDB Connector/C.
Usage: mariadb-connector-c_tmp/work/stage/usr/local/bin/mariadb_config [OPTIONS]
--cflags [-I/usr/local/include/mariadb -I/usr/local/include/mariadb/mysql]
--include [-I/usr/local/include/mariadb -I/usr/local/include/mariadb/mysql]
--libs [-L/usr/local/lib/mariadb/ -lmariadb]
--libs_r [-L/usr/local/lib/mariadb/ -lmariadb]
--libs_sys [-lz -lm -liconv -lssl -lcrypto -liconv]
--version [10.4.3]
--cc_version [3.1.7]
--socket [/tmp/mysql.sock]
--port [3306]
--plugindir [/usr/local/lib/mariadb/plugin]
--tlsinfo [OpenSSL 1.1.1e]
Code:
# /usr/local/bin/mariadb_config
Copyright 2011-2019 MariaDB Corporation AB
Get compiler flags for using the MariaDB Connector/C.
Usage: /usr/local/bin/mariadb_config [OPTIONS]
--cflags [-I/usr/local/include/mysql -I/usr/local/include/mysql/mysql -I/usr/local/include]
--include [-I/usr/local/include/mysql -I/usr/local/include/mysql/mysql -I/usr/local/include]
--libs [-L/usr/local/lib/mysql/ -lmariadb -L/usr/local/lib]
--libs_r [-L/usr/local/lib/mysql/ -lmariadb -L/usr/local/lib]
--libs_sys [-lz -lm -liconv -lssl -lcrypto -liconv]
--version [10.4.12]
--cc_version [3.1.7]
--socket [/tmp/mysql.sock]
--port [3306]
--plugindir [/usr/local/lib/mysql/plugin]
--tlsinfo [OpenSSL 1.1.1e]
As you can see they all link to the OpenSSL from port. Would someone please help me getting past this undefined symbol error?
Thanks,
Tommy
[EDIT]
Here's the output of configure:
Code:
===> Applying FreeBSD patches for mariadb104-client-odbc-3.1.6
===> mariadb104-client-odbc-3.1.6 depends on file: /usr/local/bin/cmake - found
===> mariadb104-client-odbc-3.1.6 depends on executable: ninja - found
===> mariadb104-client-odbc-3.1.6 depends on file: /usr/local/lib/libcrypto.so.11 - found
===> mariadb104-client-odbc-3.1.6 depends on shared library: libodbc.so - found (/usr/local/lib/libodbc.so)
===> mariadb104-client-odbc-3.1.6 depends on shared library: libmariadb.so - found (/usr/local/lib/mysql/libmariadb.so)
===> Configuring for mariadb104-client-odbc-3.1.6
===> Performing in-source build
/bin/mkdir -p /wrkdirs/usr/ports/databases/mariadb104-client-odbc/work/mariadb-connector-odbc-3.1.6-ga-src
-- The C compiler identification is Clang 8.0.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Libraries installation dir: lib
-- Autentication Plugins installation dir: lib/mysql/plugin
-- Configuring to build without SSL support
-- There is no Connector/C sub-project folder, linking against libmariadb installed on the system
-- Looking for floor
-- Looking for floor - not found
-- Looking for floor in m
-- Looking for floor in m - found
-- Found odbc_config: /usr/local/bin/odbc_config
-- Found ODBC Driver Manager libraries: /usr/local/lib
-- Checking if SQLColAttribute expects SQLPOINTER FALSE
-- Linking Connector/C library statically(mariadbclient)
-- Version script: /wrkdirs/usr/ports/databases/mariadb104-client-odbc/work/mariadb-connector-odbc-3.1.6-ga-src/maodbc.def
-- Documetnation installed to ./share/doc/mariadb-connector-odbc/
-- License file installed to ./share/doc/mariadb-connector-odbc/
-- freebsd
-- License File: /wrkdirs/usr/ports/databases/mariadb104-client-odbc/work/mariadb-connector-odbc-3.1.6-ga-src/COPYING
-- ReadMe File: /wrkdirs/usr/ports/databases/mariadb104-client-odbc/work/mariadb-connector-odbc-3.1.6-ga-src/README
-- Source Package Filename: mariadb-connector-odbc-3.1.6-ga-src.TGZ
-- Configuring done
-- Generating done
As you can see, it did find the libcrypto from OpenSSL port.