Hello Mirko,
Thanks.
I think it is failing because of this code in sumo\utils\common\StringUtils.h
#include <xercesc/util/XMLString.hpp> //
line 29
// line 143:
/**@brief converts a 0-terminated XMLCh* array (usually UTF-16, stemming from Xerces) into std::string in UTF-8
* @throw an EmptyData - exception if the given pointer is 0
*/
static inline std::string transcode(const XMLCh* const data) {
return transcode(data, (int)XERCES_CPP_NAMESPACE::XMLString::stringLen(data));
}
Our
code has
#include "microsim/MSVehicle.h"
-->
#include "MSGlobals.h"
-->
#include
<utils/common/SUMOTime.h>
-->
#include
"UtilExceptions.h"
-->
#include
"Translation.h"
-->
#include
"StringUtils.h"
So
a very complex path for xerces to leak into the TraCI API 🙂
---- THIS EMAIL HAS COME FROM AN EXTERNAL SOURCE ----
Hi Matthew,
currently we have
xerces-c-3.2.4 in our SUMO library repo at
https://github.com/DLR-TS/SUMOLibraries/tree/main/xerces-c-3.2.4 and use that for compiling the current SUMO version. In general, xerces is used in SUMO since very long ago, way before release 1.8.0. Not sure why this becomes a problem for you at this point
though...
Best regards
Mirko
-----Original-Nachricht-----
Betreff: [sumo-user] TraCI API xercesc dependency
Datum: 2024-01-04T16:01:17+0100
Von: "Matthew Jones via sumo-user" <sumo-user@xxxxxxxxxxx>
An: "sumo-user@xxxxxxxxxxx" <sumo-user@xxxxxxxxxxx>
Hello,
<ClCompile Include="sumo\foreign\tcpip\socket.cpp" />
<ClCompile Include="sumo\foreign\tcpip\storage.cpp" />
<ClCompile Include="sumo\utils\traci\TraCIAPI.cpp" />
I have just tried updating to 1.19.0 but this has brought in a dependency on xercesc.
Which specific version of xercesc should I be using with SUMO v1.19.0 ?
I have tried the latest but it doesn't compile straight away - it seems to need autoconf to run. I don't want to install xercesc - I am not going to be using it -
I just want the SUMO headers. Is there a simple way to make things work the same way v1.8.0 used to? This needs to build on Jenkins machines so we don't want to have to install dependencies by hand.
At what version did the xerces dependency get added? We might have to use the one before.
Thank you,
Matthew Jones
Senior Software Engineer
rFpro Limited
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system sender. This message
may contain confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system sender. This message may contain confidential
information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.