I think that setting the path to the xerces root within the path variable is 
incorrect.  I built xalan 1.12 with a command like this.  Notice the –D options 
for setting the location of Xerces binaries and include directory.  It looks 
like your build is not finding xerces header files.  I ran this command from 
within the xalan root directory.

cmake -D CMAKE_INSTALL_PREFIX=xalan_c-1.12-install `
  -Dsystem-encoding=ascii `
  -Dtranscoder=default `
  -DXercesC_LIBRARY=C:\Development\ TP-Libs\xerces-c-3.2.4-install\Release\lib `
  -DXercesC_INCLUDE_DIR=C:\Development\ 
TP-Libs\xerces-c-3.2.4-install\Release\include `
  -S xalan_c-1.12 `
  -B xalan_c-1.12-build

Try something like that and let us know if that works.

Looks like that support for that version of visual studio is deprecated.  That 
old compiler doesn’t have any support for C++ 11 so I’d be surprised if 
building Xalan 1.12 actually works with that compiler.  I used VS2019 myself.  
Unfortunately the build instructions at Building Xalan-C++ | xalan-c 
(apache.github.io)<https://apache.github.io/xalan-c/build.html> are not very 
good.  I wasn’t able to learn how to build it using that website.  I had to 
fiddle with cmake settings on my own for quite a while before figuring it out. 
That website doesn’t even show a proper example of how to setup the location of 
the Xerces root.

Thanks,
Shawn Fox

From: Amit Singh <amit.singh...@gmail.com>
Sent: Monday, January 29, 2024 3:20 AM
To: c-users@xalan.apache.org
Subject: Unable to build Xalanc 1.12 with Xerces 3.2.5 on windows

External Email Alert

This email has been sent from an account outside of the BAE Systems network.
Please treat the email with caution, especially if you are requested to click 
on a link, decrypt/open an attachment, or enable macros.  For further 
information on how to spot phishing, access “Cybersecurity OneSpace Page” and 
report phishing by clicking the button “Report Phishing” on the Outlook toolbar.


Hi,
I am trying to build xalan-c 1.12 on windows 64 bit with xerces-c 3.2.5 but 
getting error while building inmemory-dependencies. Details are below:


C:\xercesUpgrade\xalan_c-1.12\build>cmake -G "Visual Studio 9 2008 Win64" 
-DCMAKE_INSTALL_PREFIX:PATH=C:\xercesUpgrade\xalan_112_install -Dtranscoder=icu 
C:\xercesUpgrade\xalan_c-1.12
CMake Deprecation Warning at CMakeLists.txt:22 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is MSVC 15.0.21022.8
-- The CXX compiler identification is MSVC 15.0.21022.8
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: c:/Program Files (x86)/Microsoft Visual Studio 
9.0/VC/bin/x86_amd64/cl.exe - 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: c:/Program Files (x86)/Microsoft Visual 
Studio 9.0/VC/bin/x86_amd64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring Apache Xalan-C++ version 1.12.0
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Performing Test CXX_FLAG_W3
-- Performing Test CXX_FLAG_W3 - Success
-- Looking for signal
-- Looking for signal - found
-- Looking for SetConsoleCtrlHandler
-- Looking for SetConsoleCtrlHandler - found
-- Looking for usleep
-- Looking for usleep - not found
-- Looking for Sleep
-- Looking for Sleep - found
-- Looking for gmtime_r
-- Looking for gmtime_r - not found
-- Looking for localtime_r
-- Looking for localtime_r - not found
-- Looking for _create_locale
-- Looking for _create_locale - not found
-- Looking for isnan
-- Looking for isnan - not found
-- Looking for _isnan
-- Looking for _isnan - not found
-- Performing Test XALAN_HAVE_STD_ISNAN
-- Performing Test XALAN_HAVE_STD_ISNAN - Failed
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Looking for direct.h
-- Looking for direct.h - found
CMake Warning (dev) at cmake/XalanICU.cmake:22 (find_package):
  Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
  Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  Environment variable ICU_ROOT is set to:

    C:\xercesUpgrade\icu-install

  For compatibility, CMake is ignoring the variable.
Call Stack (most recent call first):
  CMakeLists.txt:68 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found the following ICU libraries:
