Angus Leeming wrote:

Milton Woods wrote:


Greetings,

I have attempted to compile LyX version 1.3.3 (with xforms-1.0) on a
fresh install of the latest release of Cygwin (1.5.5-1) and gcc
(3.3.1-2). The configure script runs without a hitch (with the flag
--with-extra-lib=/usr/local/lib:/usr/bin). The compile runs without
error until the final link of lyx.exe, when g++ complains about some
unresolved symbols (details below).

An identical result occurred when I tried to compile LyX version
1.3.2, and also
when I replaced gcc-3.3 with gcc-3.2. When I used gcc-2, the compile
and link completed without problems, but the executable produced a
segmentation fault (and an apology) without displaying any windows.



Kayvan Sylvan compiles LyX under cygwin on a regular basis. Maybe you should ask him for some ideas.


Kayvan seems to be too busy to help at the moment.

I have managed to compile xforms-1.0 as a static library, and all of
the demo programs can be made to compile (and run) after some
tweaking of library orders and paths. In particular, the libX11 dll
in /usr/bin works, but the static (.dll.a) version in /usr/lib
causes the link to fail because of unresolved (unexported?) symbols.
Anyway, the unresolved symbols in LyX appear not to be related to
the xforms library.



I have a vague feeling that these problems are all related somehow to the size of the application. The linker has no problems with somall apps but falls over when presented with big ones. Have you asked on a cygwin mailing list?


The linker doesn't seem to be the problem.

Consider as an example the file src/TextCache.C which declares a global method 'findFit'. When compiled using gcc-3.2 on Redhat 9, the 'nm' program shows that the object file includes two 'findFit' symbols:

00000366 t _GLOBAL__I__ZN9TextCache7findFitEP6Bufferi
00000000 T _ZN9TextCache7findFitEP6Bufferi

Both symbols are stored in the text section of the object file. When the same source file is compiled using gcc-3.3.1 on Cygwin, the object file includes three 'findFit' symbols:

        U __GLOBAL__D__ZN9TextCache7findFitEP6Bufferi
        U __GLOBAL__I__ZN9TextCache7findFitEP6Bufferi
00000000 T __ZN9TextCache7findFitEP6Bufferi

The two global symbols are marked as undefined.

Perhaps there is a bug in gcc-cygwin, or else the syntax used to define 'findFit' as global is incorrect or outdated. Can anyone suggest other reasons or possible workarounds?

Cheers,
Milton Woods.



Reply via email to