Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > General Gambling > Computer Technical Help
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-23-2005, 12:21 PM
stigmata stigmata is offline
Senior Member
 
Join Date: Aug 2004
Location: UK
Posts: 118
Default Can\'t install poker-eval on cygwin.

Hi,

poker-eval is the backend to twodimes.net. You should be able to install it on cygwin but it's not working for me. When I do make I get the following errors:

Any ideas?

if ccache gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include
-pipe -O3 -Wall -Wpointer-arith -Wstrict-prototypes -MT five_card_hands.o -MD -M
P -MF ".deps/five_card_hands.Tpo" -c -o five_card_hands.o five_card_hands.c; \
then mv -f ".deps/five_card_hands.Tpo" ".deps/five_card_hands.Po"; else rm -f ".
deps/five_card_hands.Tpo"; exit 1; fi
five_card_hands.c:29:24: getopt_w32.h: No such file or directory
five_card_hands.c: In function `parse_args':
five_card_hands.c:69: warning: implicit declaration of function `getopt'
five_card_hands.c:72: error: `optarg' undeclared (first use in this function)
five_card_hands.c:72: error: (Each undeclared identifier is reported only once
five_card_hands.c:72: error: for each function it appears in.)
make[1]: *** [five_card_hands.o] Error 1
make[1]: Leaving directory `/home/jclose/pkrsrc/poker-eval-128.0/examples'
make: *** [all-recursive] Error 1
Reply With Quote
  #2  
Old 11-23-2005, 12:34 PM
CORed CORed is offline
Senior Member
 
Join Date: Sep 2002
Posts: 273
Default Re: Can\'t install poker-eval on cygwin.

Are you running "make" from the cygwin shell? Did you run the configure script from the cygwin shell first? It looks like five_card_hands.c is trying to include getopt_w32.h, which is not a cygwin include file (at least it's not on my cygwin installation). This make me think maybe it's configured for visual c or something.

If you haven't already done this, open your cywin shell, change to the parent directory of you source tree for poker_eval, run ./configure, then run make.
Reply With Quote
  #3  
Old 11-23-2005, 12:40 PM
stigmata stigmata is offline
Senior Member
 
Join Date: Aug 2004
Location: UK
Posts: 118
Default Re: Can\'t install poker-eval on cygwin.

That's exactly how i did it;

cd poker-eval-128.0
./configure
make
Reply With Quote
  #4  
Old 11-23-2005, 12:56 PM
CORed CORed is offline
Senior Member
 
Join Date: Sep 2002
Posts: 273
Default Re: Can\'t install poker-eval on cygwin.

Strange. I don't find getopt_w32.h in either my cywin directory or my mingw directory. I suspect that the configure script is not working proerly with cygwin. You might want to file a bug report with the maintainers. You could try changing the the #include <getopt_w32.h> in five_card_hands.c to #include<getopt.h>. However, if the configure script isn't working right, this will probably just generate an error elsewhere. Alos, I don't know if the funtion prototypes, etc. in the missing getop_w32.h are compatible with those in getopt.h.
Reply With Quote
  #5  
Old 11-23-2005, 12:57 PM
stigmata stigmata is offline
Senior Member
 
Join Date: Aug 2004
Location: UK
Posts: 118
Default Re: Can\'t install poker-eval on cygwin.

Hmmmmn.... I was just trying something along the same lines.

examples/five_card_hands.c contains the following:


#include "poker_defs.h"
#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(
__BCPLUSPLUS__) || defined( __MWERKS__)
#include "getopt_w32.h"
#else
#include <getopt.h>
#endif
#include "inlines/eval.h"



I backed up the original, and deleted the possibly offending lines so it looks like this:


#include "poker_defs.h"
#include <getopt.h>
#include "inlines/eval.h"


I'm now trying to rebuild, will tell you how it goes.
Reply With Quote
  #6  
Old 11-23-2005, 01:02 PM
stigmata stigmata is offline
Senior Member
 
Join Date: Aug 2004
Location: UK
Posts: 118
Default Re: Can\'t install poker-eval on cygwin.

It just built without errors!

make check.... Passed all tests!

$ ./pokenum.exe Ah Kh - Ac Ad
Holdem Hi: 1712304 enumerated boards
cards win %win lose %lose tie %tie EV
Ah Kh 197131 11.51 1493670 87.23 21503 1.26 0.121
Ac Ad 1493670 87.23 197131 11.51 21503 1.26 0.879


Yipeee!!!!
[img]/images/graemlins/grin.gif[/img] [img]/images/graemlins/grin.gif[/img] [img]/images/graemlins/grin.gif[/img]
Thanks
Reply With Quote
  #7  
Old 11-23-2005, 01:11 PM
CORed CORed is offline
Senior Member
 
Join Date: Sep 2002
Posts: 273
Default Re: Can\'t install poker-eval on cygwin.

Actually, it looks like that #if defined statement is incorrect. It appears that it's including getopt_w32.h for all windows compilers, and it probably should only do it for microsoft and (maybe) borland.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:39 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.