carla-simulator / carla

Open-source simulator for autonomous driving research.
http://carla.org
MIT License
11.39k stars 3.7k forks source link

Xercesc error installation problem. #5632

Open saandasa opened 2 years ago

saandasa commented 2 years ago

I'm having problems with Xercesc installing incorrectly in version 0.9.13 on Win11.

`H:\carla\carla>make PythonAPI -[Setup]: [Batch params]: --boost-toolset msvc-14.2 --all -[Setup]: Asynchronous jobs: 16 -[Setup]: Boost toolset: msvc-14.2 -[Setup]: Install directory: "H:\carla\carla\Build\" -[Setup]: Installing zlib... -[install_zlib]: [Batch params]: --build-dir "H:\carla\carla\Build\" -[install_zlib]: A zlib installation already exists. -[install_zlib]: Delete "H:\carla\carla\Build\zlib-install\" if you want to force a rebuild. -[install_zlib]: Exiting... -[Setup]: Installing libpng... -[install_libpng]: [Batch params]: --build-dir "H:\carla\carla\Build\" --zlib-install-dir "H:\carla\carla\Build\zlib-install\" -[install_libpng]: A libpng installation already exists. -[install_libpng]: Delete "H:\carla\carla\Build\libpng-1.2.37-install\" if you want to force a rebuild. -[install_libpng]: Exiting... -[Setup]: Installing rpclib... -[install_rpclib]: [Batch params]: --build-dir "H:\carla\carla\Build\" -[install_rpclib]: A rpclib installation already exists. -[install_rpclib]: Delete "H:\carla\carla\Build\rpclib-install\" if you want to force a rebuild. -[install_rpclib]: Exiting... -[Setup]: Installing Google Test... -[install_gtest]: [Batch params]: --build-dir "H:\carla\carla\Build\" -[install_gtest]: A Google Test installation already exists. -[install_gtest]: Delete "H:\carla\carla\Build\gtest-install\" if you want to force a rebuild. -[install_gtest]: Exiting... -[Setup]: Installing "Recast & Detour"... -[install_recast]: [Batch params]: --build-dir "H:\carla\carla\Build\" -[install_recast]: A "Recast & Detour" installation already exists. -[install_recast]: Delete "H:\carla\carla\Build\recast-0b13b0-install\" if you want to force a rebuild. -[install_recast]: Exiting... -[Setup]: Installing Boost... -[install_boost]: [Batch params]: --build-dir "H:\carla\carla\Build\" --toolset msvc-14.2 --version 1.72.0 -j 16 -[install_boost]: A Boost installation already exists. -[install_boost]: Delete "H:\carla\carla\Build\boost-1.72.0-install\" if you want to force a rebuild. -[install_boost]: Exiting... 已复制 1 个文件。 已复制 1 个文件。 -[Setup]: Installing Xercesc... -[install_xercesc]: [Batch params]: --build-dir "H:\carla\carla\Build\" -[install_xercesc]: A xerces installation already exists. -[install_xercesc]: Delete "H:\carla\carla\Build\xerces-c-3.2.3-install\" if you want to force a rebuild. -[install_xercesc]: Exiting... 系统找不到指定的文件。 -[Setup]: Installing Sqlite3 -[install_sqlite3]: [Batch params]: --build-dir "H:\carla\carla\Build\" -[install_sqlite3]: A Sqlite3 installation already exists. -[install_sqlite3]: Delete "H:\carla\carla\Build\sqlite3-install" if you want to force a rebuild. -[install_sqlite3]: Exiting... 已复制 1 个文件。 -[Setup]: Installing PROJ -[install_proj]: [Batch params]: --build-dir "H:\carla\carla\Build\" -[install_proj]: A PROJ installation already exists. -[install_proj]: Delete "H:\carla\carla\Build\proj-install" if you want to force a rebuild. -[install_proj]: Exiting... 已复制 1 个文件。 -[Setup]: Creating "CMakeLists.txt.in"... -[Setup]: ###########

SUCCESS

###########

IMPORTANT!

All the CARLA library dependences should be installed now. (You can remove all "*-src" folders in H:\carla\carla\Build\ directory)

You only need the ASSET PACK with all the meshes and textures.

This script provides the assets for CARLA 0.9.13: You can download the assets from here:

   http://carla-assets.s3.amazonaws.com/20211112_d5cfa12.tar.gz

Unzip it in the "H:\carla\carla\Unreal\CarlaUE4\Content\Carla\" folder. If you want another version, search it in H:\carla\carla\Util\ContentVersions.txt.

-[BuildLibCarla]: [Batch params]: --server --client -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22000. -- Build debug: ON -- Build release: ON -- Build test: ON -- Configuring done -- Generating done -- Build files have been written to: H:/carla/carla/Build/libcarla-visualstudio 用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.11.2+f32259642 版权所有(C) Microsoft Corporation。保留所有权利。

carla_server.vcxproj -> H:\carla\carla\Build\libcarla-visualstudio\LibCarla\cmake\server\Release\carla_server.lib carla_server_debug.vcxproj -> H:\carla\carla\Build\libcarla-visualstudio\LibCarla\cmake\server\Release\carla_server_debug.lib -- Install configuration: "Release" -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22000. -- Build debug: ON -- Build release: ON -- Build test: ON -- Configuring done -- Generating done -- Build files have been written to: H:/carla/carla/Build/libcarla-visualstudio 用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.11.2+f32259642 版权所有(C) Microsoft Corporation。保留所有权利。

carla_client.vcxproj -> H:\carla\carla\Build\libcarla-visualstudio\LibCarla\cmake\client\Release\carla_client.lib carla_client_debug.vcxproj -> H:\carla\carla\Build\libcarla-visualstudio\LibCarla\cmake\client\Release\carla_client_debug.lib -- Install configuration: "Release" -[BuildLibCarla]: LibCarla server has been successfully installed in "H:\carla\carla\Unreal\CarlaUE4\Plugins\Carla\CarlaDependencies\"! -[BuildLibCarla]: LibCarla client has been successfully installed in "H:\carla\carla\PythonAPI\carla\dependencies\"! -[BuildOSM2ODR]: [Batch params]: --build --all HEAD is now at ee0c2b9241 Removed debug warnings -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22000. -- CMAKE_BINARY_DIR: H:/carla/carla/Build/osm2odr-visualstudio -- CMAKE_SOURCE_DIR: H:/carla/carla/Build/om2odr-source

-- Platform: -- Host: Windows-10.0.22000 AMD64 -- Target: Windows-10.0.22000 AMD64 -- CMake: 3.24.0-rc2 -- CMake generator: Visual Studio 16 2019 -- CMake build tool: D:/Program Files (x86)/Visual Studio/MSBuild/Current/Bin/MSBuild.exe -- Compiler: MSVC 19.29.30146.0

CMake Error at C:/Program Files/CMake/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Failed to find XercesC (missing: XercesC_VERSION) Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) C:/Program Files/CMake/share/cmake-3.24/Modules/FindXercesC.cmake:112 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:71 (find_package)

-- Configuring incomplete, errors occurred! See also "H:/carla/carla/Build/osm2odr-visualstudio/CMakeFiles/CMakeOutput.log". 用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.11.2+f32259642 版权所有(C) Microsoft Corporation。保留所有权利。

MSBUILD : error MSB1009: 项目文件不存在。 开关:install.vcxproj -[BuildOSM2ODR]: OSM2ODR has been successfully installed in "H:\carla\carla\PythonAPI\carla\dependencies\" -[BuildPythonAPI]: [Batch params]: --py3 Building Python API for Python 3. compiling:

-[BuildPythonAPI]: Carla lib for python has been successfully installed in "H:\carla\carla\PythonAPI\carla\dist"!`

