eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.55k stars 1.43k forks source link

When installing the sumo package, I use the cmake method, and there is a problem, and I don't know what to do #15327

Closed lnkird closed 2 months ago

lnkird commented 2 months ago

When installing the sumo package, I use the cmake method, and there is a problem, and I don't know what to do

Error:

In file included from /sumo/sumo-1.20.0/src/microsim/MSEdge.h:39:0, from /sumo/sumo-1.20.0/src/libsumo/Edge.cpp:23: /sumo/sumo-1.20.0/src/utils/router/ReversedEdge.h: In member function ‘const ConstEdgePairVector& ReversedEdge<E, V>::getViaSuccessors(SUMOVehicleClass, bool) const’: /sumo/sumo-1.20.0/src/utils/router/ReversedEdge.h:100:9: error: ‘FXMutexLock’ was not declared in this scope FXMutexLock lock(mySuccessorMutex); ^~~ In file included from /sumo/sumo-1.20.0/src/microsim/MSEdge.h:40:0, from /sumo/sumo-1.20.0/src/libsumo/Edge.cpp:23: /sumo/sumo-1.20.0/src/utils/router/RailEdge.h: In member function ‘const ConstEdgePairVector& RailEdge<E, V>::getViaSuccessors(SUMOVehicleClass, bool) const’: /sumo/sumo-1.20.0/src/utils/router/RailEdge.h:242:9: error: ‘FXMutexLock’ was not declared in this scope FXMutexLock lock(mySuccessorMutex); ^~~ In file included from /sumo/sumo-1.20.0/src/utils/router/IntermodalNetwork.h:36:0, from /sumo/sumo-1.20.0/src/utils/router/IntermodalRouter.h:35, from /sumo/sumo-1.20.0/src/utils/router/RouterProvider.h:24, from /sumo/sumo-1.20.0/src/microsim/MSRouterDefs.h:25, from /sumo/sumo-1.20.0/src/microsim/MSNet.h:45, from /sumo/sumo-1.20.0/src/microsim/MSEdge.h:43, from /sumo/sumo-1.20.0/src/libsumo/Edge.cpp:23: /sumo/sumo-1.20.0/src/utils/router/CarEdge.h: In member function ‘const std::vector<IntermodalEdge<E, L, N, V>>& CarEdge<E, L, N, V>::getSuccessors(SUMOVehicleClass) const’: /sumo/sumo-1.20.0/src/utils/router/CarEdge.h:52:9: error: ‘FXMutexLock’ was not declared in this scope FXMutexLock locker(myLock); ^~~ In file included from /sumo/sumo-1.20.0/src/utils/router/IntermodalNetwork.h:36:0, from /sumo/sumo-1.20.0/src/utils/router/IntermodalRouter.h:35, from /sumo/sumo-1.20.0/src/utils/router/RouterProvider.h:24, from /sumo/sumo-1.20.0/src/microsim/MSRouterDefs.h:25, from /sumo/sumo-1.20.0/src/microsim/MSNet.h:45, from /sumo/sumo-1.20.0/src/microsim/MSEdge.h:43, from /sumo/sumo-1.20.0/src/libsumo/Edge.cpp:23: /sumo/sumo-1.20.0/src/utils/router/CarEdge.h: In member function ‘virtual const std::vector<std::pair<const IntermodalEdge<E, L, N, V>, const IntermodalEdge<E, L, N, V>> >& CarEdge<E, L, N, V>::getViaSuccessors(SUMOVehicleClass, bool) const’: /sumo/sumo-1.20.0/src/utils/router/CarEdge.h:75:9: error: ‘FXMutexLock’ was not declared in this scope FXMutexLock locker(myLock); ^~~ In file included from /sumo/sumo-1.20.0/src/utils/router/RouterProvider.h:25:0, from /sumo/sumo-1.20.0/src/microsim/MSRouterDefs.h:25, from /sumo/sumo-1.20.0/src/microsim/MSNet.h:45, from /sumo/sumo-1.20.0/src/microsim/MSEdge.h:43, from /sumo/sumo-1.20.0/src/libsumo/Edge.cpp:23: /sumo/sumo-1.20.0/src/utils/router/RailwayRouter.h: In member function ‘const std::vector<RailEdge<E, V>>& RailwayRouter<E, V>::getRailEdges()’: /sumo/sumo-1.20.0/src/utils/router/RailwayRouter.h:260:9: error: ‘FXMutexLock’ was not declared in this scope FXMutexLock locker(myLock); ^~~ make[2]: [src/libsumo/CMakeFiles/libsumostatic.dir/build.make:76: src/libsumo/CMakeFiles/libsumostatic.dir/Edge.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:2637: src/libsumo/CMakeFiles/libsumostatic.dir/all] Error 2 make: *** [Makefile:146: all] Error 2

