[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Trouble installing GLPKMEX
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] Trouble installing GLPKMEX |
Date: |
Wed, 6 May 2009 22:24:32 +0300 |
> Thanks for your quick response! I downloaded the alternate gplkcc.cpp
> file and tried to reinstall GLPKMEX. I was thrown these errors,
> ---------------------------------------------------------------------
> In function ‘char* strcpy(char*, const char*)’,
> inlined from ‘void mexFunction(int, mxArray**, int, const
> mxArray**)’ at glpkcc.cpp:732:
> /usr/include/bits/string3.h:106: warning: call to char*
> __builtin___strcpy_chk(char*, const char*, long unsigned int) will
> always overflow destination buffer
> In function ‘char* strcpy(char*, const char*)’,
> inlined from ‘void mexFunction(int, mxArray**, int, const
> mxArray**)’ at glpkcc.cpp:736:
> /usr/include/bits/string3.h:106: warning: call to char*
> __builtin___strcpy_chk(char*, const char*, long unsigned int) will
> always overflow destination buffer
There is an error in the original glpkmex code. To fix it replace
line 724:
char save_filetype[4];
by the following one:
char save_filetype[5];
Nevertheless, now compilation is successful.
> /usr/bin/ld: /usr/lib/libglpk.a(glpapi01.o): relocation R_X86_64_32
> against `a local symbol' can not be used when making a shared object;
> recompile with -fPIC
> /usr/lib/libglpk.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
Looks like there is some incompatibility between libglpk.a and the
glpkmex object code you just compiled.
> mex: link of ' "glpkcc.mexa64"' failed.
>??? Error using ==> mex at 213
> Unable to complete successfully.
>Error in ==> makeglpkmex at 111
> eval(['mex ' cmd]);
>Error in ==> run at 57
> evalin('caller', [s ';']);