--   uc (required): C:/xercesUpgrade/icu-install/lib/icuuc.lib
--   data (required): C:/xercesUpgrade/icu-install/lib/icudt.lib
--   i18n (required): C:/xercesUpgrade/icu-install/lib/icuin.lib
-- Found ICU: C:/xercesUpgrade/icu-install/include (found version "57.2")
-- Found XercesC: C:/xercesUpgrade/xerces_325_install/lib/xerces-c_3.lib (found 
suitable version "3.2.5", minimum required is "3.1")
-- Performing Test XALAN_HAVE_STD_THREAD
-- Performing Test XALAN_HAVE_STD_THREAD - Failed
-- Looking for C++ include nl_types.h
-- Looking for C++ include nl_types.h - not found
-- Looking for catopen
-- Looking for catopen - not found
-- Looking for catclose
-- Looking for catclose - not found
-- Looking for catgets
-- Looking for catgets - not found
-- Performing Test CXX_matching-delete-operator
-- Performing Test CXX_matching-delete-operator - Success
-- Performing Test HAVE_PATH_MAX
-- Performing Test HAVE_PATH_MAX - Failed
--
-- Xalan-C++ configuration summary
-- -------------------------------
--
--   Version:                     1.12.0
--   Library major version:       1
--   Library minor version:       12
--
--   Installation directory:      C:/xercesUpgrade/xalan_112_install
--   C compiler:                  c:/Program Files (x86)/Microsoft Visual 
Studio 9.0/VC/bin/x86_amd64/cl.exe
--   C++ compiler:                c:/Program Files (x86)/Microsoft Visual 
Studio 9.0/VC/bin/x86_amd64/cl.exe
--
--   Build shared libraries:      ON
--   Thread implementation:       windows
--   Transcoder:                  icu
--   Message Loader:              inmemory
--   Message Loader Locale:       en_US
-- Configuring done (64.4s)
-- Generating done (1.0s)
CMake Warning:
  The "Visual Studio 9 2008" generator is deprecated and will be removed in a
  future version of CMake.

  Add CMAKE_WARN_VS9=OFF to the cache to disable this warning.


-- Build files have been written to: C:/xercesUpgrade/xalan_c-1.12/build

C:\xercesUpgrade\xalan_c-1.12\build>cmake --build .

Microsoft (R) Visual Studio Version 9.0.21022.8.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: MsgCreator, Configuration: Debug x64 ------
1>Compiling...
1>SAX2Handler.cpp
1>NLSHandler.cpp
1>MsgFileOutputStream.cpp
1>MsgCreator.cpp
1>InMemHandler.cpp
1>ICUResHandler.cpp
1>Generating Code...
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Linking...
1>Embedding manifest...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Build log was saved at 
"file://c:\xercesUpgrade\xalan_c-1.12\build\src\xalanc\Utils\MsgCreator\MsgCreator.dir\Debug\BuildLog.htm<file:///c:/xercesUpgrade/xalan_c-1.12/build/src/xalanc/Utils/MsgCreator/MsgCreator.dir/Debug/BuildLog.htm>"
1>MsgCreator - 0 error(s), 0 warning(s)
2>------ Build started: Project: inmemory-dependencies, Configuration: Debug 
x64 ------
2>Generating inmemory locale message data
2>Creating 
C:/xercesUpgrade/xalan_c-1.12/build/src/xalanc/PlatformSupport/LocalMsgIndex.hpp
2>Error copying file 
"C:/xercesUpgrade/xalan_c-1.12/build/src/xalanc/NLS/gen/LocalMsgIndex.hpp" to 
"C:/xercesUpgrade/xalan_c-1.12/build/src/xalanc/PlatformSupport/LocalMsgIndex.hpp".
2>Project : error PRJ0019: A tool returned an error code from "Creating 
C:/xercesUpgrade/xalan_c-1.12/build/src/xalanc/PlatformSupport/LocalMsgIndex.hpp"
2>Build log was saved at 
"file://c:\xercesUpgrade\xalan_c-1.12\build\src\xalanc\Utils\inmemory-dependencies.dir\Debug\BuildLog.htm<file:///c:/xercesUpgrade/xalan_c-1.12/build/src/xalanc/Utils/inmemory-dependencies.dir/Debug/BuildLog.htm>"
2>inmemory-dependencies - 1 error(s), 0 warning(s)
3>------ Build started: Project: xalanMsg, Configuration: Debug x64 ------
3>Compiling...
3>XalanMsgLib.cpp
3>..\..\..\..\..\src\xalanc\Utils\XalanMsgLib\XalanMsgLib.cpp(25) : fatal error 
C1083: Cannot open include file: 'LocalMsgData.hpp': No such file or directory
3>Build log was saved at 
"file://c:\xercesUpgrade\xalan_c-1.12\build\src\xalanc\Utils\XalanMsgLib\xalanMsg.dir\Debug\BuildLog.htm<file:///c:/xercesUpgrade/xalan_c-1.12/build/src/xalanc/Utils/XalanMsgLib/xalanMsg.dir/Debug/BuildLog.htm>"
3>xalanMsg - 1 error(s), 0 warning(s)
4>------ Build started: Project: xalan-c, Configuration: Debug x64 ------
4>Compiling...
4>XercesTreeWalker.cpp
4>XercesToXalanNodeMap.cpp
4>XercesTextBridge.cpp
4>XercesTextBridgeAllocator.cpp
4>XercesProcessingInstructionBridge.cpp
4>XercesNotationBridge.cpp
4>XercesNodeListBridge.cpp
4>XercesNamedNodeMapBridge.cpp
4>XercesEntityReferenceBridge.cpp
4>XercesEntityBridge.cpp
4>XercesElementBridge.cpp
4>XercesElementBridgeAllocator.cpp
4>XercesDOM_NodeHack.cpp
4>XercesDOMImplementationBridge.cpp
4>XercesDocumentTypeBridge.cpp
4>XercesDocumentFragmentBridge.cpp
4>XercesDocumentBridge.cpp
4>XercesCommentBridge.cpp
4>XercesCDATASectionBridge.cpp
4>XercesBridgeNavigator.cpp
4>Generating Code...
4>Compiling...
4>XercesBridgeHelper.cpp
4>XercesAttributeBridgeAllocator.cpp
4>XercesAttrBridge.cpp
4>FormatterToDeprecatedXercesDOM.cpp
4>XercesWrapperToXalanNodeMap.cpp
4>XercesWrapperNavigator.cpp
4>XercesWrapperNavigatorAllocator.cpp
4>XercesWrapperHelper.cpp
4>XercesTextWrapper.cpp
4>C:\xercesUpgrade\xalan_c-1.12\src\xalanc/PlatformSupport/ProblemListenerBase.hpp(28)
 : fatal error C1083: Cannot open include file: 'LocalMsgIndex.hpp': No such 
