You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Abraham Backus <ab...@backus.com> on 2002/09/05 07:45:38 UTC

Re: Some more Cygwin troubles - Was: Re[2]: Difficulties in compiling Xerces 2.1.0 under Cygwin

Alexander,

My apologies for taking so long.  I was on vacation last week and my family
wouldn't let me get near the computer too much :)

The other reason for taking so long is that your email intrigued me to try
building in bash shell.  I had been doing everything only in tcsh.  Well, I
went ahead and tried in bash (which is the default shell when you run
c:\cygwin\cygwin.bat) and had a different problem.

Here's the solution:
Make sure that you only have one installation of gcc and that it is a
current release installed via the cygwin distribution.  To do this, run the
cygwin setup.exe and make sure that you get the latest gcc.  In the "Select
Packages" page of the setup wizard, expand "Devel".  Currently, the latest
stable version is "2.95.3-5".  The latest experimental version is "3.2-1".
To see the experimental versions, select the "Exp" radio button near the top
of the window.

Here's my story:
Everything built without errors, but I had link problems in the final step
that makes the dll.  It turns out that when I use tcsh (via Windows
Start->Run "tcsh"), I have a different ordering of $PATH then when using
bash (via "c:\cygwin\cygwin.bat").  This is important to my situation
because it appears that some time ago, I had downloaded the gcc sources and
built and installed them, then forgot about this.  The cygwin gcc package
installs to /usr, while the default install (the --prefix option to
configure)  when you build gcc yourself installs to /usr/local.  So in tcsh,
I'm using a version that is built by someone that knows what they are doing,
but in bash, I'm using a version that I built myself.  After removing the
custom gcc binaries and includes (as well as other files), I tried building
Xerces-C++ again on bash and everything builds ok without any errors at all.

Anyway,  make sure that you have a cygwin-packaged gcc as noted above and
that there are no other versions of gcc on your system.

I don't know what's up with the getopts errors and I didn't see them, so my
only input to that is that if something is out of date with gcc, that might
be solved as well.

Also, I didn't know about the "run gmake" statement at the end of configure
either.  I didn't feel comfortable enough to make the change because there
might be a legitimate reason (legal? historic?) to not reference the "make"
tool.

-Abe

----- Original Message -----
>  Unfortunately it is not the end. I went to cygwin bash shell, moved to
xerces
>  sources directory and executed
>
./runConfigure -pcygwin -cgcc -xg++ -nfileonly -rnone -P/cygdrive/d/coding/x
erces
> .
>  It immediately blamed me with:
>
>  -- <cut> --
> getopts: not found
> getopts: not found
> unknown option -pcygwin
> runConfigure: Helper script to run "configure" for one of the supported
platforms
> Usage: runConfigure "options"
>        where options may be any of the following:
>  -- <cut> --
>
>  and so on.
>  Both "which getopt" and "which getopts" say that "no getopt in blablabla"
(or
>  "no getopts .."). But my cygwin seems to be installed fully. But if I
execute
>  "getopts" in my bash shell it says:
>
>  -- <cut> --
> $ getopts
> getopts: usage: getopts optstring name [arg]
>  -- <cut> --
>
>  Well, it seems to be a little mistake in the installer options for
Cygwin, or
>  is it only a trouble with my configuration?
>
>  Anyway, I skipped it. I made a copy of runConfigure with the name co2,
>  commented lines from "if test ${1}o = "o"; then" to "fi" and manually
edited
>  variable initialisations to:
>
>  -- <cut> --
> platform="cygwin"
> ccompiler="gcc"
> cppcompiler="g++"
> netaccessor="fileonly"
> thread="none"
> configureoptions="$configureoptions --prefix=/cygdrive/d/coding/xerces"
>  -- <cut> --
>
>  After that I execute ./co2 and it created makefile for me. Then I ran
make (it
>  hinted me to run gmake, but it seems that cygwin does not have it. Maybe
it
>  would be better to modify that echoed string if configurer finds a cygwin
>  platform?),... so, I ran make, and it even compiled something for several
>  minutes, but then stopped with the following error:
>
>  -- <cut> --
> g++ -D__CYGWIN__ -I/usr/include -I/usr/include/w32api -c
> -I/cygdrive/d/coding/xerces-c-src2_1_0/incl
>
ude -w -O -DXML_USE_CYGWIN_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER -DAPP_NO
_THREADS
> -DXML_USE_NO_TH
> READS      -o
/cygdrive/d/coding/xerces-c-src2_1_0/obj/CYGWIN/XMLWin1252Transcoder.o
> XMLWin1252Trans
> coder.cpp
> make -C Platforms
> make[2]: Entering directory
`/cygdrive/d/coding/xerces-c-src2_1_0/src/xercesc/util/Platforms'
> make -C Win32 all
> make[3]: Entering directory
> `/cygdrive/d/coding/xerces-c-src2_1_0/src/xercesc/util/Platforms/Win32'
> mkdir -p
/cygdrive/d/coding/xerces-c-src2_1_0/include/xercesc/util/Platforms/Win32
> cp -fp Win32Defs.hpp
/cygdrive/d/coding/xerces-c-src2_1_0/include/xercesc/util/Platforms/Win32
> g++ -D__CYGWIN__ -I/usr/include -I/usr/include/w32api -c
> -I/cygdrive/d/coding/xerces-c-src2_1_0/incl
>
ude -w -O -DXML_USE_CYGWIN_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER -DAPP_NO
_THREADS
> -DXML_USE_NO_TH
> READS    -D_GNU_SOURCE -D__USE_GNU -D__CYGWIN__   -o
> /cygdrive/d/coding/xerces-c-src2_1_0/obj/CYGWIN
> /Win32PlatformUtils.o Win32PlatformUtils.cpp
> Win32PlatformUtils.cpp: In function `static void *
XMLPlatformUtils::compareAndSwap(void **,
> const v
> oid *, const void *)':
> Win32PlatformUtils.cpp:808: passing `long int *' as argument 1 of
> `InterlockedCompareExchange(void *
> *, void *, void *)'
> make[3]: *** [Win32PlatformUtils.o] Error 1
> make[3]: Leaving directory
`/cygdrive/d/coding/xerces-c-src2_1_0/src/xercesc/util/Platforms/Win32'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory
`/cygdrive/d/coding/xerces-c-src2_1_0/src/xercesc/util/Platforms'
> make[1]: *** [platforms] Error 2
> make[1]: Leaving directory
`/cygdrive/d/coding/xerces-c-src2_1_0/src/xercesc/util'
> make: *** [Util] Error 2
>  -- <cut> --
>
>  So it seems it is not my fault now. Who can help me with this?



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


