Hi,
 I was able to build xalan 1.12 on linux and windows but I am not able to
solve this issue on solaris 11 and am struggling to solve it.

Please have a look and provide some pointers if it comes to your mind.

-bash-5.2$ cmake -G "Unix Makefiles"
-DCMAKE_INSTALL_PREFIX=/scratch/amit/xerces_325_xalan_112_install
-DCMAKE_BUILD_TYPE=release  -Dtranscoder=default
/scratch/amit/xalan/xalan_c-1.12
-- The C compiler identification is SunPro 5.15.0
-- The CXX compiler identification is SunPro 5.15.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/sunstudio12.6/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/sunstudio12.6/bin/CC - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring Apache Xalan-C++ version 1.12.0
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Looking for signal
-- Looking for signal - found
-- Looking for SetConsoleCtrlHandler
-- Looking for SetConsoleCtrlHandler - not found
-- Looking for usleep
-- Looking for usleep - found
-- Looking for Sleep
-- Looking for Sleep - not found
-- Looking for gmtime_r
-- Looking for gmtime_r - found
-- Looking for localtime_r
-- Looking for localtime_r - found
-- Looking for _create_locale
-- Looking for _create_locale - not found
-- Looking for isnan
-- Looking for isnan - found
-- Looking for _isnan
-- Looking for _isnan - not found
-- Performing Test XALAN_HAVE_STD_ISNAN
-- Performing Test XALAN_HAVE_STD_ISNAN - Success
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for direct.h
-- Looking for direct.h - not found
-- Found the following ICU libraries:
--   uc (required)
--   data (required)
--   i18n (required)
-- Found ICU: /usr/include (found version "72.1")
-- Found XercesC:
/scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so (found
suitable version "3.2.5", minimum required is "3.1")
-- Performing Test XALAN_HAVE_STD_THREAD
-- Performing Test XALAN_HAVE_STD_THREAD - Success
-- Looking for C++ include nl_types.h
-- Looking for C++ include nl_types.h - found
-- Looking for catopen
-- Looking for catopen - found
-- Looking for catclose
-- Looking for catclose - found
-- Looking for catgets
-- Looking for catgets - found
-- Performing Test CXX_matching-delete-operator
-- Performing Test CXX_matching-delete-operator - Success
-- Performing Test HAVE_PATH_MAX
-- Performing Test HAVE_PATH_MAX - Success
--
-- Xalan-C++ configuration summary
-- -------------------------------
--
--   Version:                     1.12.0
--   Library major version:       112
--   Library minor version:       0
--
--   Installation directory:      /scratch/amit/xerces_325_xalan_112_install
--   C compiler:                  /opt/sunstudio12.6/bin/cc
--   C++ compiler:                /opt/sunstudio12.6/bin/CC
--
--   Build shared libraries:      ON
--   Thread implementation:       standard
--   Transcoder:                  default
--   Message Loader:              inmemory
--   Message Loader Locale:       en_US
-- Configuring done
-- Generating done
-- Build files have been written to: /scratch/amit/xalan/xalan_c-1.12/build
-bash-5.2$


-bash-5.2$ make
Scanning dependencies of target MsgCreator
[  0%] Building CXX object
src/xalanc/Utils/MsgCreator/CMakeFiles/MsgCreator.dir/ICUResHandler.cpp.o
[  0%] Building CXX object
src/xalanc/Utils/MsgCreator/CMakeFiles/MsgCreator.dir/InMemHandler.cpp.o
[  0%] Building CXX object
src/xalanc/Utils/MsgCreator/CMakeFiles/MsgCreator.dir/MsgCreator.cpp.o
[  1%] Building CXX object
src/xalanc/Utils/MsgCreator/CMakeFiles/MsgCreator.dir/MsgFileOutputStream.cpp.o
[  1%] Building CXX object
src/xalanc/Utils/MsgCreator/CMakeFiles/MsgCreator.dir/NLSHandler.cpp.o
[  1%] Building CXX object
src/xalanc/Utils/MsgCreator/CMakeFiles/MsgCreator.dir/SAX2Handler.cpp.o
[  1%] Linking CXX executable MsgCreator
Undefined                       first referenced
 symbol                             in file