file or directory
4>XercesTextWrapperAllocator.cpp
4>XercesProcessingInstructionWrapper.cpp
4>C:\xercesUpgrade\xalan_c-1.12\src\xalanc/PlatformSupport/ProblemListenerBase.hpp(28)
 : fatal error C1083: Cannot open include file: 'LocalMsgIndex.hpp': No such 
file or directory
4>XercesParserLiaison.cpp
4>C:\xercesUpgrade\xalan_c-1.12\src\xalanc/PlatformSupport/ProblemListenerBase.hpp(28)
 : fatal error C1083: Cannot open include file: 'LocalMsgIndex.hpp': No such 
file or directory
4>XercesNotationWrapper.cpp

Note that I have included xerces binaries and libraries in PATH environment 
variable.

C:\xercesUpgrade\xalan_c-1.12\build>echo %PATH%
C:\xercesUpgrade\xerces_325_install\bin;C:\Program Files (x86)\Common 
Files\Oracle\Java\javapath;c:\Program Files (x86)\Microsoft Visual Studio 
9.0\VC\BIN\amd64;"c:\Windows\Microsoft.NET\Framework64\v3.5;c:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft
 .NET Framework 3.5 (Pre-Release 
Version)";"c:\Windows\Microsoft.NET\Framework64\v2.0.50727;c:\Program Files 
(x86)\Microsoft Visual Studio 9.0\VC\VCPackages;c:\Program Files 
(x86)\Microsoft Visual Studio 9.0\Common7\IDE;c:\Program Files (x86)\Microsoft 
Visual Studio 
9.0\Common7\Tools;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\opscode\chef\bin\;C:\tools\contrib\noarch\packages\ant\apache-ant-1.7.1\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;c:\Program
 Files (x86)\Microsoft SQL 
Server\90\Tools\binn\;C:\cmake-3.28.1-windows-x86_64\bin;C:\xercesUpgrade\icu-install\bin;C:\xercesUpgrade\xerces_325_install\lib;C:\xercesUpgrade\icu-install\lib;C:\xercesUpgrade\xerces_325_install\include;C:\xercesUpgrade\icu-install\lib;

I will highly appreciate any help to solve this issue. I am attaching the build 
log file too.

Thanks
Amit

Reply via email to