several months ago we did a quick port to tru64 with g++. we got things to
compile but never did much testing.
These were the compiler options we used:
ifeq (${PLATFORM}, TRU64)
## for g++
ifeq (${CXX}, g++)
SUPPORTED = TRUE
PLATFORM_COMPILE_OPTIONS = -fPIC -D${PLATFORM} -D_REENTRANT
#PLATFORM_COMPILE_OPTIONS += -DXALAN_CANNOT_MUTATE_ANONYMOUS_OBJECT
ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib -lgcc
EXTRA_LINK_OPTIONS=-lgcc -lstdc++ -lm
CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -shared -fPIC
LINK = g++ -D${PLATFORM} -fPIC
else
ifeq (${CXX}, cxx) ## for cxx
SUPPORTED = TRUE
PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} -ptr
${XERCESCROOT}/.cxx_repository -D__USE_STD_IOSTREAM
MAKE_SHARED = ${CXX} -D${PLATFORM} -shared -ptr
${XERCESCROOT}/.cxx_repository
ALLLIBS = ${LIBS} -L/usr/lib -L/usr/ccs/lib -lc -lrt -lm
CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
LINK = $(CXX) $(PLATFORM_COMPILE_OPTIONS)
endif # cxx
endif
-----Original Message-----
From: Cameron McCormack [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 05, 2001 9:32 PM
To: [EMAIL PROTECTED]
Subject: Re: compiling for digital unix
Me:
> I need to compile Xalan-C++ on a Digital Unix box, but that's not one of
> the official supported platforms. (Actually I don't need Xalan-C++,
> just any XSLT processor, but Xalan looks pretty good.)
>
> Has anybody successfully tweaked the makefile to get it to work with
> Digital Unix? If so, what do I need to do? If not, any tips?
OK, I've managed to get the library to compile, by looking at how the
TRU64 section of the Xerces makefile works. I added this section to the
makefile:
#================ TRU64
ifeq ($(PLATFORM), TRU64)
SUPPORTED = TRUE
PLATFORM_COMPILE_OPTIONS = -D${PLATFORM}
ALLLIBS = ${LIBS} -L/usr/lib
MAKE_SHARED = ${CXX} -D${PLATFORM} -shared
MAKE_SHARED_C = ${CC} -D${PLATFORM} -shared
ifeq (${TRANSCODER}, ICU)
ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib -L/usr/ccs/lib
-licu-uc -licudata -lc -lrt
else
ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib -L/usr/ccs/lib -lc
-lrt
endif
CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
CC2 = $(CXX) $(PLATFORM_COMPILE_OPTIONS)
SHLIBSUFFIX=.so
LINK = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
endif
The only problem left now is that I can't get the samples to compile.
In the final step where it goes to link together the code from testXSLT
and the libraries, this happens:
g++ -O -DTRU64 -L/scratch/clm/xml-xalan/c/lib -lxalan-c1_1 -L/usr/lib
-L/usr/local/lib -L/usr/ccs/lib -lc -lrt
-L/scratch/clm/xerces-c-src1_4_0/lib -lxerces-c1_4
/scratch/clm/xml-xalan/c/obj/process.o -o
/scratch/clm/xml-xalan/c/bin/testXSLT
/bin/ld:
/usr/local/lib/libstdc++.a(streambuf.o): _GLOBAL_$D$_un_link__9streambuf:
multiply defined
/usr/local/lib/libstdc++.a(streambuf.o): _GLOBAL_$I$_un_link__9streambuf:
multiply defined
collect2: ld returned 1 exit status
I'm not good when it comes to shared libraries and things. Does anyone
know what's going on here? Is it trying to staticlly link in libstdc++
or something? Where would the other streambuf things be coming from?
Thanks,
Cameron
--
Cameron McCormack [ e-mail :: [EMAIL PROTECTED] ]
Melbourne, Australia [ web :: http://yoyo.cc.monash.edu.au/~clm/ ]
[ icq :: 26955922 ]