Hi Alan, 

 

thanks for your fast reply!

 

Well, I’m running a running a RHEL 6.2 64bit. 

Did some additional researches on the web but there seems to be no
glib2-package greater than 2.22 for Enterprise Linux 6. The same with my gcc
Version. I’m running version 4.4.6-4.el6. which seems to be pretty old – but
still the latest version for el6. 

 

But in both cases I’ve seen some packages for Fedora 17 and some other
Distributions. Maybe I’ll have a try on one of these Operating Systems this
week. You’re working on Ubuntu, is that right? 

 

Thanks!

Andreas

 

 

 

Von: Alan Robertson [mailto:[email protected]] 
Gesendet: Montag, 17. September 2012 16:04
An: Andreas Scheuring
Cc: Assimilation Project; Clint Byrum
Betreff: Re: [Assimilation] Compiling Code

 

Hi Andreas,

I've CCed Clint Byrum on this - as he's volunteered to be our Cmake expert.

I haven't compiled this on Red Hat.   Are you on a 32-bit or 64-bit
platform?

I try hard to set very restrictive compile parameters.  Usually these tend
to make things break on older platforms - this might be an example of that -
or it might not...

The short-cut answer is to drop the -Werror flag.  This will almost
certainly make the problem go away, and quite probably won't cause any
problems.  But I'd rather understand what's happening here, if you will help
me out...

Here are a few questions it would be helpful to know the answers to:
    Is this a 32-bit or 64-bit installation?
    What version of gcc are you running?

Here's the code you're having troubles with:
/usr/include/glib-2.0/glib/gthread.h:344: error: cast to pointer from
integer of different size
100         g_hash_table_insert(ObjectClassAssociation, object,
GUINT_TO_POINTER(classquark));
118         // Sleazy - the double cast is to make the 'const' go away - but
safe
119         // since we we never modify the strings we were given - we
expect them to be constants
120         // and we just point at them.
121         g_hash_table_replace(DebugClassAssociation,
(gpointer)((guintptr)classname), debugcount);
188         superclassquark =
GPOINTER_TO_INT(g_hash_table_lookup(ObjectClassAssociation, object));
194         g_hash_table_replace(ObjectClassAssociation, object,
GUINT_TO_POINTER(subclassquark));
216         GQuark          objquark =
GPOINTER_TO_INT(g_hash_table_lookup(ObjectClassAssociation, object));
219         GQuark          freedquark =
GPOINTER_TO_INT(g_hash_table_lookup(FreedClassAssociation, object));
226         g_hash_table_insert(FreedClassAssociation, object,
GUINT_TO_POINTER(objquark));
253         objquark =
GPOINTER_TO_INT(g_hash_table_lookup(ObjectClassAssociation, object));
276         GQuark          freedquark =
GPOINTER_TO_INT(g_hash_table_lookup(FreedClassAssociation, object));
296         GQuark          freedquark =
GPOINTER_TO_INT(g_hash_table_lookup(FreedClassAssociation, object));
312         GQuark          objquark =
GPOINTER_TO_INT(g_hash_table_lookup(ObjectClassAssociation, object));
322         g_hash_table_insert(SuperClassAssociation,
GUINT_TO_POINTER(subclass), GUINT_TO_POINTER(superclass));
322         g_hash_table_insert(SuperClassAssociation,
GUINT_TO_POINTER(subclass), GUINT_TO_POINTER(superclass));

With the exception of the code marked 'sleazy' ;-), I believe I'm using
Quarks in the way they're intended to be used.

The problem in the glib headers makes me think that this is an old version
of glib, or possibly gcc.
I'm currently running GCC version 4.6.1, with glib version 2.30.  Glib 2.22
is moderately old...  The current version of glib is 2.32.  The glib web
site no longer has documentation on version 2.22.  My company laptop is
years out of date and has glib 2.24 - and I seem to recall it has similar
problems...

Clint:
How do we make cmake turn off -Werror or better yet just the cast flag when
glib is < 2.25?  Can you provide a patch for that?



On 09/17/2012 06:53 AM, Andreas Scheuring wrote:

Hey everybody, 

That’s an very interesting project you’re working on. Would like to make a
test installation but I’m still running against errors while making the
code. I would be very thankful for a hint on that. Otherwise I’ll wait for
the first stable version with an install-routine.

 

So I’m running rhel6.2 in a virtual machine. I downloaded the .bz2 file
“Assimilation-e9992f9d655a.tar.bz2”

 

