[Roadster] install problems

Jacek Chruscik mercury at wirebros.com
Mon Oct 23 16:24:20 PDT 2006


use following to patch to replace old GMemChunk into G-Slices:

(save the following in text file g.patch, then use "patch -p0 <g.patch" 
in roadster/src directory)
you may need add "-rdynamic" to CFLAGS to make sure roadster will use 
external libraries, otherwise it will not work properly.
Good luck.


---------------------------cut------------------------------------
Index: src/location.c
===================================================================
RCS file: /cvs/cairo/roadster/src/location.c,v
retrieving revision 1.9
diff -u -d -p -r1.9 location.c
--- src/location.c 26 Oct 2005 06:53:23 -0000 1.9
+++ src/location.c 13 Jun 2006 12:16:11 -0000
@@ -30,15 +30,8 @@

gboolean location_lookup_attribute_name(const gchar* pszName, gint* 
pnReturnID);

-struct {
- GMemChunk* pLocationChunkAllocator;
-} g_Location;
-
void location_init()
{
- g_Location.pLocationChunkAllocator = g_mem_chunk_new("ROADSTER locations",
- sizeof(location_t), sizeof(location_t) * 1000, G_ALLOC_AND_FREE);
- g_return_if_fail(g_Location.pLocationChunkAllocator != NULL);
}