void __Crun::pure_error()
/scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
xercesc_3_2::XMLString::transcode(const unsigned short*,
xercesc_3_2::MemoryManager*) CMakeFiles/MsgCreator.dir/MsgCreator.cpp.o
xercesc_3_2::XMLString::transcode(const char*, xercesc_3_2::MemoryManager*)
CMakeFiles/MsgCreator.dir/MsgFileOutputStream.cpp.o
void*__Crun::ex_alloc(unsigned)
/scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
void __Crun::ex_throw(void*,const __Crun::static_type_info*,void(*)(void*))
/scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
void __Crun::ex_dealloc(void*)
/scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
xercesc_3_2::SAXParseException::getSystemId()const
CMakeFiles/MsgCreator.dir/SAX2Handler.cpp.o
xercesc_3_2::SAXParseException::getLineNumber()const
CMakeFiles/MsgCreator.dir/SAX2Handler.cpp.o
typeinfo for xercesc_3_2::SAXParseException
CMakeFiles/MsgCreator.dir/SAX2Handler.cpp.o
[Hint: static member typeinfo for xercesc_3_2::SAXParseException must be
defined in the program]

xercesc_3_2::SAXParseException::~SAXParseException()
CMakeFiles/MsgCreator.dir/SAX2Handler.cpp.o
void __Crun::ex_end_init()
 /scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
xercesc_3_2::XMLUni::fgXercesDynamic
CMakeFiles/MsgCreator.dir/MsgCreator.cpp.o
[Hint: static member xercesc_3_2::XMLUni::fgXercesDynamic must be defined
in the program]

void*__Crun::cross_cast(void*,const __Crun::static_type_info*,const
__Crun::static_type_info*)
/scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
typeinfo for xercesc_3_2::XMLException
CMakeFiles/MsgCreator.dir/MsgCreator.cpp.o
[Hint: static member typeinfo for xercesc_3_2::XMLException must be defined
in the program]

xercesc_3_2::SAXParseException::SAXParseException(const
xercesc_3_2::SAXParseException&) CMakeFiles/MsgCreator.dir/SAX2Handler.cpp.o
xercesc_3_2::XMLUni::fgSAX2CoreNameSpacePrefixes
CMakeFiles/MsgCreator.dir/MsgCreator.cpp.o
[Hint: static member xercesc_3_2::XMLUni::fgSAX2CoreNameSpacePrefixes must
be defined in the program]

xercesc_3_2::SAXParseException::getColumnNumber()const
CMakeFiles/MsgCreator.dir/SAX2Handler.cpp.o
xercesc_3_2::XMLUni::fgXercesSchemaFullChecking
CMakeFiles/MsgCreator.dir/MsgCreator.cpp.o
[Hint: static member xercesc_3_2::XMLUni::fgXercesSchemaFullChecking must
be defined in the program]

xercesc_3_2::XMLString::compareString(const unsigned short*, const unsigned
short*) CMakeFiles/MsgCreator.dir/ICUResHandler.cpp.o
xercesc_3_2::XMLPlatformUtils::Initialize(const char*, const char*,
xercesc_3_2::PanicHandler*, xercesc_3_2::MemoryManager*)
CMakeFiles/MsgCreator.dir/MsgCreator.cpp.o
xercesc_3_2::XMLString::release(char**, xercesc_3_2::MemoryManager*)
CMakeFiles/MsgCreator.dir/MsgCreator.cpp.o
xercesc_3_2::XMLString::release(unsigned short**,
xercesc_3_2::MemoryManager*)
CMakeFiles/MsgCreator.dir/MsgFileOutputStream.cpp.o
void*__Crun::ex_get()
 /scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
xercesc_3_2::XMLReaderFactory::createXMLReader(xercesc_3_2::MemoryManager*,
xercesc_3_2::XMLGrammarPool*) CMakeFiles/MsgCreator.dir/MsgCreator.cpp.o
void __Crun::ex_rethrow_q()
/scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
xercesc_3_2::XMLUni::fgXercescDefaultLocale
CMakeFiles/MsgCreator.dir/MsgCreator.cpp.o
[Hint: static member xercesc_3_2::XMLUni::fgXercescDefaultLocale must be
defined in the program]

xercesc_3_2::XMLUni::fgSAX2CoreValidation
CMakeFiles/MsgCreator.dir/MsgCreator.cpp.o
[Hint: static member xercesc_3_2::XMLUni::fgSAX2CoreValidation must be
defined in the program]

xercesc_3_2::XMLUni::fgSAX2CoreNameSpaces
CMakeFiles/MsgCreator.dir/MsgCreator.cpp.o
[Hint: static member xercesc_3_2::XMLUni::fgSAX2CoreNameSpaces must be
defined in the program]

unsigned std::numeric_limits<unsigned>::max()
/scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
void __Crun::register_exit_code(void(*)()extern"C")
/scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
bool __Crun::ex_skip()
 /scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
