2

I am attempting to use clsql-mysql on the Windows platform. I am using 32 bit Clozure CL with the 32 bit MySQL Connector library (from Oracle) to provide the external library.

I added the path of the connector to %path% so that clsql could find the connector library, and connecting to the database with

(clsql:connect '("host" "db" "user" "pw"))

Which goes without a hitch and returns a <MYSQL_DATABASE> object.

When I attempt to do a simple SQL query, however, I get the following error:

;; Query
(clsql:query "select * from logentry where id = 3346;")
;; Error:
`Can't resolve foreign symbol "clsql_mysql_field_flags"`

Could this be something to do with the way that the mysql connector is compiled? from the INFO_BIN file supplied with the MySQL Connector:

    ===== Information about the build process: =====
    Build was run at Thu 07/13/2017 on host 'VITRO50'

    Build was done on  Windows-6.2 using AMD64
    Build was done using cmake 3.2.3 

    ===== Compiler / generator used: =====
    Visual Studio 14 2015

    Pointer size: 4

    ===== Feature flags used: =====
    -- Cache values
    CANDLE_EXECUTABLE:FILEPATH=C:/Program Files (x86)/WiX Toolset v3.10/candle.exe
    CMAKE_CONFIGURATION_TYPES:STRING=DebugReleaseMinSizeRelRelWithDebInfo
    CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/LibMySQL
    COMMUNITY_BUILD:BOOL=ON
    DEBUG_EXTNAME:BOOL=ON
    ENABLED_PROFILING:BOOL=ON
    ENABLE_DEBUG_SYNC:BOOL=ON
    ENABLE_GCOV:BOOL=OFF
    ENABLE_GPROF:BOOL=OFF
    EXTRA_INSTALL:BOOL=G:\ade\build\sb_0-24199034-1499945748.28/mysql-connector-c-6.1.11-vs12-win32/lib/mysqlclient.liblib/vs12DevelopmentG:\ade\build\sb_0-24199034-1499945748.28/mysql-connector-c-6.1.11-vs12-win32/lib/debug/mysqlclient.liblib/vs12/debugDebugBinariesG:\ade\build\sb_0-24199034-1499945748.28/mysql-connector-c-6.1.11-vs14-win32/lib/mysqlclient.liblib/vs14DevelopmentG:\ade\build\sb_0-24199034-1499945748.28/mysql-connector-c-6.1.11-vs14-win32/lib/debug/mysqlclient.liblib/vs14/debugDebugBinaries
    FEATURE_SET:STRING=community
    HEAT_EXECUTABLE:FILEPATH=C:/Program Files (x86)/WiX Toolset v3.10/heat.exe
    INSTALL_LAYOUT:STRING=STANDALONE
    LIGHT_EXECUTABLE:FILEPATH=C:/Program Files (x86)/WiX Toolset v3.10/light.exe
    MYSQL_DATADIR:PATH=C:/Program Files/MySQL/MySQL Server 6.1/data
    MYSQL_KEYRINGDIR:PATH=C:/Program Files/MySQL/MySQL Server 6.1/keyring
    MYSQL_MAINTAINER_MODE:BOOL=OFF
    PKG_INSTALL_PREFIX:PATH=C:/Program Files (x86)/LibMySQL
    TMPDIR:PATH=
    WIN_DEBUG_NO_INLINE:BOOL=OFF
    WITH_ARCHIVE_STORAGE_ENGINE:BOOL=ON
    WITH_ASAN:BOOL=OFF
    WITH_BLACKHOLE_STORAGE_ENGINE:BOOL=ON
    WITH_CLIENT_PROTOCOL_TRACING:BOOL=ON
    WITH_DEBUG:BOOL=OFF
    WITH_DEFAULT_COMPILER_OPTIONS:BOOL=ON
    WITH_DEFAULT_FEATURE_SET:BOOL=ON
    WITH_EMBEDDED_SERVER:BOOL=ON
    WITH_EXTRA_CHARSETS:STRING=all
    WITH_FEDERATED_STORAGE_ENGINE:BOOL=ON
    WITH_INNOBASE_STORAGE_ENGINE:BOOL=ON
    WITH_MSAN:BOOL=OFF
    WITH_MSCRT_DEBUG:BOOL=OFF
    WITH_NUMA:BOOL=ON
    WITH_PARTITION_STORAGE_ENGINE:BOOL=ON
    WITH_SSL:STRING=bundled
    WITH_TEST_TRACE_PLUGIN:BOOL=OFF
    WITH_UBSAN:BOOL=OFF
    WITH_UNIT_TESTS:BOOL=OFF
    WITH_ZLIB:STRING=bundled
    WIX_DIR:PATH=C:/Program Files (x86)/WiX Toolset v3.10

    ===== EOF =====

The only hits I could find when searching for this error were ones that relate to a similar issue on Ubuntu.

How do I start to debug this error, or how do I fix this error so that the SQL query completes without error?

Rainer Joswig
  • 136,269
  • 10
  • 221
  • 346
Andomonir
  • 193
  • 1
  • 9
  • 1
    I have never used clsql myself but its web site does not list ccl as supported implementation: http://clsql.kpe.io/manual/prerequisites.html#idp70223200 – Martin Buchmann May 23 '18 at 14:50
  • 1
    @MartinBuchmann: That website is a bit older. CCL is a successor of OpenMCL if I remember correctly. – Svante May 23 '18 at 16:36
  • @Svante Thanks for clarification! – Martin Buchmann May 23 '18 at 16:38
  • 1
    The foreign functions required by `clsql:connect` are provided by the MySQL Connector library - so it seems that the library is working correctly. However, the function `clsql_mysql_field_flags`, required by `select`, is provided by the CLSQL MySQL support library, which comes with the CLSQL package, and it seems that this library has not been compiled successfully. The library is in the `db-mysql` subdirectory under CLSQL. Check that you have also 32-bit binaries there. – jlahd May 24 '18 at 06:28

0 Answers0