GGILCARVALHO commented 2 years ago

I have the same error "CMake Error at C:/Program Files/CMake/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Failed to find XercesC (missing: XercesC_VERSION) Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) C:/Program Files/CMake/share/cmake-3.21/Modules/FindXercesC.cmake:110 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:71 (find_package)"

LinyeLi60 commented 2 years ago

Same error, it sames that https://github.com/carla-simulator/carla/pull/5850 change the xercesc from 3.2.3 to 3.2.4

GGILCARVALHO commented 2 years ago

This error happens with both 3.2.3 and 3.2.4 versions of Xerces-C

GustavoSilvera commented 2 years ago

This error happens because your Windows machine is having trouble linking the correct unicode (unicode/uset.h) methods used in RangeToken and ICUTransService. However, you don't actually need to use them!

If you instead disable the XERCES_USE_TRANSCODER_ICU macro and enable the XERCES_USE_TRANSCODER_WINDOWS macro (by flipping the default values in cmake/XercesTranscoderSelection.cmake) then we avoid this error altogether.

shekharsuman3 commented 1 year ago

Platform: -- Host: Windows-10.0.19042 AMD64 -- Target: Windows-10.0.19042 AMD64 -- CMake: 3.21.3 -- CMake generator: Visual Studio 16 2019 -- CMake build tool: D:/programs/Microsoft visual studio/visual studio/MSBuild/Current/Bin/MSBuild.exe -- Compiler: MSVC 19.29.30146.0

