TRANSFORM_TO_DOS_PATH problems


Subject: TRANSFORM_TO_DOS_PATH problems
From: Rob Campbell (rob.campbell@att.net)
Date: Tue Mar 06 2001 - 22:48:01 CST


I'm trying to compile Abiword 0.7.12 on my Windows NT system with no
success. I'm using 0.7.12 because it was the stable version when I started
this process. Before I get into the details of my problem, let me ask: Does
the build process for NT that is described on the web site not "JUST WORK"
for anyone else, or is it just me? I did a clean install of Visual C++ 5,
installed a recent (< 1 month old) version of cygwin in c:\cygwin, and tried
to build with the sources in both c:\ and c:\cygwin; no dice. Did you have
to make any changes to your environment variables or to the makefiles to get
AbiWord to compile?

My first problem seems to be with TRANSFORM_TO_DOS_PATH. As this snippet
from make's output shows:

    fatal error C1083: Cannot open compiler generated file:
'c:\cygwinabi-0.7.12\src
    \WIN32_1.1.8_i386_OBJ\obj\expat\gennmtab.obj': No such file or directory

there is an error in the translation of the AbiWord installation directory.
It should be "c:\cygwin\abi-0.7.12". I typed "make -p" and plowed through
hundreds of lines of variable definitions to see what the problem was. Some
of the things I noted:

(1) "ABI_XX_ROOT=c:/cygwinabi-0.7.12", which is the same kind of error.
(2) ABI_INCS is defined relative to $(ABI_XX_ROOT), so it is also wrong.
(3) TRANSFORM_TO_DOS_PATH=sed 's|/|$(CYGWIN_ROOT)|'
        | sed 's|/|$(CYGWIN_ROOT)|g'
        | sed 's|/|\\\\|g'

I added extra spaces above to make TRANSFORM_TO_DOS_PATH legible. It took
me a little while to figure out that the '|' characters inside the sed
expression are used as separators, as opposed to '/', as noted in the man
page. Does anyone know what the 'g' does?

ABI_XX_ROOT is assigned the value:

echo $(ABI_ROOT) | $(TRANSFORM_TO_DOS_PATH)|sed 's|\\\\|/|g'

ABI_ROOT is defined as "c:/abi-0.7.12" and CYGWIN_ROOT is "c:/cygwin".
Using these definitions, the same commands can be typed at the bash command
line. When I do so, the output is:

c:c:c:/cygwincygwinabi-0.7.12

Which is neither the value reported by make nor the correct value I
expected. For the time being, let's assume that I am doing something else
wrong that results in the third variation. The conclusion is:
TRANSFORM_TO_DOS_PATH doesn't work and I don't know how to fix it.

As a quick fix, I tired hardcoding ABI_XX_ROOT to the correct value. This
didn't work, and since TRANSFORM_TO_DOS_PATH is used elsewhere, it would
only be a partial fix. I don't know SED well enough to play with the value
of TRANSFORM_TO_DOS_PATH. Also, although it returns the wrong value in this
case, it might work properly in other cases. I don't want to break these.

Any help would be greatly appreciated. I would love to contribute some code
to AbiWord. My only other alternative is to port AbiWord to FORTRAN,
because I am, after all, a mechanical engineer.

Thanks,
Rob Campbell
rob.campbell@att.net



This archive was generated by hypermail 2b25 : Tue Mar 06 2001 - 10:14:30 CST