// get a new point struct from the allocator
@@ -46,9 +39,8 @@ gboolean location_alloc(location_t** ppL
{
g_return_val_if_fail(ppLocation != NULL, FALSE);
g_return_val_if_fail(*ppLocation == NULL, FALSE); // must be a pointer 
to a NULL pointer
- g_return_val_if_fail(g_Location.pLocationChunkAllocator != NULL, FALSE);

- location_t* pNew = g_mem_chunk_alloc0(g_Location.pLocationChunkAllocator);
+ location_t* pNew = g_slice_alloc0(sizeof(location_t));
if(pNew) {
*ppLocation = pNew;
return TRUE;
@@ -60,12 +52,11 @@ gboolean location_alloc(location_t** ppL
void location_free(location_t* pLocation)
{
g_return_if_fail(pLocation != NULL);
- g_return_if_fail(g_Location.pLocationChunkAllocator != NULL);

g_free(pLocation->pszName);

// give back to allocator
- g_mem_chunk_free(g_Location.pLocationChunkAllocator, pLocation);
+ g_slice_free1(sizeof(location_t), pLocation);
}

gboolean location_insert(gint nLocationSetID, mappoint_t* pPoint, gint* 
pnReturnID)
Index: src/locationset.c
===================================================================
RCS file: /cvs/cairo/roadster/src/locationset.c,v
retrieving revision 1.16
diff -u -d -p -r1.16 locationset.c
--- src/locationset.c 30 Sep 2005 05:09:51 -0000 1.16
+++ src/locationset.c 13 Jun 2006 12:16:12 -0000
@@ -37,27 +37,18 @@
struct {
GPtrArray* pLocationSetArray; // an array of locationsets
GHashTable* pLocationSetHash; // stores pointers to locationsets, 
indexed by ID
-
- GMemChunk* pLocationSetChunkAllocator; // allocs locationset_t objects
} g_LocationSet;

void locationset_init()
{
g_LocationSet.pLocationSetArray = g_ptr_array_new();
g_LocationSet.pLocationSetHash = g_hash_table_new(g_int_hash, g_int_equal);
-
- // create memory allocator
- g_LocationSet.pLocationSetChunkAllocator = g_mem_chunk_new("ROADSTER 
locationsets",
- sizeof(locationset_t), sizeof(locationset_t) * 20, G_ALLOC_AND_FREE);
- g_return_if_fail(g_LocationSet.pLocationSetChunkAllocator != NULL);
}

// get a new locationset struct from the allocator
static gboolean locationset_alloc(locationset_t** ppReturn)
{
- g_return_val_if_fail(g_LocationSet.pLocationSetChunkAllocator != NULL, 
FALSE);
-
- locationset_t* pNew = 
g_mem_chunk_alloc0(g_LocationSet.pLocationSetChunkAllocator);
+ locationset_t* pNew = g_mem_chunk_alloc0(sizeof(locationset_t));

// set defaults
pNew->bVisible = TRUE;
@@ -153,7 +144,7 @@ static void locationset_free(locationset
locationset_clear(pLocationSet);

// give back to allocator
- g_mem_chunk_free(g_LocationSet.pLocationSetChunkAllocator, pLocationSet);
+ g_slice_free1(sizeof(locationset_t), pLocationSet);
}

static void locationset_clear_all_locations(void)

-------------------------------------cut-----------------------------------------


Ray Duncan wrote:
>
> Hello,
>
> I’ve been trying for several weeks to install Roadster. I know very 
> little about Linux, but have made several successful installs of 
> various distros. I’ve been trying to install Roadster an a Gentoo box. 
> I keep getting error messages and I can’t figure out what I’m doing 
> wrong.Please see attached autogen.sh and make error messages.
>
> Thank you,
>
> Ray Duncan
>
> 1st Utility District of Knox County
>
> (865)966-9741
>
> Please note my new e-mail address is: rduncan at fudknox.org
>
> ------------------------------------------------------------------------
>
> localhost roadster # ls
> ABOUT-NLS    aclocal.m4      data                 ltmain.sh
> AUTHORS      aclocal.m4~     depcomp              macros
> COPYING      autogen.sh      include              missing
> CVS          autom4te.cache  install-sh           mkinstalldirs
> ChangeLog    config.guess    intl                 omf.make
> INSTALL      config.h        intltool-extract     pixmaps
> Makefile     config.h.in     intltool-extract.in  po
> Makefile.am  config.log      intltool-merge       roadster.spec
> Makefile.in  config.status   intltool-merge.in    src
> NEWS         config.sub      intltool-update      stamp-h1
> README       configure       intltool-update.in   xmldocs.make
> TODO         configure.ac    libtool
> localhost roadster # ./autogen.sh
> /usr/bin/gnome-autogen.sh
> checking for autoconf >= 2.53...
>   testing autoconf2.50... not found.
>   testing autoconf... found 2.59
> checking for automake >= 1.7...
>   testing automake-1.7... found 1.7.9
> checking for libtool >= 1.4.3...
>   testing libtoolize... found 1.5.22
> checking for glib-gettext >= 2.2.0...
>   testing glib-gettextize... found 2.10.3
> checking for intltool >= 0.25...
>   testing intltoolize... found 0.35.0
> checking for pkg-config >= 0.14.0...
>   testing pkg-config... found 0.20
> checking for gnome-common >= 2.3.0...
>   testing gnome-doc-common... found 2.12.0
> Checking for required M4 macros...
> Checking for forbidden M4 macros...
> **Warning**: I am going to run `configure' with no arguments.
> If you wish to pass any to it, please specify them on the
> `./autogen.sh' command line.
>
> Processing ./configure.ac
> Running libtoolize...
> Running glib-gettextize... Ignore non-fatal messages.
> Copying file mkinstalldirs
> Copying file po/Makefile.in.in
>
> Please add the files
>   codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4
>   progtest.m4
> from the /usr/share/aclocal directory to your autoconf macro directory
> or directly to your aclocal.m4 file.
> You will also need config.guess and config.sub, which you can get from
> ftp://ftp.gnu.org/pub/gnu/config/.
>
> Running intltoolize...
> Running gnome-doc-common...
> Running aclocal-1.7...
> Running autoconf...
> Running autoheader...
> Running automake-1.7...
> Running ./configure --enable-maintainer-mode ...
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking whether to enable maintainer-specific portions of Makefiles... yes
> checking build system type... i686-pc-linux-gnu
> checking host system type... i686-pc-linux-gnu
> checking for style of include used by make... GNU
> checking for gcc... gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ANSI C... none needed
> checking dependency style of gcc... gcc3
> checking for a sed that does not truncate output... /bin/sed
> checking for egrep... grep -E
> checking for ld used by gcc... /usr/i686-pc-linux-gnu/bin/ld
> checking if the linker (/usr/i686-pc-linux-gnu/bin/ld) is GNU ld... yes
> checking for /usr/i686-pc-linux-gnu/bin/ld option to reload object files... -r
> checking for BSD-compatible nm... /usr/bin/nm -B
> checking whether ln -s works... yes
> checking how to recognise dependent libraries... pass_all
> checking how to run the C preprocessor... gcc -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 dlfcn.h usability... yes
> checking dlfcn.h presence... yes
> checking for dlfcn.h... yes
> checking for g++... g++
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++ accepts -g... yes
> checking dependency style of g++... gcc3
> checking how to run the C++ preprocessor... g++ -E
> checking for g77... no
> checking for f77... no
> checking for xlf... no
> checking for frt... no
> checking for pgf77... no
> checking for fort77... no
> checking for fl32... no
> checking for af77... no
> checking for f90... no
> checking for xlf90... no
> checking for pgf90... no
> checking for epcf90... no
> checking for f95... no
> checking for fort... no
> checking for xlf95... no
> checking for ifc... no
> checking for efc... no
> checking for pgf95... no
> checking for lf95... no
> checking for gfortran... gfortran
> checking whether we are using the GNU Fortran 77 compiler... yes
> checking whether gfortran accepts -g... yes
> checking the maximum length of command line arguments... 32768
> checking command to parse /usr/bin/nm -B output from gcc object... ok
> checking for objdir... .libs
> checking for ar... ar
> checking for ranlib... ranlib
> checking for strip... strip
> checking for correct ltmain.sh version... yes
> checking if gcc supports -fno-rtti -fno-exceptions... no
> checking for gcc option to produce PIC... -fPIC
> checking if gcc PIC flag -fPIC works... yes
> checking if gcc static flag -static works... yes
> checking if gcc supports -c -o file.o... yes
> checking whether the gcc linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared libraries... yes
> checking whether -lc should be explicitly linked in... no
> checking dynamic linker characteristics... GNU/Linux ld.so
> checking how to hardcode library paths into programs... immediate
> checking whether stripping libraries is possible... yes
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... yes
> checking whether to build static libraries... yes
> configure: creating libtool
> appending configuration tag "CXX" to libtool
> checking for ld used by g++... /usr/i686-pc-linux-gnu/bin/ld
> checking if the linker (/usr/i686-pc-linux-gnu/bin/ld) is GNU ld... yes
> checking whether the g++ linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared libraries... yes
> checking for g++ option to produce PIC... -fPIC
> checking if g++ PIC flag -fPIC works... yes
> checking if g++ static flag -static works... yes
> checking if g++ supports -c -o file.o... yes
> checking whether the g++ linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared libraries... yes
> checking dynamic linker characteristics... GNU/Linux ld.so
> checking how to hardcode library paths into programs... immediate
> appending configuration tag "F77" to libtool
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... yes
> checking whether to build static libraries... yes
> checking for gfortran option to produce PIC... -fPIC
> checking if gfortran PIC flag -fPIC works... yes
> checking if gfortran static flag -static works... yes
> checking if gfortran supports -c -o file.o... yes
> checking whether the gfortran linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared libraries... yes
> checking dynamic linker characteristics... GNU/Linux ld.so
> checking how to hardcode library paths into programs... immediate
> checking for strerror in -lcposix... no
> checking for gcc... (cached) gcc
> checking whether we are using the GNU C compiler... (cached) yes
> checking whether gcc accepts -g... (cached) yes
> checking for gcc option to accept ANSI C... (cached) none needed
> checking dependency style of gcc... (cached) gcc3
> checking for gcc option to accept ANSI C... none needed
> checking whether we are using the GNU C++ compiler... (cached) yes
> checking whether g++ accepts -g... (cached) yes
> checking dependency style of g++... (cached) gcc3
> checking for ANSI C header files... (cached) yes
> checking for perl... /usr/bin/perl
> checking for XML::Parser... ok
> checking for iconv... /usr/bin/iconv
> checking for msgfmt... /usr/bin/msgfmt
> checking for msgmerge... /usr/bin/msgmerge
> checking for xgettext... /usr/bin/xgettext
> checking locale.h usability... yes
> checking locale.h presence... yes
> checking for locale.h... yes
> checking for LC_MESSAGES... yes
> checking libintl.h usability... yes
> checking libintl.h presence... yes
> checking for libintl.h... yes
> checking for ngettext in libc... yes
> checking for dgettext in libc... yes
> checking for bind_textdomain_codeset... yes
> checking for msgfmt... /usr/bin/msgfmt
> checking for dcgettext... yes
> checking for gmsgfmt... /usr/bin/gmsgfmt
> checking for xgettext... /usr/bin/xgettext
> checking for pkg-config... /usr/bin/pkg-config
> checking pkg-config is at least version 0.9.0... yes
> checking for GNOME... yes
> checking for CAIRO... yes
> checking for LIBSVG... checking whether to disable deprecated glib/gtk+/etc. features... yes
> checking for mysql_config... /usr/bin/mysql_config
> checking MySQL libraries... -L/usr/lib/mysql -lmysqld -lz -lpthread -lcrypt -lnsl -lm -lpthread -lrt -lmygcc -lsupc++
> checking mysql includes... "-I/usr/include/mysql -march=i686 -pipe -DHAVE_ERRNO_AS_DEFINE=1"
> checking gps.h usability... yes
> checking gps.h presence... yes
> checking for gps.h... yes
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating data/Makefile
> config.status: creating src/Makefile
> config.status: creating pixmaps/Makefile
> config.status: creating po/Makefile.in
> config.status: creating data/roadster.desktop
> config.status: creating config.h
> config.status: config.h is unchanged
> config.status: executing depfiles commands
> config.status: executing intltool commands
> config.status: executing default-1 commands
> config.status: executing po/stamp-it commands
> Now type `make' to compile roadster
> localhost roadster # make
> make  all-recursive
> make[1]: Entering directory `/usr/share/roadster'
> Making all in src
> make[2]: Entering directory `/usr/share/roadster/src'
> if gcc -DHAVE_CONFIG_H -I. -I. -I.. -DDATADIR=\"/usr/local/share/roadster\" -DGNOMELOCALEDIR=\"/usr/local/share/locale\" -DGNOMEICONDIR=\""/usr/local/share/pixmaps"\" -I. -DORBIT2=1 -pthread -I/usr/include/libgnomeui-2.0 -I/usr/include/libgnome-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/libbonoboui-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/gnome-keyring-1 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/libxml2 -I/usr/include/libglade-2.0   -I/usr/include/cairo    -I/usr/include/mysql -march=i686 -pipe -DHAVE_ERRNO_AS_DEFINE=1 -I/usr/include -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED   -I/usr/include  -g -O2 -Wall -MT location.o -MD -MP -MF ".deps/location.Tpo" \
>   -c -o location.o `test -f 'location.c' || echo './'`location.c; \
> then mv -f ".deps/location.Tpo" ".deps/location.Po"; \
> else rm -f ".deps/location.Tpo"; exit 1; \
> fi
> location.c:34: error: expected specifier-qualifier-list before 'GMemChunk'
> location.c: In function 'location_init':
> location.c:39: error: 'struct <anonymous>' has no member named 'pLocationChunkAllocator'
> location.c:39: warning: implicit declaration of function 'g_mem_chunk_new'
> location.c:40: error: 'G_ALLOC_AND_FREE' undeclared (first use in this function)location.c:40: error: (Each undeclared identifier is reported only once
> location.c:40: error: for each function it appears in.)
> location.c:41: error: 'struct <anonymous>' has no member named 'pLocationChunkAllocator'
> location.c: In function 'location_alloc':
> location.c:49: error: 'struct <anonymous>' has no member named 'pLocationChunkAllocator'
> location.c:51: warning: implicit declaration of function 'g_mem_chunk_alloc0'
> location.c:51: error: 'struct <anonymous>' has no member named 'pLocationChunkAllocator'
> location.c:51: warning: initialization makes pointer from integer without a castlocation.c: In function 'location_free':
> location.c:63: error: 'struct <anonymous>' has no member named 'pLocationChunkAllocator'
> location.c:68: warning: implicit declaration of function 'g_mem_chunk_free'
> location.c:68: error: 'struct <anonymous>' has no member named 'pLocationChunkAllocator'
> location.c: In function 'location_load':
> location.c:191: warning: pointer targets in passing argument 1 of 'db_parse_wkb_point' differ in signedness
> make[2]: *** [location.o] Error 1
> make[2]: Leaving directory `/usr/share/roadster/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/share/roadster'
> make: *** [all] Error 2
> localhost roadster #
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> roadster mailing list
> roadster at cairographics.org
> http://lists.freedesktop.org/mailman/listinfo/roadster
>   




More information about the roadster mailing list