These dependencies where solved as described in the readme file: 

*       Cmake: yum install cmake (2.8.4-1)
*       C compiler: yum install gcc
*       make tools: yum install make
*       Recent version of Glib2: glib2.22.5-7
*       libpcap (or winpcap): yum install libpcap
*       pkg-config (even for Windows): :/configure – make – make install 
*       valgrind: yuminstall valgrind
*       Testify: just downloaded!
*       Doxygen: yum install doxygen
*       Dot: graphviz.2.28.0
*       Ctypesgen: just downloaded!

 

Now c-making your code returns the following (looks fine):

#cmake ../Experimental-Assimilation-e9992f9d655a/

-- The C compiler identification is GNU

-- Check for working C compiler: /usr/bin/gcc

-- Check for working C compiler: /usr/bin/gcc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- checking for module 'glib-2.0'

--   found glib-2.0, version 2.22.5

-- found gnu

-- Found Doxygen: /usr/bin/doxygen

-- Configuring done

-- Generating done

-- Build files have been written to: /assimmon/bin

 

 

But making it afterwards returns the following output with errors:

# make

Scanning dependencies of target generate_framesettypes

[  0%] Generating ../include/framesettypes.h

[  2%] Built target generate_framesettypes

Scanning dependencies of target generate_frametypes

[  2%] Generating ../include/frametypes.h

[  4%] Built target generate_frametypes

Scanning dependencies of target clientlib

[  6%] Building C object clientlib/CMakeFiles/clientlib.dir/proj_classes.c.o

cc1: warnings being treated as errors

In file included from /usr/include/glib-2.0/glib/gasyncqueue.h:34,

                 from /usr/include/glib-2.0/glib.h:34,

                 from
/assimmon/Experimental-Assimilation-e9992f9d655a/include/projectcommon.h:37,

                 from
/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:12
:

/usr/include/glib-2.0/glib/gthread.h: In function âg_once_init_enterâ:

/usr/include/glib-2.0/glib/gthread.h:344: error: cast to pointer from
integer of different size

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:
In function âproj_class_register_objectâ:

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:10
0: error: cast to pointer from integer of different size

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:
In function âproj_class_register_debug_counterâ:

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:12
1: error: cast from pointer to integer of different size

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:12
1: error: cast to pointer from integer of different size

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:
In function âproj_class_register_subclassedâ:

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:18
8: error: cast from pointer to integer of different size

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:19
4: error: cast to pointer from integer of different size

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:
In function âproj_class_dissociateâ:

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:21
6: error: cast from pointer to integer of different size

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:21
9: error: cast from pointer to integer of different size

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:22
6: error: cast to pointer from integer of different size

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:
In function âproj_class_is_aâ:

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:25
3: error: cast from pointer to integer of different size

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:
In function âproj_class_castasâ:

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:27
6: error: cast from pointer to integer of different size

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:
In function âproj_class_castasconstâ:

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:29
6: error: cast from pointer to integer of different size

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:
In function âproj_class_classnameâ:

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:31
2: error: cast from pointer to integer of different size

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:
In function âproj_class_quark_add_superclass_relationshipâ:

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:32
2: error: cast to pointer from integer of different size

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:32
2: error: cast to pointer from integer of different size

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:
In function âproj_class_quark_is_aâ:

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:33
5: error: cast to pointer from integer of different size

/assimmon/Experimental-Assimilation-e9992f9d655a/clientlib/proj_classes.c:33
5: error: cast from pointer to integer of different size

make[2]: *** [clientlib/CMakeFiles/clientlib.dir/proj_classes.c.o] Error 1

make[1]: *** [clientlib/CMakeFiles/clientlib.dir/all] Error 2

make: *** [all] Error 2

 

 

Any idea what’s wrong or missing?

 

Thanks Andreas

 






_______________________________________________
Assimilation mailing list - Discovery-Driven Monitoring
[email protected]
http://lists.community.tummy.com/cgi-bin/mailman/listinfo/assimilation
http://assimmon.org/






-- 
    Alan Robertson  <mailto:[email protected]> <[email protected]> - @OSSAlanR
 
"Openness is the foundation and preservative of friendship...  Let me claim
from you at all times your undisguised opinions." - William Wilberforce
_______________________________________________
Assimilation mailing list - Discovery-Driven Monitoring
[email protected]
http://lists.community.tummy.com/cgi-bin/mailman/listinfo/assimilation
http://assimmon.org/

Reply via email to