Re: Build problem on Cygwin



On Tue, 8 Jul 2003, Gerrit P. Haase wrote:
Hallo dia-list,

I got a problem here with Dia on Cygwin.

I use libtool and all works fine, besides some minor modifications to
the base files for the autogenerated files (and recreation of
Makefile.in & configure et.al) I have not changed the source to build
it.  However, I doesn't work.  The first problem seems to be in
lib/plug-ins.c.  It should figure out that libtool is used (which is
default on non Windows platform, then use the .la file to find the
real name of the module/plug-in to load.  But as I ran into the
problems, I saw that dia requires the modules to be named in the usual
unix fashion (libxyz.so instead of cygxyz.dll as it is on Cygwin).

It is probably this part of plug-ins.c (this_is_a_plugin()) where .so
is hardcoded and the name of the library is basename of 'libxyz.la'
(='libxyz') plus '.so': 

#if USING_LIBTOOL
  basename = g_strndup(name,len-PLUG_IN_EXT_LEN);
  soname = g_strconcat(basename,".so",NULL);
...

This is wrong, since we have already the function which looks up the
filename: find_real_filename(), it should also be used?

I changed this to be:
#if USING_LIBTOOL
  basename = g_strndup(name,len-PLUG_IN_EXT_LEN);
  soname = find_real_filename(name);
...

and it works as expected.

Now I can run dia (without renaming cygxzy.dll files to libxyz.so
files), however, another error came up, it says "cannot load
/usr/lib/cygxslt.dll" which is probably a similar problem (but not the
same), because the imortlib used for linking is 'libxslt.la' but the
name of the DLL in the klibtool library is '../bin/cygxslt-1.dll', the
importlib is 'libxslt.dll.a' and therefore, I have no idea why dia
wants to load a "cygxslt.dll".  I also have not looked up the relevant
part in the code.

I have no patch attached yet, see it as a heads-up because it seems
there are some more parts which need to be fixed for a successful
build on Cygwin (and other, non-.so platforms).

Looking forward to it.  The more compilation, the better.

Anyway, many thanks for providing such an interesting piece of code to
the open source community,

Thanks go to Alex, primarily, for building a good base.

-Lars

-- 
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| HÃrdgrim of Numenor
"I do not agree with a word that you say, but I   |----------------------------
will defend to the death your right to say it."   | Where are we going, and
    --Evelyn Beatrice Hall paraphrasing Voltaire  | what's with the handbasket?



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