Hi,

I am trying to build xalan-c on HP-UX 11.23 using g++ (version 4.5.4).

I successfully build xerces-c with the same compiler. While building
xalanc I am getting the following error:


g++ -DHPUX -fPIC  -DXALAN_INMEM_MSG_LOADER   \
        -lc -lm   ../../../../obj/MsgFileOutputStream.o
../../../../obj/ICUResHandler.o ../../../../obj/InMemHandler.o
../../../../obj/MsgCreator.o ../../../../obj/NLSHandler.o
../../../../obj/SAX2Handler.o -o ../../../../bin/MsgCreator
-L/home/tuser/build/3rdParty/HP-UX/lib -lxerces-c
/usr/ccs/bin/ld: (Warning) Linker features were used that may not be
supported in future releases. The +vallcompatwarnings option can be
used to display more details, and the ld(1) man page contains
additional information. This warning can be suppressed with the
+vnocompatwarnings option.
/usr/ccs/bin/ld: (Warning) Linker features were used that may not be
supported in future releases. The +vallcompatwarnings option can be
used to display more details, and the ld(1) man page contains
additional information. This warning can be suppressed with the
+vnocompatwarnings option.
make[3]: Leaving directory
`/home/tuser/build/3rdParty-build/HP-UX/xalan-c-1.11/c/src/xalanc/Utils/MsgCreator'
../../../bin/MsgCreator
/home/tuser/build/3rdParty-build/HP-UX/xalan-c-1.11/c/src/xalanc/NLS/en_US/XalanMsg_en_US.xlf
-TYPE inmem -LOCALE en_US
/usr/lib/dld.sl: Unresolved symbol:
_ZNK11xercesc_3_113XMLBigDecimal10getRawDataEv (data)  from
/home/tuser/build/3rdParty/HP-UX/lib/libxerces-c-3.1.sl
[HP ARIES32]: Core file for 32-bit PA-RISC application
[HP ARIES32]:
/home/tuser/build/3rdParty-build/HP-UX/xalan-c-1.11/c/bin/MsgCreator
saved to 
/home/tuser/build/3rdParty-build/HP-UX/xalan-c-1.11/c/src/xalanc/Utils/core.MsgCreator
make[2]: *** [../../../nls/include/LocalMsgData.hpp] IOT trap (core dumped)
make[2]: Leaving directory
`/home/tuser/build/3rdParty-build/HP-UX/xalan-c-1.11/c/src/xalanc/Utils'

Running ldd for above gives:

ldd ../../../bin/MsgCreator
        /usr/lib/libc.2 =>      /usr/lib/libc.2
        /usr/lib/libdld.2 =>    /usr/lib/libdld.2
        /usr/lib/libc.2 =>      /usr/lib/libc.2
        /usr/lib/libm.2 =>      /usr/lib/libm.2
        /tools2/gcc-4.5.4/usr/local/lib/libstdc++.sl.6 =>
/tools2/gcc-4.5.4/usr/local/lib/libstdc++.sl.6
        /tools2/gcc-4.5.4/host-hppa2.0w-hp-hpux11.23/gcc/libgcc_s.4 =>
 /tools2/gcc-4.5.4/host-hppa2.0w-hp-hpux11.23/gcc/libgcc_s.4
        /usr/lib/libm.2 =>      /usr/lib/libm.2
        /home/tuser/build/3rdParty/HP-UX/lib/libxerces-c-3.1.sl =>
/home/tuser/build/3rdParty/HP-UX/lib/libxerces-c-3.1.sl
        /usr/lib/libm.2 =>      /usr/lib/libm.2
        /usr/lib/libnsl.1 =>    /usr/lib/libnsl.1
        /usr/lib/libxti.2 =>    /usr/lib/libxti.2

and at least the symbol is present in the xerces library:

strings  /home/tuser/build/3rdParty/HP-UX/lib/libxerces-c-3.1.sl |
grep _ZNK11xercesc_3_113XMLBigDecimal10getRawDataEv
._ZNK11xercesc_3_113XMLBigDecimal10getRawDataEv
_ZNK11xercesc_3_113XMLBigDecimal10getRawDataEv
_ZNK11xercesc_3_113XMLBigDecimal10getRawDataEv
_ZNK11xercesc_3_113XMLBigDecimal10getRawDataEv:F355


When I run it from command line by setting SHLIB_PATH, I get a core dump:

SHLIB_PATH=/home/tuser/build/3rdParty/HP-UX/lib
../../../bin/MsgCreator
/home/tuser/build/3rdParty-build/HP-UX/xalan-c-1.11/c/src/xalanc/NLS/en_US/XalanMsg_en_US.xlf
-TYPE inmem -LOCALE en_US
[HP ARIES32]: Core file for 32-bit PA-RISC application
[HP ARIES32]:
/home/tuser/build/3rdParty-build/HP-UX/xalan-c-1.11/c/bin/MsgCreator
saved to 
/home/tuser/build/3rdParty-build/HP-UX/xalan-c-1.11/c/src/xalanc/Utils/core.MsgCreator
ABORT instruction (core dumped)



Can somebody kindly help as to what could be going wrong? Or any workaround?


I built xerces using the following configure options:

./configure --prefix=/home/tuser/build/3rdParty/HP-UX --without-curl
--disable-threads --disable-rpath --enable-transcoder-iconv

Also,

I modified Makefile.incl to have the following HP-UX specific section
to make it work with g++ instead of aCC:

  SUPPORTED = TRUE

  ifeq (${CXX}, g++)

        PLATFORM_COMPILE_OPTIONS = -Wall -fPIC -D${PLATFORM} -D_REENTRANT
        ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib -lc

        EXTRA_LINK_OPTIONS=-lc
        CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
        CC4 = $(CC) $(CFLAGS) $(PLATFORM_COMPILE_OPTIONS)
        MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -shared -fPIC ${LDFLAGS}
        LINK =  g++ -D${PLATFORM} -fPIC ${LDFLAGS}

        ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib -lc

    SHLIBSUFFIX=.a

  endif

  XERCES_LIB= -L$(XERCESCROOT)/lib -lxerces-c
  ICU_LIB= -L$(ICUROOT)/lib -licuuc32 -L$(ICUI18NROOT)/lib -licui18n32

  LIB = $(LIB_NAME)$(LIB_MAJOR_VER).$(LIB_MINOR_VER)$(SHLIBSUFFIX)
  SO_NAME = $(LIB_NAME)$(LIB_MAJOR_VER)$(SHLIBSUFFIX)

  LIBRARY_LINK_NAME=-l$(PROJECT_NAME)$(LIB_MAJOR_VER)

  export LIBPATH := $(XERCESCROOT)/lib:$(ICULIB_LOC):$(LIBPATH)
  MAKE_SHARED_LOC=$(MAKE_SHARED)
  LOC_LIB = ${LOC_LIBNAME}${LIB_MAJOR_VER}.${LIB_MINOR_VER}${SHLIBSUFFIX}
  LOC_LIBKEYNAME=${LOC_PROJECT_NAME}${LIB_MAJOR_VER}


Thanks.

Reply via email to