Dear Community

I'd like to use poker-eval in java and just came
 across the old post "poker-eval: Java-bindings update" (see below). I have 
some problems following the instructions and I'd appreciate any help.
I'm using mingw (20120426) on win7. mingw outputs attached

I checked out the sources from 
http://svn.gna.org/svn/pokersource/branches/poker-eval-java
 and did the following:  (complete mingw-outputs below) 
"(usual trunk prebuild: libtoolize, aclocal, autoconf,...)"
$ autoreconf --install

libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])
libtoolize: rerunning libtoolize, to keep the correct
...

I ignored the warning (without knowing better)

$ ./configure --enable-java
...
checking for uudecode... no
checking if uudecode can decode base 64 file...
: command not found
./Test.uue: line 2: yv66vgADAC0AFQcAAgEABFRlc3QH
: command not found
./Test.uue: line 3: bWFpbgEAFihbTGphdmEvbGFuZy9T
: command not found
./Test.uue: line 4: bWJlclRhYmxlDAAKAAsBAARleGl0
: command not found
./Test.uue: line 5: YW5nL1N5c3RlbQEABjxpbml0PgEA
: command not found
./Test.uue: line 6: aWxlAQAJVGVzdC5qYXZhACEAAQAD
: command not found
./Test.uue: line 7: AAAABQO4AAyxAAAAAQAIAAAACgAC
: command not found
./Test.uue: line 9: ====: command not found
no
configure: WARNING: I have to compile Test.class
checking if java works... yes
checking for javadoc... javadoc
checking for jar.exe... jar.exe
checking for javac... /java/bin/javac
checking for javah... /java/bin/javah
configure: WARNING: unable to include <jni.h>
checking for an ANSI C-conforming const... yes
...

ignored again...

