Thread: [Javabdd-devel] compiling BuDDy+JavaBDD on a 64bits architecture
Brought to you by:
joewhaley
|
From: Fausto S. <fau...@un...> - 2008-10-29 16:39:44
Attachments:
Makefile
|
Hi to everybody! I'm trying to compile BuDDy+JavaBDD on an Intel Xeon QuadCore 64bits box running linux and Java 1.6. I modified the makefile in order to specify the 64bits requirement: -fPIC instead of -m32. I has to put -fPIC everywhere, or otherwise it does compile for a missing symbol. Compilation works almost fine now, with the exception that I get some warnings about the translation between 32 bits integers and pointers. The library libbuddy.so is generated, as well as the net/ hierarchy. I can run the NQueens test with BuDDy. However, the RubiksCube test breaks from time to time, with a segmentation fault at the setPair() method. It seems that everything works, except for the BDDPairing class. I attach the Makefile that I'm using. What am I doing wrong? Thanks, Fausto |
|
From: Florent T. <flo...@gm...> - 2008-10-29 17:24:40
|
It seems you're still linking to 32-bits libraries: > LINKFLAGS = -MLd -LDd -Zi /link /libpath:$(JDK_ROOT)/lib user32.lib > gdi32.lib |
|
From: Fausto S. <fau...@un...> - 2008-10-30 14:22:22
|
Thank you for the hint, but those libraries are only linked under Windows while I'm compiling under Linux, so the problem must be elsewhere! Fausto On Wed, 2008-10-29 at 17:50 +0100, Florent Teichteil wrote: > It seems you're still linking to 32-bits libraries: > > LINKFLAGS = -MLd -LDd -Zi /link /libpath:$(JDK_ROOT)/lib user32.lib > > gdi32.lib > |
|
From: Mayur N. <may...@gm...> - 2008-11-01 21:21:40
|
John,
I've noticed (e.g. from users of my Chord tool which is built on top
of bddbddb) that people run into a lot of problems building and
running JavaBDD on 64-bit machines. Given that such machines are
getting increasingly common, it would be great if you could provide
pre-compiled binaries for such machines, just like you've provided the
32-bit ones.
Fausto,
I too used to run into this problem quite often and I think I've
figured how to fix it. The compilation warnings you mention about
integer to pointer cast point to the problem. It is in file
buddy_jni.c:
#if __STDC_VERSION__ >= 199901
#include <inttypes.h>
#if INTPTR_MAX >= INT_MAX
typedef intptr_t intptr_cast_type;
#else /* no intptr_t, or intptr_t smaller than `int' */
typedef intmax_t intptr_cast_type;
#endif
#else
#include <stddef.h>
#include <limits.h>
#if PTRDIFF_MAX >= INT_MAX
typedef ptrdiff_t intptr_cast_type;
#else
typedef int intptr_cast_type;
#endif
#endif
If you eliminate the #else part and only keep:
#include <inttypes.h>
#if INTPTR_MAX >= INT_MAX
typedef intptr_t intptr_cast_type;
#else /* no intptr_t, or intptr_t smaller than `int' */
typedef intmax_t intptr_cast_type;
#endif
and then recompile everything, then I think you should be fine. Let
me know if this solution works for you. It worked for me but I use an
older (and faster) version of JavaBDD.
-- Mayur
On Thu, Oct 30, 2008 at 7:20 AM, Fausto Spoto <fau...@un...> wrote:
> Thank you for the hint, but those libraries are only linked under
> Windows while I'm compiling under Linux, so the problem must be
> elsewhere!
>
> Fausto
>
> On Wed, 2008-10-29 at 17:50 +0100, Florent Teichteil wrote:
>> It seems you're still linking to 32-bits libraries:
>> > LINKFLAGS = -MLd -LDd -Zi /link /libpath:$(JDK_ROOT)/lib user32.lib
>> > gdi32.lib
>>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Javabdd-devel mailing list
> Jav...@li...
> https://lists.sourceforge.net/lists/listinfo/javabdd-devel
>
|
|
From: Fausto S. <fau...@un...> - 2008-11-03 11:42:59
|
Thank you Mayur, it worked perfectly! Fausto On Sat, 2008-11-01 at 14:21 -0700, Mayur Naik wrote: > Fausto, > > I too used to run into this problem quite often and I think I've > figured how to fix it. The compilation warnings you mention about > integer to pointer cast point to the problem. It is in file > buddy_jni.c: |
|
From: ciccio f. <ke...@gm...> - 2012-03-01 11:24:37
|
Hi to everybody!
I'm trying to compile BuDDy+JavaBDD on an Intel Core2 duo 64bits box
running linux (ubuntu 64 bit) and Java 1.6. I modified the makefile in
order to specify
the 64bits requirement: -fPIC instead of -m32.
I've tried to follow the explanation included in javabdd developer mailing
list, and so
i have modified the buddy_jni.c:
#if __STDC_VERSION__ >= 199901
#include <inttypes.h>
#if INTPTR_MAX >= INT_MAX
typedef intptr_t intptr_cast_type;
#else /* no intptr_t, or intptr_t smaller than `int' */
typedef intmax_t intptr_cast_type;
#endif
#else
#include <stddef.h>
#include <limits.h>
#if PTRDIFF_MAX >= INT_MAX
typedef ptrdiff_t intptr_cast_type;
#else
typedef int intptr_cast_type;
#endif
#endif
and i have eliminated the #else part and only kept:
#include <inttypes.h>
#if INTPTR_MAX >= INT_MAX
typedef intptr_t intptr_cast_type;
#else /* no intptr_t, or intptr_t smaller than `int' */
typedef intmax_t intptr_cast_type;
#endif
now when i try to compile i got this error:
cc -DSPECIALIZE_RELPROD -DSPECIALIZE_AND -DSPECIALIZE_OR -DSMALL_NODES -O2
-fomit-frame-pointer -I. -I/home/tommaso/lavoro/jdk1.6.0_22//include
-Ibuddy/src -Ibuddy/src/.. -Icudd-2.4.0/cudd -Icudd-2.4.0/epd
-Icudd-2.4.0/mtr -Icudd-2.4.0/st -Icudd-2.4.0/util -Ical-2.1
-I/home/tommaso/lavoro/jdk1.6.0_22//include/linux -c -o buddy_jni.o
buddy_jni.c
buddy_jni.c: In function ‘Java_net_sf_javabdd_BuDDyFactory_makePair0’:
buddy_jni.c:607: error: ‘intptr_cast_type’ undeclared (first use in this
function)
buddy_jni.c:607: error: (Each undeclared identifier is reported only once
buddy_jni.c:607: error: for each function it appears in.)
buddy_jni.c:607: error: expected ‘;’ before ‘pair’
buddy_jni.c: In function
‘Java_net_sf_javabdd_BuDDyFactory_00024BuDDyBDD_veccompose0’:
buddy_jni.c:1742: error: ‘intptr_cast_type’ undeclared (first use in this
function)
buddy_jni.c:1742: error: expected ‘;’ before ‘pair’
buddy_jni.c: In function
‘Java_net_sf_javabdd_BuDDyFactory_00024BuDDyBDD_replace0’:
buddy_jni.c:1762: error: ‘intptr_cast_type’ undeclared (first use in this
function)
buddy_jni.c:1762: error: expected ‘;’ before ‘pair’
buddy_jni.c: In function
‘Java_net_sf_javabdd_BuDDyFactory_00024BuDDyBDDPairing_set0’:
buddy_jni.c:1783: error: ‘intptr_cast_type’ undeclared (first use in this
function)
buddy_jni.c:1783: error: expected ‘;’ before ‘pair’
buddy_jni.c: In function
‘Java_net_sf_javabdd_BuDDyFactory_00024BuDDyBDDPairing_set1’:
buddy_jni.c:1804: error: ‘intptr_cast_type’ undeclared (first use in this
function)
buddy_jni.c:1804: error: expected ‘;’ before ‘pair’
buddy_jni.c: In function
‘Java_net_sf_javabdd_BuDDyFactory_00024BuDDyBDDPairing_set2’:
buddy_jni.c:1838: error: ‘intptr_cast_type’ undeclared (first use in this
function)
buddy_jni.c:1838: error: expected ‘;’ before ‘pair’
buddy_jni.c: In function
‘Java_net_sf_javabdd_BuDDyFactory_00024BuDDyBDDPairing_set3’:
buddy_jni.c:1859: error: ‘intptr_cast_type’ undeclared (first use in this
function)
buddy_jni.c:1859: error: expected ‘;’ before ‘pair’
buddy_jni.c: In function
‘Java_net_sf_javabdd_BuDDyFactory_00024BuDDyBDDPairing_reset0’:
buddy_jni.c:1893: error: ‘intptr_cast_type’ undeclared (first use in this
function)
buddy_jni.c:1893: error: expected ‘;’ before ‘pair’
buddy_jni.c: In function
‘Java_net_sf_javabdd_BuDDyFactory_00024BuDDyBDDPairing_free0’:
buddy_jni.c:1911: error: ‘intptr_cast_type’ undeclared (first use in this
function)
buddy_jni.c:1911: error: expected ‘;’ before ‘pair’
make: *** [buddy_jni.o] Errore 1
What am I doing wrong?
Thanks,
Tommaso
|
|
From: John W. <joe...@gm...> - 2012-03-01 20:19:33
|
Did you forget to eliminate the outer "#if __STDC_VERSION__/#endif"? That's the only thing I can think that would cause the compiler to think that intptr_cast_type is undefined. -John On Thu, Mar 1, 2012 at 3:24 AM, ciccio formaggio <ke...@gm...> wrote: > Hi to everybody! > > I'm trying to compile BuDDy+JavaBDD on an Intel Core2 duo 64bits box > running linux (ubuntu 64 bit) and Java 1.6. I modified the makefile in > order to specify > the 64bits requirement: -fPIC instead of -m32. > I've tried to follow the explanation included in javabdd developer mailing > list, and so > i have modified the buddy_jni.c: > > #if __STDC_VERSION__ >= 199901 > #include <inttypes.h> > #if INTPTR_MAX >= INT_MAX > typedef intptr_t intptr_cast_type; > #else /* no intptr_t, or intptr_t smaller than `int' */ > typedef intmax_t intptr_cast_type; > #endif > #else > #include <stddef.h> > #include <limits.h> > #if PTRDIFF_MAX >= INT_MAX > typedef ptrdiff_t intptr_cast_type; > #else > typedef int intptr_cast_type; > #endif > #endif > > and i have eliminated the #else part and only kept: > > #include <inttypes.h> > #if INTPTR_MAX >= INT_MAX > typedef intptr_t intptr_cast_type; > #else /* no intptr_t, or intptr_t smaller than `int' */ > typedef intmax_t intptr_cast_type; > #endif > > now when i try to compile i got this error: > > cc -DSPECIALIZE_RELPROD -DSPECIALIZE_AND -DSPECIALIZE_OR -DSMALL_NODES -O2 > -fomit-frame-pointer -I. -I/home/tommaso/lavoro/jdk1.6.0_22//include > -Ibuddy/src -Ibuddy/src/.. -Icudd-2.4.0/cudd -Icudd-2.4.0/epd > -Icudd-2.4.0/mtr -Icudd-2.4.0/st -Icudd-2.4.0/util -Ical-2.1 > -I/home/tommaso/lavoro/jdk1.6.0_22//include/linux -c -o buddy_jni.o > buddy_jni.c > buddy_jni.c: In function ‘Java_net_sf_javabdd_BuDDyFactory_makePair0’: > buddy_jni.c:607: error: ‘intptr_cast_type’ undeclared (first use in this > function) > buddy_jni.c:607: error: (Each undeclared identifier is reported only once > buddy_jni.c:607: error: for each function it appears in.) > buddy_jni.c:607: error: expected ‘;’ before ‘pair’ > buddy_jni.c: In function > ‘Java_net_sf_javabdd_BuDDyFactory_00024BuDDyBDD_veccompose0’: > buddy_jni.c:1742: error: ‘intptr_cast_type’ undeclared (first use in this > function) > buddy_jni.c:1742: error: expected ‘;’ before ‘pair’ > buddy_jni.c: In function > ‘Java_net_sf_javabdd_BuDDyFactory_00024BuDDyBDD_replace0’: > buddy_jni.c:1762: error: ‘intptr_cast_type’ undeclared (first use in this > function) > buddy_jni.c:1762: error: expected ‘;’ before ‘pair’ > buddy_jni.c: In function > ‘Java_net_sf_javabdd_BuDDyFactory_00024BuDDyBDDPairing_set0’: > buddy_jni.c:1783: error: ‘intptr_cast_type’ undeclared (first use in this > function) > buddy_jni.c:1783: error: expected ‘;’ before ‘pair’ > buddy_jni.c: In function > ‘Java_net_sf_javabdd_BuDDyFactory_00024BuDDyBDDPairing_set1’: > buddy_jni.c:1804: error: ‘intptr_cast_type’ undeclared (first use in this > function) > buddy_jni.c:1804: error: expected ‘;’ before ‘pair’ > buddy_jni.c: In function > ‘Java_net_sf_javabdd_BuDDyFactory_00024BuDDyBDDPairing_set2’: > buddy_jni.c:1838: error: ‘intptr_cast_type’ undeclared (first use in this > function) > buddy_jni.c:1838: error: expected ‘;’ before ‘pair’ > buddy_jni.c: In function > ‘Java_net_sf_javabdd_BuDDyFactory_00024BuDDyBDDPairing_set3’: > buddy_jni.c:1859: error: ‘intptr_cast_type’ undeclared (first use in this > function) > buddy_jni.c:1859: error: expected ‘;’ before ‘pair’ > buddy_jni.c: In function > ‘Java_net_sf_javabdd_BuDDyFactory_00024BuDDyBDDPairing_reset0’: > buddy_jni.c:1893: error: ‘intptr_cast_type’ undeclared (first use in this > function) > buddy_jni.c:1893: error: expected ‘;’ before ‘pair’ > buddy_jni.c: In function > ‘Java_net_sf_javabdd_BuDDyFactory_00024BuDDyBDDPairing_free0’: > buddy_jni.c:1911: error: ‘intptr_cast_type’ undeclared (first use in this > function) > buddy_jni.c:1911: error: expected ‘;’ before ‘pair’ > make: *** [buddy_jni.o] Errore 1 > > > What am I doing wrong? > > Thanks, > Tommaso > > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Javabdd-devel mailing list > Jav...@li... > https://lists.sourceforge.net/lists/listinfo/javabdd-devel > > |