help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] Re: libglpk0: excessive install dependencies


From: vijay patil
Subject: [Help-glpk] Re: libglpk0: excessive install dependencies
Date: Mon, 17 Mar 2008 18:00:47 +0530

Xypron

I downloaed the tarball glpk-4.27-dl_r184.tar.gz, and eventually
managed to successfully (on both Windows XP and Gnu/Linux) run glpsol
with table feature. However I encountered following issues:

# GNU/Linux
-------------------------------------------
1. Configure script does not seems to check presence of header
"ltdl.h". I got error during make. After I installed ltdl related
header files, it works. It would be nice to detect this earlier i.e.
in configure script.

2. Function db_mysql_open (file: glpsql.c), there is potential bug.

Current Code with possible bug:
if(!mpl->iodbc) {
  xprintf("MySQL library has not been loaded\n");
  return NULL;
}

Correct Code:
if(!mpl->mysql) {
  xprintf("MySQL library has not been loaded\n");
  return NULL;
}

I found because I got runtime error while using MySQL example
transp_mysql.mod and mysql related shared library is loaded correctly
(do not have odbc). Example is working fine with corrected code.


# MS Windows XP
-------------------------------------------

1. In Function mpl_initialize (File: glpmpl04.c )
Mysql shared file name used is libmysqlclient, which is not correct
for Windows dll. On windows the dll name is libmySQL.dll. Corrected
code :

#ifdef WIN32
      mpl->iodbc = load_library("odbc32");
      mpl->mysql = load_library("libmySQL");
#else
      xassert(0 == lt_dlinit());
      mpl->iodbc = load_library("libiodbc");
      mpl->mysql = load_library("libmysqlclient");
#endif /* WIN32 */

2. I get fatal error when one of the functions dl_mysql_error and
dl_mysql_use_result is called. The error message says that there are
problems with function signature and function pointers. The errors
dis-appear if I add STDCALL to function signatures in functions
dl_mysql_error and dl_mysql_use_result. STDCALL seems to be used in
other places, so error most likely because it is not used in above
mentioned functions.

After fixing above problems I tried example transp_mysql.mod and it is
working correctly.

Thanks

On Mon, Mar 17, 2008 at 10:26 AM, Xypron <address@hidden> wrote:
> Hello Andrew, hello Rafael,
>
>  I have created
>  ftp://svn.heinrich-schuchardt.de/glpk/glpk-4.27-dl_r184.tar.gz
>
>  This version of glpk-4.27 loads iODBC and MySQL as shared libraries. The
>  user is gracefully informed at runtime if the libraries are missing.
>
>  This should resolve Debian bug #469732 "libglpk0: excessive install
>  dependencies".
>  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=469732
>
>  Under MinGW and Cygwin iODBC is replaced by ODBC32.dll.
>  I have adjusted the Makefiles for VC7, BC5.5, Dev-CPP to compile with
>  ODBC support.
>  I did not check
>  w32/Build_GLPK_with_VC6_MT_DLL.bat
>  w32/Makefile_VC6_MT_DLL
>
>  Changed files are:
>  configure
>  configure.ac
>  Makefile.in
>  include/glpmpl.h
>  include/glpsql.h
>  include/Makefile.in
>  src/glpmpl04.c
>  src/glpmpl05.c
>  src/glpsql.c
>  src/Makefile.in
>  w32/Build_GLPK_with_BC5.bat
>  w32/Build_GLPK_with_Dev.bat
>  w32/Build_GLPK_with_VC6.bat
>  w32/Makefile_BC5
>  w32/Makefile_Dev
>  w32/Makefile_VC6
>
> w32/glpk_4_27.def
>
>  To view the differences to the 4.27 release, please refer to
>  http://glpk.dyndns.org/viewvc/svn/glpk/glpk/branches/glpk-4.27-dl/
>  (revision 184 vs. revision 166)
>
>  Best regards
>
>  Xypron
>
>
>
>  Andrew Makhorin wrote:
>  > Xypron,
>  >
>  > There is some problem concerning iODBC and MySQL features which we have
>  > added to the recent version of glpk.
>  >
>  > Could please consider the issue?
>  >
>  > 
> http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/7a707abd64b3b577/a76affb34da08bc1?lnk=st&q=glpk#a76affb34da08bc1
>  >
>  > The person who is maintaining glpk for linux told me that:
>  >
>  >
>  >> What would really help is to have a plug-in architecture and have the
>  >> iodbc and mysql support loaded through a shared module.
>  >>
>  >
>  >
>  > Andrew Makhorin
>  >
>  >
>
>



-- 
Vijay Patil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]