RE: [gnome-db] Compiling libgda in cygwin



On Fri, 2003-04-04 at 12:11, Andres Moya wrote:
> El jue, 27-03-2003 a las 12:11, Rodrigo Moya escribió:
> > On Thu, 2003-03-27 at 10:25, Andres Moya wrote: 
> > > El mié, 26-03-2003 a las 13:21, Rodrigo Moya escribió:
> > > > given how the code is written in libgda, which makes it (mostly) not
> > > > depend at all on a linux/unix system, I still think the best solution
> > > > for this is to create win32 makefiles, and not use
> > > > autoconf/automake/libtool at all, which, as we've already seen, makes
> > > > things difficult.
> > > > 
> > > > So, I'd propose to get the makefiles that are in the glib-2.0/gtk-2.0
> > > > sources, which are done for MS's make and gcc (AFAIR) and use them as
> > > > templates to create new win32-specific makefiles for libgda. I think
> > > > this is going to be easier.
> 
> > > How difficult and portable would be to make this? This makefile, could
> > > both be used to generate a native win32 library and a Cygwin one?
> >
> > iirc, I used glib's win32 makefile as a model for a lib I had to build
> > in both windows and linux some time ago, and it was a 10 minutes work,
> > so unless things have radically changed, I gues getting the glib's
> > makefile and adapting it to build libgda shouldn't be too difficult.
> 
> > I know (a bit at least) auto*, the problem is auto* in windows seems a
> > bit different than on unix, and I myself don't know about those
> > differences. So, also given that nobody has succeeded in doing it the
> > auto* way, I guess we could at least try the win32 makefile way.
> 
> Well, it seems that your solution worths trying, at least for compiling
> libgda in a "true" windows environment. But under Cygwin, i still think
> that the auto* solution should work, since it is intended to emulate a
> unix environment, with all libraries, tools and directories /usr/lib,
> /usr/include, etc. Anyway, i'm afraid that i'm not able to write the
> handmade makefile, as i said before i'm still not used to gnu
> compilation environment. I don't know even where to start... :-/
> 
as I already said, the glib/gtk sources contain makefiles for win32
builds. At least, they did last time I checked.

> If someone does it, it will be great. Until then, I'm still trying
> autogen, etc. And i have solved the errors that sent in my first mail
> (they were quite simple, actually :). At the end of this mail I put the
> solution, for if it is useful for someone.
> 
> But now I have another problem: the automake gives an error in all 
> files of module "libsql":
> 
>   autogen.out:libsql/Makefile.am: object `parser.$(OBJEXT)' created both
>   with libtool and without

> I'm not sure if this is caused by being compiling in Cygwin, or by the
> version of automake i'm using, or anything else. I have automake 1.7.2-1
> 
no, this is caused by a problem in the Makefile.am in libsql, which
includes the same sources for building the libgdasql library and for the
sql_parse_test program. So, just remove the sources from the
sql_parse_test_SOURCES variable in Makefile.am and make it use the built
libgdasql, as it has to be.

> I have searched Internet, and it seems that this message is related to
> having some .o files used in both a library and directly in an
> executable. And has something to do with something introduced in
> automake 1.6 :-?
> 
> Has anyone received this error?
> 
> Thanks
> 
> ---
> 
> Solution of the previous errors->
> 
> 1) The script gnome-autogen.sh (in gnome-common) uses some constructs
> specific to bash (like the "local" keyword), but the file starts with
> #!/bin/sh. This is no problem in Linux, because /bin/sh is a link to
> /bin/bash. But in Cygwin and another Unixes, /bin/sh is the true Bourne
> Shell, so the script does not work.
> 
> I have changed the first line to #!/bin/bash and it now works. In two
> files:
> 
> /usr/local/bin/gnome-autogen.sh
> /usr/local/share/aclocal/gnome2-macros/autogen.sh
> 
hmm, gnome-autogen.sh is shared between all GNOME apps, so I guess the
best way is to talk about it in a GNOME common list, such as
desktop-devel-list gnome org 

> 
> 2) The script use `aclocal --print-ac-dir` to find out the directory
> where the .m4 macros are. This option usually returns the directory
> where the macros actually are, but it may also return the location of a
> "dirlist" file, that indirectly refers to the macros.
> 
> This aclocal feature is being used in Cygwin, but the script does not
> recognize it. To solve this, i've added these lines in line 158 of
> /usr/local/share/aclocal/gnome2-macros/autogen.sh, after this code:
> 
> if [ -f "$dir/$macro" ]; then
>     macrofound=true
>     break
> fi
> 
> > if [ -f "$dir/dirlist" ]; then
> >     dir=`cat $dir/dirlist`
> >     if [ -f "$dir/$macro" ]; then
> >         macrofound=true
> >         break
> >     fi
> > fi
>  
> BTW, how do I submit a bug with this? I don't find "gnome-common"
> library in bugzilla.gnome.org...
>
hmm, good point. I guess you could try sending mail to desktop-devel,
and see what people answer.

cheers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]