RE: Some more Cygwin troubles - Was: Re[2]: Difficulties in compiling Xerces 2.1.0 under Cygwin

Posted by Radovan Chytracek <Ra...@cern.ch>.
Hi,

     I could build the Xerces-C 2.1.0 from sources on cygwin 1.3.12 using GCC
2.95.3-5. I had some problem initially to build the library unless i configure
it using only -p cygwin -c gcc -x g++ switches. When I provided more switches
even identical to defaults the library did not build OK, actually only link
phase failed. I could run a few samples except SAX2Print which core dumps for
both the DTD and Schema based personal*.xml files. I'm going to build debug
version in order to find out where the problem comes from.

Cheers

           Radovan


Radovan Chytracek                     CERN, Division IT/API, Geant4
Collaboration
e-mail: Radovan.Chytracek@cern.ch     WWW: http://home.cern.ch/chytrace
phone:  +41 22 76 78871               fax: +41 22 76 78630


-----Original Message-----
From: Abraham Backus [mailto:abraham@backus.com]
Sent: Thursday, September 05, 2002 7:46 AM
To: xerces-c-dev@xml.apache.org; Alexander Myodov
Subject: Re: Some more Cygwin troubles - Was: Re[2]: Difficulties in
compiling Xerces 2.1.0 under Cygwin


Alexander,

My apologies for taking so long.  I was on vacation last week and my family
wouldn't let me get near the computer too much :)

The other reason for taking so long is that your email intrigued me to try
building in bash shell.  I had been doing everything only in tcsh.  Well, I
went ahead and tried in bash (which is the default shell when you run
c:\cygwin\cygwin.bat) and had a different problem.

Here's the solution:
Make sure that you only have one installation of gcc and that it is a
current release installed via the cygwin distribution.  To do this, run the
cygwin setup.exe and make sure that you get the latest gcc.  In the "Select
Packages" page of the setup wizard, expand "Devel".  Currently, the latest
stable version is "2.95.3-5".  The latest experimental version is "3.2-1".
To see the experimental versions, select the "Exp" radio button near the top
of the window.

Here's my story:
Everything built without errors, but I had link problems in the final step
that makes the dll.  It turns out that when I use tcsh (via Windows
Start->Run "tcsh"), I have a different ordering of $PATH then when using
bash (via "c:\cygwin\cygwin.bat").  This is important to my situation
because it appears that some time ago, I had downloaded the gcc sources and
built and installed them, then forgot about this.  The cygwin gcc package
installs to /usr, while the default install (the --prefix option to
configure)  when you build gcc yourself installs to /usr/local.  So in tcsh,
I'm using a version that is built by someone that knows what they are doing,
but in bash, I'm using a version that I built myself.  After removing the
custom gcc binaries and includes (as well as other files), I tried building
Xerces-C++ again on bash and everything builds ok without any errors at all.

Anyway,  make sure that you have a cygwin-packaged gcc as noted above and
that there are no other versions of gcc on your system.