-- Found Proj: D:/carla/Build/proj-install/lib/proj.lib -- Found ZLIB: D:/carla/PythonAPI/carla/dependencies/lib/zlib.lib (found version "1.2.13") -- Enabled features: Windows-10.0.19042 AMD64 MSVC 19.29.30146.0 Release Proj -- Configuring done -- Generating done -- Build files have been written to: D:/carla/Build/osm2odr-visualstudio Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

osm2odr.vcxproj -> D:\carla\Build\osm2odr-visualstudio\src\Release\osm2odr.lib -- Install configuration: "Release" -[BuildOSM2ODR]: OSM2ODR has been successfully installed in "D:\carla\PythonAPI\carla\dependencies\" -[BuildPythonAPI]: [Batch params]: --py3 Building Python API for Python 3. compiling:

-[BuildPythonAPI]: Carla lib for python has been successfully installed in "D:\carla\PythonAPI\carla\dist"!

LucasFKobernic commented 1 year ago

Hi @saandasa did u solve the probelm?

ViperaA60 commented 1 year ago

So the changes I need to make is:

set(XERCES_USE_TRANSCODER_ICU 0) TO set(XERCES_USE_TRANSCODER_ICU 1) set(XERCES_USE_TRANSCODER_ICU 1) under if statement TO set(XERCES_USE_TRANSCODER_ICU 0) under if statement set(XERCES_USE_TRANSCODER_WINDOWS 0) TO set(XERCES_USE_TRANSCODER_WINDOWS 1) set(XERCES_USE_TRANSCODER_WINDOWS 1) under if statement TO set(XERCES_USE_TRANSCODER_WINDOWS 0)

Right?

Babybanana1 commented 1 year ago

The issue could be solved by below settings in install_xercesc.bat

cmake .. -G "Visual Studio 16 2019" -A x64^ -DCMAKE_INSTALL_PREFIX="%XERCESC_INSTALL_DIR:\=/%"^ -DBUILD_SHARED_LIBS=OFF^ -Dtranscoder=windows^ -Dxmlch-type=uint16_t^ "%BUILD_DIR%%XERCESC_BASENAME%-%XERCESC_VERSION%-source" if %errorlevel% neq 0 goto error_cmake

yu-ju-chiu commented 1 year ago

If install fails due to XCERES, change line 54 in "..\carla\Util\InstallersWin\install_xercesc.bat" change https://downloads.apache.org/xerces/c/3/sources/xerces-c-%XERCESC_VERSION%.zip to  https://archive.apache.org/dist/xerces/c/3/sources/xerces-c-%XERCESC_VERSION%.zip

molua commented 1 year ago

If install fails due to XCERES, change line 54 in "..\carla\Util\InstallersWin\install_xercesc.bat" change https://downloads.apache.org/xerces/c/3/sources/xerces-c-%XERCESC_VERSION%.zip to  https://archive.apache.org/dist/xerces/c/3/sources/xerces-c-%XERCESC_VERSION%.zip

that works for me! thanks

VidaAPI commented 1 year ago

If install fails due to XCERES, change line 54 in "..\carla\Util\InstallersWin\install_xercesc.bat" change https://downloads.apache.org/xerces/c/3/sources/xerces-c-%XERCESC_VERSION%.zip to  https://archive.apache.org/dist/xerces/c/3/sources/xerces-c-%XERCESC_VERSION%.zip

Hi, these links are showing: '404 Not Found' , How can i proceed?

Nitro60zeus commented 1 year ago

Change the%XERCESC_VERSION% to 3.2.4 in the install_xercesc.bat file.

U will find the file here: carla\Util\InstallersWin\install_xercesc.bat

Else u can download it manually from here: https://archive.apache.org/dist/xerces/c/3/sources/

VidaAPI commented 1 year ago

N% to 3.2.4 in the @Nitro60zeus Thank you. I appreciate your answer for this too: I wanna delete the build version that I have (Proceeded till before make Python API). And just quick install 9.13 version. Is deleting the files sufficient enough? Or should I do something else too?

Nitro60zeus commented 1 year ago

No problem!

What do you mean by quick install? Will you be using a pre-built package? If so, then u can run make clean and then delete the build folder.

VidaAPI commented 1 year ago

This was helpful, thanks.