void std::terminate()
/scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
xercesc_3_2::XMLPlatformUtils::Terminate()
CMakeFiles/MsgCreator.dir/MsgCreator.cpp.o
xercesc_3_2::XMLUni::fgXercesSchema
CMakeFiles/MsgCreator.dir/MsgCreator.cpp.o
[Hint: static member xercesc_3_2::XMLUni::fgXercesSchema must be defined in
the program]

void __Crun::ex_clean()
/scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
xercesc_3_2::XMLString::stringLen(const char*)
CMakeFiles/MsgCreator.dir/ICUResHandler.cpp.o
void __Crun::ex_rethrow()
/scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
void __Crun::ex_start_init()
 /scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
xercesc_3_2::XMLPlatformUtils::fgMemoryManager
CMakeFiles/MsgCreator.dir/MsgCreator.cpp.o
[Hint: static member xercesc_3_2::XMLPlatformUtils::fgMemoryManager must be
defined in the program]

void*operator new[](unsigned)
/scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
void*operator new(unsigned)
/scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
void operator delete[](void*)
/scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
void operator delete(void*)
/scratch/amit/xerces_325_xalan_112_install/lib/libxerces-c.so
ld: fatal: symbol referencing errors
*** Error code 2
The following command caused the error:
cd /scratch/amit/xalan/xalan_c-1.12/build/src/xalanc/Utils/MsgCreator &&
/scratch/amit/cmake-install321/bin/cmake -E cmake_link_script
CMakeFiles/MsgCreator.dir/link.txt --verbose=
make: Fatal error: Command failed for target
`src/xalanc/Utils/MsgCreator/MsgCreator'
Current working directory /scratch/amit/xalan/xalan_c-1.12/build
*** Error code 1
The following command caused the error:
make -s -f src/xalanc/Utils/MsgCreator/CMakeFiles/MsgCreator.dir/build.make
src/xalanc/Utils/MsgCreator/CMakeFiles/MsgCreator.dir/build
make: Fatal error: Command failed for target
`src/xalanc/Utils/MsgCreator/CMakeFiles/MsgCreator.dir/all'
Current working directory /scratch/amit/xalan/xalan_c-1.12/build
*** Error code 1
The following command caused the error:
make -s -f CMakeFiles/Makefile2 all
make: Fatal error: Command failed for target `all'
-bash-5.2$

I tried building with and without these environment variables too but
getting the same error.

export XERCESCROOT=/scratch/amit/xerces_325_xalan_112_install
export XALANCROOT=/scratch/amit/xalan/xalan_c-1.12
export CFLAGS="-I/scratch/amit/xerces_325_xalan_112_install/include"
export CXXFLAGS="-I/scratch/amit/xerces_325_xalan_112_install/include"
export LD_LIBRARY_PATH=/scratch/amit/xerces_325_xalan_112_install/lib


-bash-5.2$ ls -ltr lib/
total 243093
-rwxr-xr-x   1 amit dev      54350148 Mar 19 12:28 libxerces-c-3.2.so
lrwxrwxrwx   1 amit dev           18 Mar 19 12:28 libxerces-c.so ->
libxerces-c-3.2.so
-rwxr-xr-x   1 amit dev          997 Mar 19 12:28 libxerces-c.la
-rw-r--r--   1 amit dev      69844312 Mar 19 12:28 libxerces-c.a
drwxr-xr-x   2 amit dev            3 Mar 19 12:28 pkgconfig
-bash-5.2$ pwd
/scratch/amit/xerces_325_xalan_112_install
-bash-5.2$ ls -ltr include/
total 33
drwxr-xr-x  11 amit dev           11 Mar 19 12:28 xercesc
-bash-5.2$ ls -ltr include/xercesc/
total 297
drwxr-xr-x   2 amit dev            5 Mar 19 12:28 xinclude
drwxr-xr-x   2 amit dev           13 Mar 19 12:28 sax
drwxr-xr-x   2 amit dev           10 Mar 19 12:28 sax2
drwxr-xr-x   2 amit dev            8 Mar 19 12:28 parsers
drwxr-xr-x   2 amit dev           28 Mar 19 12:28 internal
drwxr-xr-x   6 amit dev            6 Mar 19 12:28 validators
drwxr-xr-x   3 amit dev           57 Mar 19 12:28 dom
drwxr-xr-x   3 amit dev           39 Mar 19 12:28 framework
drwxr-xr-x   8 amit dev          126 Mar 19 12:28 util
-bash-5.2$

cmake version is 3.21



I will be highly grateful for providing input on why linker is not able to
find xerces libs.

Thanks
Amit

Reply via email to