I don't know what's up with the getopts errors and I didn't see them, so my
only input to that is that if something is out of date with gcc, that might
be solved as well.

Also, I didn't know about the "run gmake" statement at the end of configure
either.  I didn't feel comfortable enough to make the change because there
might be a legitimate reason (legal? historic?) to not reference the "make"
tool.

-Abe

----- Original Message -----
>  Unfortunately it is not the end. I went to cygwin bash shell, moved to
xerces
>  sources directory and executed
>
./runConfigure -pcygwin -cgcc -xg++ -nfileonly -rnone -P/cygdrive/d/coding/x
erces
> .
>  It immediately blamed me with:
>
>  -- <cut> --
> getopts: not found
> getopts: not found
> unknown option -pcygwin
> runConfigure: Helper script to run "configure" for one of the supported
platforms
> Usage: runConfigure "options"
>        where options may be any of the following:
>  -- <cut> --
>
>  and so on.
>  Both "which getopt" and "which getopts" say that "no getopt in blablabla"
(or
>  "no getopts .."). But my cygwin seems to be installed fully. But if I
execute
>  "getopts" in my bash shell it says:
>
>  -- <cut> --
> $ getopts
> getopts: usage: getopts optstring name [arg]
>  -- <cut> --
>
>  Well, it seems to be a little mistake in the installer options for
Cygwin, or
>  is it only a trouble with my configuration?
>
>  Anyway, I skipped it. I made a copy of runConfigure with the name co2,
>  commented lines from "if test ${1}o = "o"; then" to "fi" and manually
edited
>  variable initialisations to:
>
>  -- <cut> --
> platform="cygwin"
> ccompiler="gcc"
> cppcompiler="g++"
> netaccessor="fileonly"
> thread="none"
> configureoptions="$configureoptions --prefix=/cygdrive/d/coding/xerces"
>  -- <cut> --
>
>  After that I execute ./co2 and it created makefile for me. Then I ran
make (it
>  hinted me to run gmake, but it seems that cygwin does not have it. Maybe
it
>  would be better to modify that echoed string if configurer finds a cygwin
>  platform?),... so, I ran make, and it even compiled something for several
>  minutes, but then stopped with the following error:
>
>  -- <cut> --
> g++ -D__CYGWIN__ -I/usr/include -I/usr/include/w32api -c
> -I/cygdrive/d/coding/xerces-c-src2_1_0/incl
>
ude -w -O -DXML_USE_CYGWIN_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER -DAPP_NO
_THREADS
> -DXML_USE_NO_TH
> READS      -o
/cygdrive/d/coding/xerces-c-src2_1_0/obj/CYGWIN/XMLWin1252Transcoder.o
> XMLWin1252Trans
> coder.cpp
> make -C Platforms
> make[2]: Entering directory
`/cygdrive/d/coding/xerces-c-src2_1_0/src/xercesc/util/Platforms'
> make -C Win32 all
> make[3]: Entering directory
> `/cygdrive/d/coding/xerces-c-src2_1_0/src/xercesc/util/Platforms/Win32'
> mkdir -p
/cygdrive/d/coding/xerces-c-src2_1_0/include/xercesc/util/Platforms/Win32
> cp -fp Win32Defs.hpp
/cygdrive/d/coding/xerces-c-src2_1_0/include/xercesc/util/Platforms/Win32
> g++ -D__CYGWIN__ -I/usr/include -I/usr/include/w32api -c
> -I/cygdrive/d/coding/xerces-c-src2_1_0/incl
>
ude -w -O -DXML_USE_CYGWIN_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER -DAPP_NO
_THREADS
> -DXML_USE_NO_TH
> READS    -D_GNU_SOURCE -D__USE_GNU -D__CYGWIN__   -o
> /cygdrive/d/coding/xerces-c-src2_1_0/obj/CYGWIN
> /Win32PlatformUtils.o Win32PlatformUtils.cpp
> Win32PlatformUtils.cpp: In function `static void *
XMLPlatformUtils::compareAndSwap(void **,
> const v
> oid *, const void *)':
> Win32PlatformUtils.cpp:808: passing `long int *' as argument 1 of
> `InterlockedCompareExchange(void *
> *, void *, void *)'
> make[3]: *** [Win32PlatformUtils.o] Error 1
> make[3]: Leaving directory
`/cygdrive/d/coding/xerces-c-src2_1_0/src/xercesc/util/Platforms/Win32'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory
`/cygdrive/d/coding/xerces-c-src2_1_0/src/xercesc/util/Platforms'
> make[1]: *** [platforms] Error 2
> make[1]: Leaving directory
`/cygdrive/d/coding/xerces-c-src2_1_0/src/xercesc/util'
> make: *** [Util] Error 2
>  -- <cut> --
>
>  So it seems it is not my fault now. Who can help me with this?



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org