$ make
shich stops with an error:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -I../include -Wall -Wpoi
nter-arith -Wstrict-prototypes -g -O2 -MT libpoker_eval_la-enumerate.lo -MD -MP
-MF .deps/libpoker_eval_la-enumerate.Tpo -c enumerate.c  -DDLL_EXPORT -DPIC -o .
libs/libpoker_eval_la-enumerate.o
enumerate.c: In function 'enumExhaustive':
enumerate.c:415:5: error: 'intptr_t' undeclared (first use in this function)
enumerate.c:415:5: note: each undeclared identifier is reported only once for ea
ch function it appears in
make[1]: *** [libpoker_eval_la-enumerate.lo] Error 1
make[1]: Leaving directory `c:/pokersource/lib'
make: *** [all-recursive] Error 1

 
Can you give me some hints, what is going wrong here? As you can see I don't 
have much experience using mingw.

Michael


Complete outputs:

autoreconf:
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])
libtoolize: rerunning libtoolize, to keep the correct
java/Makefile.am:75: addprefix -I, $(JNI_INCLUDE_DIRS:
java/Makefile.am:75: (probably a GNU make extension)
java/Makefile.am:76: shell find org -type f -name '*.j
ame
java/Makefile.am:76: (probably a GNU make extension)
java/Makefile.am:77: sort $(dir $(JAVASOURCE: non-POSI
java/Makefile.am:77: (probably a GNU make extension)
java/Makefile.am:78: patsubst %/,%, $(ALL_PKGS_DIRS: n
java/Makefile.am:78: (probably a GNU make extension)
java/Makefile.am:79: subst /,., $(ALL_PKGS_PSEP: non-P
java/Makefile.am:79: (probably a GNU make extension)
java/Makefile.am:80: filter-out %.test, $(ALL_PKGS_QUA

java/Makefile.am:80: (probably a GNU make extension)
java/Makefile.am:85: subst /,., $(JNI_JAVASOURCE: non-
java/Makefile.am:85: (probably a GNU make extension)
tests/Makefile.am:86: variable `razz_SOURCES' is defin
tests/Makefile.am:86: library has `razz' as canonical
tests/Makefile.am:87: variable `razz_LDADD' is defined
tests/Makefile.am:87: library has `razz' as canonical
tests/Makefile.am:89: variable `razz_LDFLAGS' is defin
tests/Makefile.am:89: library has `razz' as canonical
Makefile.am:74: filter-out %.m4,$(wildcard config/[a-z
e
Makefile.am:74: (probably a GNU make extension)


./configure --enable-java

$ ./configure --enable-java
checking build system type... i686-pc-mingw3
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw
checking for a BSD-compatible install... /bi
checking whether build environment is sane..
checking for a thread-safe mkdir -p... /bin/
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cache
checking for style of include used by make..
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file
checking for suffix of executables... .exe
checking whether we are cross compiling... n
checking for suffix of object files... o
checking whether we are using the GNU C comp
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89...
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gc
checking for grep that handles long lines an
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTE
checking for gcc... (cached) gcc
checking whether we are using the GNU C comp
checking whether gcc accepts -g... (cached)
checking for gcc option to accept ISO C89...
checking dependency style of gcc... (cached)
checking how to print strings... printf
checking for a sed that does not truncate ou
checking for fgrep... /bin/grep -F
checking for ld used by gcc... c:/mingw/ming
checking if the linker (c:/mingw/mingw32/bin
checking for BSD- or MS-compatible name list
checking the name lister (/mingw/bin/nm) int
checking whether ln -s works... no, using cp
checking the maximum length of command line
checking whether the shell understands some
checking whether the shell understands "+=".
checking how to convert i686-pc-mingw32 file
func_convert_file_msys_to_w32
checking how to convert i686-pc-mingw32 file
onvert_file_msys_to_w32
checking for c:/mingw/mingw32/bin/ld.exe opt
checking for objdump... objdump
checking how to recognize dependent librarie
^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link l
lib
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /mingw/bin/nm outp
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... no
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exce
checking for gcc option to produce PIC... -D
checking if gcc PIC flag -DDLL_EXPORT -DPIC
checking if gcc static flag -static works...
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (ca
checking whether the gcc linker (c:/mingw/mi
braries... yes
checking whether -lc should be explicitly li
checking dynamic linker characteristics... W
checking how to hardcode library paths into
checking whether stripping libraries is poss
checking if libtool supports shared librarie
checking whether to build shared libraries..
checking whether to build static libraries..
checking for awk... /bin/awk
checking for md5sum... /bin/md5sum
checking for valgrind... no
checking for library containing strerror...
checking for ANSI C header files... (cached)
checking for inline... inline
checking for gcj... no
checking for guavac... no
checking for jikes... no
checking for javac... javac
checking if javac works... yes
checking for kaffe... no
checking for java... java
checking for uudecode... no
checking if uudecode can decode base 64 file
: command not found
./Test.uue: line 2: yv66vgADAC0AFQcAAgEABFRl
: command not found
./Test.uue: line 3: bWFpbgEAFihbTGphdmEvbGFu
: command not found
./Test.uue: line 4: bWJlclRhYmxlDAAKAAsBAARl
: command not found
./Test.uue: line 5: YW5nL1N5c3RlbQEABjxpbml0
: command not found
./Test.uue: line 6: aWxlAQAJVGVzdC5qYXZhACEA
: command not found
./Test.uue: line 7: AAAABQO4AAyxAAAAAQAIAAAA
: command not found
./Test.uue: line 9: ====: command not found
no
configure: WARNING: I have to compile Test.c
checking if java works... yes
checking for javadoc... javadoc
checking for jar.exe... jar.exe
checking for javac... /java/bin/javac
checking for javah... /java/bin/javah
configure: WARNING: unable to include <jni.h
checking for an ANSI C-conforming const... y
checking for inline... (cached) inline
checking whether byte ordering is bigendian.
checking whether gcc and cc understand -c an
checking size of long... 4
checking for unistd.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for long long... yes
checking for uint64_t... yes
checking for int8... no
checking for ccache... no
checking for gcov... /mingw/bin/gcov
configure: creating ./config.status
config.status: creating tests/run
config.status: creating Makefile
config.status: creating poker-eval.pc
config.status: creating poker-eval.spec
config.status: creating lib/Makefile
config.status: creating include/Makefile
config.status: creating examples/Makefile
config.status: creating tests/Makefile
config.status: creating java/Makefile
config.status: creating include/config.h
config.status: include/config.h is unchanged
config.status: creating include/poker_config
config.status: include/poker_config.h is unc
config.status: executing depfiles commands
config.status: executing libtool commands


make

$ make
Making all in lib
make[1]: Entering directory `c:/pokersource/lib'
C:/MinGW/msys/1.0/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CO
NFIG_H -I. -I../include -I../include  -Wall -Wpointer-arith -Wstrict-prototypes
 -g -O2 -MT libpoker_eval_la-enumerate.lo -MD -MP -MF .deps/libpoker_eval_la-enu
