You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by "David S." <da...@solder.ath.cx> on 2009/03/30 02:54:30 UTC
Re: Compiling xalan C++1.10 / xerces 2.8.0 with mingw
David Bertoni wrote:
>
> You'll have much better luck getting the head of the Subversion
> repository to compile cleanly on mingw.
>
I cross-compiled Xerces 2.8.0, checked out Xalan revision 759804, and
started the process with:
./runConfigure -p mingw-msys -c mingw32-gcc -x mingw32-g++ -r none -z
-mno-cygwin -C --host=i686-mingw32
However, the build stopped with the following message:
../../../bin/MsgCreator: ../../../bin/MsgCreator: cannot execute binary
file
The command which built MsgCreator was:
mingw32-g++ -DMINGW -Wl,--allow-multiple-definition
-DXALAN_INMEM_MSG_LOADER \
-lm -L/tmp/xerces-c-src_2_8_0/lib -lxerces-c
../../../../obj/MsgFileOutputStream.o ../../../../obj/ICUResHandler.o
../../../../obj/InMemHandler.o ../../../../obj/MsgCreator.o
../../../../obj/NLSHandler.o ../../../../obj/SAX2Handler.o -o
../../../../bin/MsgCreator -L/tmp/xerces-c-src_2_8_0/lib -lxerces-c
It seems that MsgCreator is being cross compiled rather the being compiled
for the host system. Any hints as to how to proceed with the build?
--
View this message in context: http://www.nabble.com/Compiling-xalan-C%2B%2B1.10---xerces-2.8.0-with-mingw-tp19946057p22774778.html
Sent from the Xalan - C - Users mailing list archive at Nabble.com.
Re: Compiling xalan C++1.10 / xerces 2.8.0 with mingw
Posted by "David S." <da...@solder.ath.cx>.
David S. wrote:
>
> From src/xalanc/Utils/XalanMsgLib:
>
> --- Makefile.in.orig Tue Mar 31 21:34:09 2009
> +++ Makefile.in Tue Mar 31 21:40:31 2009
> @@ -236,10 +236,8 @@
> ifeq ($(PLATFORM), OS390)
> mv *.x ${XSL_LIB_DIR}
> else
> - rm -f $(XSL_LIB_DIR)/$(LINK_NAME) && \
> - $(LN) -fs $(LIB) $(XSL_LIB_DIR)/$(LINK_NAME)
> - rm -f $(XSL_LIB_DIR)/$(SO_NAME) && \
> - $(LN) -fs $(LIB) $(XSL_LIB_DIR)/$(SO_NAME)
> + $(LN) -fs $(XSL_LIB_DIR)/$(LIB) $(XSL_LIB_DIR)/$(LINK_NAME)
> + $(LN) -fs $(XSL_LIB_DIR)/$(LIB) $(XSL_LIB_DIR)/$(SO_NAME)
> endif ## OS390
> endif ## OS390BATCH
>
>
Oops... this patch belongs in src/xalanc not src/xalanc/Utils/XalanMsgLib
--
View this message in context: http://www.nabble.com/Compiling-xalan-C%2B%2B1.10---xerces-2.8.0-with-mingw-tp19946057p22800848.html
Sent from the Xalan - C - Users mailing list archive at Nabble.com.
Re: Compiling xalan C++1.10 / xerces 2.8.0 with mingw
Posted by David Bertoni <db...@apache.org>.
David S. wrote:
> I attempted to compile Xalan using msys/mingw on XP. The build failed because
> msys implements symlinks differently: usually the target is specified
> relative to the link, but with msys the target is specified relative to the
> working directory. It seems that msys has to copy the file since Windows
> doesn't support real symbolic links (from memory cygwin does the same
> thing).
Thanks for the patch. I've been working on some similar patches to get
mingw/msys working. I hope to avoid doing any copies at all by changing
the way we link. Otherwise, we'll be stuck with copying the file.
>
> I hacked a couple of Makefiles & it built O.K. My hacks should be
> conditional on the build platform being Windows - a mingw cross-compile
> would use the ordinary symlink semantics.
I doubt the current make system will ever support cross-compilation.
Dave
Re: Compiling xalan C++1.10 / xerces 2.8.0 with mingw
Posted by "David S." <da...@solder.ath.cx>.
I attempted to compile Xalan using msys/mingw on XP. The build failed because
msys implements symlinks differently: usually the target is specified
relative to the link, but with msys the target is specified relative to the
working directory. It seems that msys has to copy the file since Windows
doesn't support real symbolic links (from memory cygwin does the same
thing).
I hacked a couple of Makefiles & it built O.K. My hacks should be
conditional on the build platform being Windows - a mingw cross-compile
would use the ordinary symlink semantics.
>From src/xalanc/Utils/XalanMsgLib:
--- Makefile.in.orig Tue Mar 31 21:17:59 2009
+++ Makefile.in Tue Mar 31 21:23:23 2009
@@ -34,14 +34,12 @@
$(MESSAGELIB) : ${XSL_OBJ_DIR}/XalanMsgLib.o
$(MAKE_SHARED_LOC) $(EXTRA_LOC_LINK_OPTIONS) $^ -o $@
ifneq ($(PLATFORM), OS390)
- rm -f $(XSL_LIB_DIR)/$(LOC_LIBNAME)$(SHLIBSUFFIX) && \
- $(LN) -fs $(LOC_LIB)
$(XSL_LIB_DIR)/$(LOC_LIBNAME)$(SHLIBSUFFIX)
+ $(LN) -fs $(XSL_LIB_DIR)/$(LOC_LIB)
$(XSL_LIB_DIR)/$(LOC_LIBNAME)$(SHLIBSUFFIX)
ifeq ($(PLATFORM), AIX)
$(LN) -fs $(LOC_LIB)
$(XSL_LIB_DIR)/$(LOC_LIBNAME)$(LIB_MAJOR_VER)$(SHLIBSUFFIX)
else
- rm -f $(XSL_LIB_DIR)/$(LOC_LIBNAME)$(SHLIBSUFFIX).$(LIB_MAJOR_VER)
&& \
- $(LN) -fs $(LOC_LIB) \
-
$(XSL_LIB_DIR)/$(LOC_LIBNAME)$(SHLIBSUFFIX).$(LIB_MAJOR_VER)
+ $(LN) -fs $(XSL_LIB_DIR)/$(LOC_LIB) \
+ $(XSL_LIB_DIR)/$(LOC_LIBNAME)$(SHLIBSUFFIX).$(LIB_MAJOR_VER)
endif ## AIX
endif ## ! OS390
>From src/xalanc/Utils/XalanMsgLib:
--- Makefile.in.orig Tue Mar 31 21:34:09 2009
+++ Makefile.in Tue Mar 31 21:40:31 2009
@@ -236,10 +236,8 @@
ifeq ($(PLATFORM), OS390)
mv *.x ${XSL_LIB_DIR}
else
- rm -f $(XSL_LIB_DIR)/$(LINK_NAME) && \
- $(LN) -fs $(LIB) $(XSL_LIB_DIR)/$(LINK_NAME)
- rm -f $(XSL_LIB_DIR)/$(SO_NAME) && \
- $(LN) -fs $(LIB) $(XSL_LIB_DIR)/$(SO_NAME)
+ $(LN) -fs $(XSL_LIB_DIR)/$(LIB) $(XSL_LIB_DIR)/$(LINK_NAME)
+ $(LN) -fs $(XSL_LIB_DIR)/$(LIB) $(XSL_LIB_DIR)/$(SO_NAME)
endif ## OS390
endif ## OS390BATCH
--
View this message in context: http://www.nabble.com/Compiling-xalan-C%2B%2B1.10---xerces-2.8.0-with-mingw-tp19946057p22800575.html
Sent from the Xalan - C - Users mailing list archive at Nabble.com.
Re: Compiling xalan C++1.10 / xerces 2.8.0 with mingw
Posted by David Bertoni <db...@apache.org>.
David S. wrote:
>
> David Bertoni wrote:
>> You'll have much better luck getting the head of the Subversion
>> repository to compile cleanly on mingw.
>>
>
> I cross-compiled Xerces 2.8.0, checked out Xalan revision 759804, and
> started the process with:
>
> ./runConfigure -p mingw-msys -c mingw32-gcc -x mingw32-g++ -r none -z
> -mno-cygwin -C --host=i686-mingw32
>
> However, the build stopped with the following message:
>
> ../../../bin/MsgCreator: ../../../bin/MsgCreator: cannot execute binary
> file
Yes, there is no way currently to cross-compile Xalan-C, since the
MsgCreator binary needs to run on the host platform to generate the
message files. Xerces-C gets around this by pre-generating the message
files and checking them into the repository.
>
> The command which built MsgCreator was:
>
> mingw32-g++ -DMINGW -Wl,--allow-multiple-definition
> -DXALAN_INMEM_MSG_LOADER \
> -lm -L/tmp/xerces-c-src_2_8_0/lib -lxerces-c
> ../../../../obj/MsgFileOutputStream.o ../../../../obj/ICUResHandler.o
> ../../../../obj/InMemHandler.o ../../../../obj/MsgCreator.o
> ../../../../obj/NLSHandler.o ../../../../obj/SAX2Handler.o -o
> ../../../../bin/MsgCreator -L/tmp/xerces-c-src_2_8_0/lib -lxerces-c
>
> It seems that MsgCreator is being cross compiled rather the being compiled
> for the host system. Any hints as to how to proceed with the build?
Since the message files are just text, you can copy them from any other
platform. Take a look at the makefile for the exact set of files to
copy, or post back if you can't figure it out.
Dave