AcuSQL Setup

Hello!! I'm still new to AcuSQL. May I know if it is possible for me to setup the AcuSQL to connect to MySQL without using UnixODBC or MySQL Connector ODBC? Please note that both AcuSQL and MySQL are installed on the same server. And all the programs are saved and compiled inside the server as well.

Besides, is there any other file that I need to edit aside from "config85.c" and "Makefile (which I haven't change anything since I don't plan to use ODBC)" in order for AcuSQL to connect to MySQL?

Thank you. 

  • is it possible for me to setup the AcuSQL to connect to MySQL without using UnixODBC or MySQL Connector ODBC? No. AcuSQL leverages the ODBC connection to get to the MySQL database.
  • Hi shjerpe, thank you for your reply.

    I have already install both UnixODBC and MySQL Connector ODBC which already being tested the connection to MySQL. Now, my problem is that I'm unsuccessful to run the command 'Make'. When I run the command, it stated 'ld: Can't find dependent library "libodbcinst.so.1"' and a bunch of warning such as '(Bundled) cc: warning 922: "-Ae" is unsupported in the bundled compiler, ignored.' appear. Is it my step is correct in setting up AcuSQL?

    What I do:
    1) uncommented the line "NO_ACUSQL" on config85.c and set it to 0.
    2) For Makefile:
    a) ACUSQL_ODBC_LIB = /mysql/mysq-con/mysql/lib/libmyodbc5.so
    b) Commented both "ACUSQL_FLAGS = -DNO_ACUSQL=1" and "ACUSQL_LIBS = #"
    c) Uncommented "ACUSQL_FLAGS =" and "ACUSQL_LIBS = $(ACU_LIBDIR)/libesql.a $(ACUSQL_ODBC_LIB)
    d) Save the changes at Makefile.

    For your information, I have already export the UnixODBC library (which have libodbcinst.so.1) to SHLIB_PATH and gcc which have been export to PATH.

    Thank you in advance for the reply.
  • Hi shjerpe, thank you for your reply.

    I have already install both UnixODBC and MySQL Connector ODBC which already being tested the connection to MySQL. Now, my problem is that I'm unsuccessful to run the command 'Make'. When I run the command, it stated 'ld: Can't find dependent library "libodbcinst.so.1"' and a bunch of warning such as '(Bundled) cc: warning 922: "-Ae" is unsupported in the bundled compiler, ignored.' appear. Is it my step is correct in setting up AcuSQL?

    What I do:
    1) uncommented the line "NO_ACUSQL" on config85.c and set it to 0.
    2) For Makefile:
    a) ACUSQL_ODBC_LIB = /mysql/mysq-con/mysql/lib/libmyodbc5.so
    b) Commented both "ACUSQL_FLAGS = -DNO_ACUSQL=1" and "ACUSQL_LIBS = #"
    c) Uncommented "ACUSQL_FLAGS =" and "ACUSQL_LIBS = $(ACU_LIBDIR)/libesql.a $(ACUSQL_ODBC_LIB)
    d) Save the changes at Makefile.

    For your information, I have already export the UnixODBC library (which have libodbcinst.so.1) to SHLIB_PATH and gcc which have been export to PATH.

    Thank you in advance for the reply.
  • The AcuSQL library makes calls to ODBC functions, such as SQLExecDirect(). The normal way to resolve those calls is to include an ODBC library in the link line. Sometimes, you can resolve those calls with a vendor's ODBC driver library (such as a MySQL driver library) if that library exposes the EXACT functions we need to call. So, to answer your original question, you don't need UnixODBC per se, but you do need a library from MySQL that has all the right functions. It is probably easier to use UnixODBC (or equivalent) and link with that library, though that requires a lot of ODBC setup to happen.

    It looks like you are trying to use the vendor's ODBC driver library, libmyodbc5.so. That library may depend on other libraries (such as libodbcinst.so.1) which will require those libraries to be listed on the link line as well. Or it could be that something else is referencing libodbcinst.so.1, and it could be that that library is not actually needed.

    Search the Makefile for the libodbcinst.so. If it is not found, then check the dependencies of libmyodbc5.so.

    The warnings you are getting (-Ae is unsupported) may be due to using a different C compiler than we used to build the original product. In that case, the resulting executable may not be valid. Even if the link succeeds.
  • Thanks for the reply. May I ask for suggestion regarding which C compiler than can be used? That is because I currently used gcc to compile the product with the command "export PATH=$PATH:/usr/local/bin" to pinpoint the gcc location.

    Thanks.
  • we do not use gcc on HP-UX, we use the ANSI 89-compliant C compiler supplied by the vendor of your HP-UX system
  • I see. My HP-UX only have bundled compiler (HP C/aC ) though. Thanks.