From: Jason S. <jsi...@gm...> - 2005-08-23 15:36:44
|
Has anyone tried it on amd64 OS? I am running gentoo 64bit and opensync failes to compile. Here is the error that I get. gcc -DHAVE_CONFIG_H -I. -I. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wall -I/usr/include/libxml2 -Werror -DOPENSYNC_PLUGINDIR=3D\"/usr/local/lib/opensync/plugins\" -DOPENSYNC_CONFIGDIR=3D\"/usr/local/share/opensync/defaults\" -DOPENSYNC_FORMATSDIR=3D\"/usr/local/lib/opensync/formats\" -g -O2 -MT opensync_debug.lo -MD -MP -MF .deps/opensync_debug.Tpo -c opensync_debug.c -fPIC -DPIC -o .libs/opensync_debug.o opensync_debug.c: In function `osync_trace': opensync_debug.c:64: warning: cast from pointer to integer of different siz= e opensync_debug.c:102: warning: cast to pointer from integer of different si= ze opensync_debug.c:102: warning: cast to pointer from integer of different si= ze make[2]: *** [opensync_debug.lo] Error 1 make[2]: Leaving directory `/home/jsievert/Desktop/libopensync-0.17/opensyn= c' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/jsievert/Desktop/libopensync-0.17' make: *** [all] Error 2 Thanks, Jason |
From: Armin B. <arm...@de...> - 2005-08-23 22:24:10
|
Someone tried this several days ago, but his compiler did not complain. so his opensync crashed of course. The problem is that im casting between (void *) and (int) which works on 32 bit but will fail on 64 bit of course due to the size differences. Is there any way around this, besides using temp variables? On Tue, 2005-08-23 at 10:36 -0500, Jason Sievert wrote: > Has anyone tried it on amd64 OS? I am running gentoo 64bit and > opensync failes to compile. Here is the error that I get. > > gcc -DHAVE_CONFIG_H -I. -I. -I.. -pthread -I/usr/include/glib-2.0 > -I/usr/lib64/glib-2.0/include -Wall -I/usr/include/libxml2 -Werror > -DOPENSYNC_PLUGINDIR=\"/usr/local/lib/opensync/plugins\" > -DOPENSYNC_CONFIGDIR=\"/usr/local/share/opensync/defaults\" > -DOPENSYNC_FORMATSDIR=\"/usr/local/lib/opensync/formats\" -g -O2 -MT > opensync_debug.lo -MD -MP -MF .deps/opensync_debug.Tpo -c > opensync_debug.c -fPIC -DPIC -o .libs/opensync_debug.o > opensync_debug.c: In function `osync_trace': > opensync_debug.c:64: warning: cast from pointer to integer of different size > opensync_debug.c:102: warning: cast to pointer from integer of different size > opensync_debug.c:102: warning: cast to pointer from integer of different size > make[2]: *** [opensync_debug.lo] Error 1 > make[2]: Leaving directory `/home/jsievert/Desktop/libopensync-0.17/opensync' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/home/jsievert/Desktop/libopensync-0.17' > make: *** [all] Error 2 > > > Thanks, > Jason > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Opensync-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opensync-users |
From: Roland S. <ro...@xi...> - 2005-08-23 22:37:05
|
Am Mittwoch, den 24.08.2005, 00:22 +0200 schrieb Armin Bauer: > Someone tried this several days ago, but his compiler did not complain. > so his opensync crashed of course. > > The problem is that im casting between (void *) and (int) which works on > 32 bit but will fail on 64 bit of course due to the size differences. > > Is there any way around this, besides using temp variables? Stefan Behlert sugested to first cast to (intptr_t) which is in inttypes.h http://sourceforge.net/mailarchive/message.php?msg_id=12671515 This works. I found the wrong cast that crashed opensync: Index: opensync/opensync_env.c =================================================================== --- opensync/opensync_env.c (Revision 598) +++ opensync/opensync_env.c (Arbeitskopie) @@ -666,6 +666,7 @@ { osync_bool ret = FALSE; GError *error = NULL; + gsize sz = 0; if (!filename) { osync_debug("OSYNC", 3, "No file open specified"); @@ -679,11 +680,12 @@ return FALSE; } g_io_channel_set_encoding(chan, NULL, NULL); - if (g_io_channel_read_to_end(chan, data, (gsize*)size, &error) != G_IO_STATUS_NORMAL) { + if (g_io_channel_read_to_end(chan, data, &sz, &error) != G_IO_STATUS_NORMAL) { osync_debug("OSYNC", 3, "Unable to read contents of file %s: %s", filename, error->message); osync_error_set(oserror, OSYNC_ERROR_IO_ERROR, "Unable to read contents of file %s: %s", filename, error->message); } else { ret = TRUE; + *size = (int)sz; } g_io_channel_shutdown(chan, FALSE, NULL); g_io_channel_unref(chan); After changing this i'm able to sync a evo2 with the file system. osyncstress with two file-syncs gives random crashes and i'm still looking for a way to get a backtrace in gdb. |