m-kro commented 2 months ago

Did you install the needed libraries, e.g. FOX Toolkit?

lnkird commented 2 months ago

YES,I haved install it,but still with the problem

cmake .. -- CMAKE_BINARY_DIR: /sumo/sumo-1.20.0/build -- CMAKE_SOURCE_DIR: /sumo/sumo-1.20.0 -- -- Platform: -- Host: Linux-4.19.90-25.14.v2101.ky10.x86_64 x86_64 -- Target: Linux-4.19.90-25.14.v2101.ky10.x86_64 x86_64 -- CMake: 3.20.2 -- CMake generator: Unix Makefiles -- CMake build tool: /usr/bin/gmake -- Compiler: GNU 7.3.0 -- -- Found Python: /usr/bin/python2.7 -- Found Proj: /usr/local/lib/libproj.so -- Found Fox: -I/usr/local/include/fox-1.7 -L/usr/local/lib -lFOX-1.7 -lX11 -lXext -lXft -lfontconfig -lfreetype -lXrender -lGL -ldl -lpthread -lrt -lpng -ltiff -lz -lbz2 -lGL -- Could NOT find osgGA (missing: OSGGA_LIBRARY OSGGA_INCLUDE_DIR) -- Could NOT find osgViewer (missing: OSGVIEWER_LIBRARY OSGVIEWER_INCLUDE_DIR) -- Could NOT find osgUtil (missing: OSGUTIL_LIBRARY OSGUTIL_INCLUDE_DIR) -- Could NOT find osgDB (missing: OSGDB_LIBRARY OSGDB_INCLUDE_DIR) -- Could NOT find osgText (missing: OSGTEXT_LIBRARY OSGTEXT_INCLUDE_DIR) -- Could NOT find osg (missing: OSG_LIBRARY OSG_INCLUDE_DIR) -- Could NOT find OpenThreads (missing: OPENTHREADS_LIBRARY OPENTHREADS_INCLUDE_DIR) -- Could NOT find OpenSceneGraph (missing: OPENSCENEGRAPH_LIBRARIES OPENSCENEGRAPH_INCLUDE_DIR) (Required is at least version "3.4.0") -- Could NOT find GL2PS (missing: GL2PS_LIBRARY GL2PS_INCLUDE_DIR) -- Could NOT find Eigen3 (missing: EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK) (Required is at least version "3.2") -- Could NOT find JuPedSim! Skipping JuPedSim integration. -- Could NOT find Java (missing: Java_JAVA_EXECUTABLE Java_JAVAC_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVADOC_EXECUTABLE Java_JAVAH_EXECUTABLE Development) -- Could NOT find Java (missing: Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE) -- Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) CMake Warning at src/libsumo/CMakeLists.txt:151 (message): ENABLE_JAVA_BINDINGS is set but Java or JNI was not found.

-- Could NOT find Java (missing: Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE) -- Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) CMake Warning at src/libtraci/CMakeLists.txt:110 (message): ENABLE_JAVA_BINDINGS is set but Java or JNI was not found.

-- Enabled features: Linux-4.19.90-25.14.v2101.ky10.x86_64 x86_64 GNU 7.3.0 Release FMI Proj GUI Intl SWIG GDAL FFmpeg -- Configuring done -- Generating done -- Build files have been written to: /sumo/sumo-1.20.0/build

lnkird commented 2 months ago

I re-downloaded a version that fixed the issue, thanks