merate.Tpo -c -o libpoker_eval_la-enumerate.lo `test -f 'enumerate.c' || echo '.
/'`enumerate.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -I../include -Wall -Wpoi
nter-arith -Wstrict-prototypes -g -O2 -MT libpoker_eval_la-enumerate.lo -MD -MP
-MF .deps/libpoker_eval_la-enumerate.Tpo -c enumerate.c  -DDLL_EXPORT -DPIC -o .
libs/libpoker_eval_la-enumerate.o
enumerate.c: In function 'enumExhaustive':
enumerate.c:415:5: error: 'intptr_t' undeclared (first use in this function)
enumerate.c:415:5: note: each undeclared identifier is reported only once for ea
ch function it appears in
make[1]: *** [libpoker_eval_la-enumerate.lo] Error 1
make[1]: Leaving directory `c:/pokersource/lib'
make: *** [all-recursive] Error 1


Thank you for your help

Michael




Original Post

[Pokersource-users] poker-eval: Java bindings - Update
                        Sascha Lundberg

                        Sat, 28 Nov 2009 01:36:34 -0800
                







Hi all,

I have managed to update the latest java sources of poker-eval so that 
the java bindings can be built within the automake/autobuild process.
notable changes:
  - upgraded java code to java 5
  - removed dependency to jakarta oro
  - jni library is built by libtool
  - added the flag --enable-java to configure.ac which sets up all 
required java programs (javac, javah, javadoc,...) and target/host 
specific variables/flags
    if --enable-java is not set (or false) java will be skipped completely
  - added several .m4 files to config dir that actually check the java 
environment


yet there are some issues :-)

  - gcj or other is not supported -> req. Sun JDK 5 or later atm
  - currently the shared lib names are hard coded in java (probably fine 
for non-Windows systems; on Windows you finally need the compiled libs 
'libpoker-eval-1.dll' and 'libpokerjni-1.dll')
  - a corresponding 'Makefile.dos' is missing (how to create?)

  - as the license of JUnit (CPL) is not compatible with the GPL, i 
could replace it with...(?) maybe TestNG (Apache License 2.0, similar 
usage, easy to convert)
  - i'm not quite sure of the license note of 'config/ac_prog_javah.m4' 
(imo ok)


how to build and test:
  # ... (usual trunk prebuild: libtoolize, aclocal, autoconf,...)

  ./configure --enable-java
  make

  # java test:
  cd java
  make test
  make develtest

  # cd ..
  # make install

tested on Ubuntu and MinGW, I hope this will work for you too

check out the sources:
http://svn.gna.org/svn/pokersource/branches/poker-eval-java

this is a proposal, if you don't like the changes in configure.ac
i can create a separate build process for java

thanks a lot Loic for your help and support :-)
Sascha


                                          
_______________________________________________
Pokersource-users mailing list
[email protected]
https://mail.gna.org/listinfo/pokersource-users

Reply via email to