Bug 262464 - databases/mariadb-connector-odbc: Undefined symbol "libiconv_open" with isql on INSERT, UPDATE or SELECT
Summary: databases/mariadb-connector-odbc: Undefined symbol "libiconv_open" with isql ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bernard Spil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-10 11:58 UTC by James Elstone
Modified: 2022-03-26 12:17 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (brnrd)


Attachments
patch file for cmake.txt to find iconv libraries and headers (463 bytes, patch)
2022-03-24 17:09 UTC, James Elstone
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Elstone 2022-03-10 11:58:28 UTC
When using databases/mariadb-connector-odbc and attempting to action any SQL commands that return a non-zero result set causes the following error:

# /usr/local/bin/isql -v Database_ODBC_Name
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> insert into persons (id,name,surname,password) values (1,'Jack','Jones','***');
ld-elf.so.1: /usr/local/lib/mariadb/libmaodbc.so: Undefined symbol "libiconv_open"


CREATE and DROP do not cause the issue, or results that have 0 rows returned.

Fudged a fix locally to include the USES line from databases/mariadb106-server seemed to work, but did have "WITH_LIBICONV_COMPAT=1" set in /etc/make.conf, e.g.:

< USES=cmake:insource ssl
> USES=bison:build cmake:insource compiler:c++11-lib cpe iconv:translit libedit ncurses shebangfix ssl
Comment 1 Bernard Spil freebsd_committer freebsd_triage 2022-03-19 11:18:12 UTC
Hi James,

How was your package built? Poudriere? `make` in databases/mariadb-connector-odbc?
Comment 2 James Elstone 2022-03-24 16:55:36 UTC
Hi Bernard,

From ports (/usr/ports/databases/mariadb-connector-odbc). Updated the tree today, and tried again.

Interestingly enough though, I got it to work in the end:

There is a confitional statement in work/mariadb-connector-odbc-3.1.15-src/CMakeLists.txt which only reacts is the build system is Apple or AIX. Adding FreeBSD to that seemed to fix it.

Just working on making a patch file for it now...
Comment 3 James Elstone 2022-03-24 17:09:55 UTC
Created attachment 232678 [details]
patch file for cmake.txt to find iconv libraries and headers

Patch to allow MariaDB ODBC find iconv correctly, and now displays errors when called through "isql". No changes to /etc/make.conf or Makefile needed.
Comment 4 James Elstone 2022-03-24 17:10:38 UTC
Tested on a clean FreeBSD install and now works without issue using the simple patch. :-)