Re: [Help-glpk] Compiling and linking problems

2018-03-17 Thread Andrew Makhorin
 Forwarded Message 
From: Chris Matrakidis 
To: Mike Steglich 
Cc: help-glpk , Heinrich Schuchardt

Subject: Re: [Help-glpk] Compiling and linking problems
Date: Sun, 18 Mar 2018 02:12:20 +0200

Dear Mike,


If it isn't too much trouble, please do the following two tests:


1. Call configure (without --disable-reentrant) but before running make,
add to config.h the following: #define __WOE__
This is a more blunt version of Heinrich's suggestion, to see if we can
make it work. 


2. Call the attached modified configure (again
without --disable-reentrant).
This checks for gmtime_r and strtok_r and disables re-entrancy if not
found.


Best Regards,


Chris Matrakidis






___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] Compiling and linking problems

2018-03-17 Thread Mike Steglich

BTW, it is the same issue when I commented out all other code in env/stdc.c.

Thanks,

Mike

> Am 17.03.2018 um 16:20 schrieb Chris Matrakidis :
> 
> Dear Mike,
>  
>> I am able to build glpk v4.65 with --disable-reentrant. Unfortunately, 
>> Heinrich’s solution does not work for me.
>> 
> 
> Can you give more details on the problems with Heinrich's solution? It works 
> for me, but am only doing static builds with a custom makefile, so maybe 
> missing something.
> 
> Best Regards,
> 
> Chris Matrakidis
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] Compiling and linking problems

2018-03-17 Thread Mike Steglich
Dear Chris,

I got the same problem as I described in my first message ...

Thanks,

Mike

> Am 17.03.2018 um 16:20 schrieb Chris Matrakidis :
> 
> Dear Mike,
>  
>> I am able to build glpk v4.65 with --disable-reentrant. Unfortunately, 
>> Heinrich’s solution does not work for me.
>> 
> 
> Can you give more details on the problems with Heinrich's solution? It works 
> for me, but am only doing static builds with a custom makefile, so maybe 
> missing something.
> 
> Best Regards,
> 
> Chris Matrakidis
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] Compiling and linking problems

2018-03-17 Thread Chris Matrakidis
Dear Mike,


> I am able to build glpk v4.65 with --disable-reentrant. Unfortunately,
> Heinrich’s solution does not work for me.
>

Can you give more details on the problems with Heinrich's solution? It
works for me, but am only doing static builds with a custom makefile, so
maybe missing something.

Best Regards,

Chris Matrakidis
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] Compiling and linking problems

2018-03-17 Thread mike.steglich
Dear all,

 

I am able to build glpk v4.65 with --disable-reentrant. Unfortunately, 
Heinrich’s solution does not work for me.

 

Thank you for all suggestions,

 

Mike

 

Von: Chris Matrakidis  
Gesendet: Samstag, 17. März 2018 00:33
An: mike.stegl...@berlin.de
Cc: help-glpk ; Heinrich Schuchardt 
Betreff: Re: [Help-glpk] Compiling and linking problems

 

Dear Mike,

 

The config.h you provided looks correct. Until we find a more permanent 
solution, you have two options:

a) run configure with --disable-reentrant, or

b) follow Heinrich's solution 

 

This has been discussed in the past[1] and Andrew seems to favour option a.

 

Best Regards,

 

Chris Matrakidis

 

[1]  https://lists.gnu.org/archive/html/help-glpk/2017-06/msg00033.html

 

 

On 17 March 2018 at 01:23, Heinrich Schuchardt mailto:xypron.g...@gmx.de> > wrote:

Hello Mike,

https://stackoverflow.com/questions/6394512/standard-c-library-in-mingw
writes:
"MinGW is designed to build native Windows code, and as such it builds
against Windows' native libc."

So probably you want to change this line in src/env/stdc.c:

-#elif defined(__WOE__)
+#elif defined(__CYGWIN__) || defined(__MINGW32__) || defined(__WOE__)

Please, reply if this works. Then Andrew could update it in the next
version of GLPK.

There might be more lines needing such a change:

examples/glpsol.c:956:#ifndef __WOE__
src/env/time.c:88:#elif defined(__WOE__)
src/env/dlsup.c:107:#elif defined(__WOE__)
src/env/tls.c:85:#ifdef __WOE__
src/env/stdc.c:52:#elif defined(__WOE__)

Best regards

Heinrich



On 03/15/2018 02:35 PM, mike.stegl...@berlin.de 
  wrote:
> Dear GLPK-Team,
>
>  
>
> I have got some problems with building glpk 4.65 on Windows 10 with
> msys/mingw.
>
>  
>
> I tried to build it with:
>
> ./configure --enable-static --disable-shared
>
> make
>
>  
>
> Configure finished without problems. All sources are compiled without
> errors.
>
> But it ends with the following issues:
>
> …
>
> /bin/sh ../libtool --tag=CC   --mode=link gcc  -g -O2   -o glpsol.exe
> glpsol.o ../src/libglpk.la   -lm
>
> libtool: link: gcc -g -O2 -o glpsol.exe glpsol.o  ../src/.libs/libglpk.a
>
> ../src/.libs/libglpk.a(libglpk_la-stdc.o): In function `glp_xgmtime':
>
> C:\Users\Mike\Documents\Projekte\CMPL-1-12\Cmpl\data\glpk-4.65\src/env/stdc.c:81:
> undefined reference to `gmtime_r'
>
> ../src/.libs/libglpk.a(libglpk_la-stdc.o): In function `glp_xstrtok':
>
> C:\Users\Mike\Documents\Projekte\CMPL-1-12\Cmpl\data\glpk-4.65\src/env/stdc.c:93:
> undefined reference to `strtok_r'
>
> collect2.exe: error: ld returned 1 exit status
>
> make[2]: *** [glpsol.exe] Error 1
>
> make[2]: Leaving directory
> `/Documents/Projekte/CMPL-1-12/Cmpl/data/glpk-4.65/examples'
>
> make[1]: *** [all-recursive] Error 1
>
> make[1]: Leaving directory
> `/Documents/Projekte/CMPL-1-12/Cmpl/data/glpk-4.65'
>
> make: *** [all] Error 2  
>
>  
>
>  
>
> I have seen that in stdc.c are alternative versions of some function
> depending on some defines. But I am not sure what is  do do. I was
> wondering that the defines are  set by the configure script.
>
> I use as mentioned before msys/mingw:
>
> $ gcc -v
>
> Using built-in specs.
>
> COLLECT_GCC=C:\MinGW\bin\gcc.exe
>
> COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
>
> Target: mingw32
>
> Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu
> --host=mingw32 --target=mingw32 --with-gmp=/mingw --with-mpfr
> --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw
> --disable-win32-registry --with-arch=i586 --with-tune=generic
> --enable-languages=c,c++,objc,obj-c++,fortran,ada
> --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static
> --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions
> --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw
> --with-libintl-prefix=/mingw --enable-libstdcxx-debug --enable-libgomp
> --disable-libvtv --enable-nls
>
> Thread model: win32
>
> gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
>
>  
>
>  
>
> Any suggestions are welcome!
>
>  
>
> Thanks,
>
>  
>
> Mike
>
>  
>
>
>

> ___
> Help-glpk mailing list
> Help-glpk@gnu.org  
> https://lists.gnu.org/mailman/listinfo/help-glpk
>


___
Help-glpk mailing list
Help-glpk@gnu.org  
https://lists.gnu.org/mailman/listinfo/help-glpk

 

___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk