Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Problems about installing SUMO on Linux from sources

Hi John, hi Michael,

on my linux (ubuntu 20.04) I could build the branch without problems.

I'm using the python3, which comes with ubuntu (/bin/python links to /bin/python3).

John is using the python from anaconda. I remember there was a problem with anaconda around Februar 2020.

John, can you (at least for the build process) remove ~/anaconda/bin from your PATH?

Here is my cmake output (first lines):

-- CMAKE_BINARY_DIR: /dosd/src/opensource/Sumo/sumo-git-co1/sumo/build/cmake-build
-- CMAKE_SOURCE_DIR: /dosd/src/opensource/Sumo/sumo-git-co1/sumo
-- 
-- Platform: 
--     Host: Linux-5.4.0-42-generic x86_64
--     Target: Linux-5.4.0-42-generic x86_64
--     CMake: 3.16.3
--     CMake generator: Unix Makefiles
--     CMake build tool: /bin/make
--     Compiler: GNU 9.3.0
-- 
-- Found Python: /bin/python
-- Found Proj: /usr/lib/x86_64-linux-gnu/libproj.so
-- Found Fox: -L/usr/lib/x86_64-linux-gnu -lFOX-1.6 -lX11 -lXext -lfreetype -lfontconfig -lXft -lXcursor -lfreetype -lfontconfig -lfreetype -lGL -lGLU -ldl -lpthread -lrt -ljpeg -lpng -ltiff -lz -lGLU -lGL
CMake Warning (dev) at /usr/share/cmake-3.16/Modules/UseSWIG.cmake:607 (message):
  Policy CMP0078 is not set: UseSWIG generates standard target names.  Run
  "cmake --help-policy CMP0078" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

And this is the point of defined proj.h

harald@nyc> find ../.. -type f -iname '*config*'|xargs grep -ni proj_api
../../build/cmake-build/src/config.h:45:/* set to proj.h, proj_api.h or empty depending on which proj is available */
../../build/cmake-build/src/config.h:46:#define PROJ_API_FILE "proj.h"

Greetings, Harald

Am 01.09.20 um 08:13 schrieb mrayur:
Hi behrisch,

I've found several old versions of libproj-dev, it seems they are strictly
corresponding to different Ubuntu distribution.
The version of libproj-dev is 6.3.1-1 on Ubuntu20.04,  4.9.3-2 on
Ubuntu18.04. Now I decide to install the branch version on Ubuntu18.04. On
Ubuntu 18.04, the error information is as below:




[ 75%] Building CXX object src/router/CMakeFiles/router.dir/RONet.cpp.o
In file included from
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx:5210:0:
/home/john/sumo/src/libsumo/Vehicle.h: At global scope:
/home/john/sumo/src/libsumo/Vehicle.h:158:69: error: ‘SUMOTime’ has not been
declared
     static void setLaneChangeDuration(const std::string& vehicleID,
SUMOTime laneChangeDuration);
                                                                    
^~~~~~~~
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx: In function ‘PyObject*
_wrap_vehicle_setLaneChangeDuration(PyObject*, PyObject*, PyObject*)’:
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx:49585:3: error:
‘SUMOTime’ was not declared in this scope
   SUMOTime arg2 ;
   ^~~~~~~~
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx:49585:3: note:
suggested alternative: ‘SUMOVehicle’
   SUMOTime arg2 ;
   ^~~~~~~~
   SUMOVehicle
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx:49615:18: error: ‘temp’
was not declared in this scope
       SUMOTime * temp = reinterpret_cast< SUMOTime * >(argp2);
                  ^~~~
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx:49615:18: note:
suggested alternative: ‘time’
       SUMOTime * temp = reinterpret_cast< SUMOTime * >(argp2);
                  ^~~~
                  time
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx:49615:43: error:
‘SUMOTime’ does not name a type; did you mean ‘SUMOVehicle’?
       SUMOTime * temp = reinterpret_cast< SUMOTime * >(argp2);
                                           ^~~~~~~~
                                           SUMOVehicle
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx:49615:52: error:
expected ‘>’ before ‘*’ token
       SUMOTime * temp = reinterpret_cast< SUMOTime * >(argp2);
                                                    ^
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx:49615:52: error:
expected ‘(’ before ‘*’ token
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx:49615:54: error:
expected primary-_expression_ before ‘>’ token
       SUMOTime * temp = reinterpret_cast< SUMOTime * >(argp2);
                                                      ^
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx:49615:62: error:
expected ‘)’ before ‘;’ token
       SUMOTime * temp = reinterpret_cast< SUMOTime * >(argp2);
                                                              ^
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx:49616:7: error: ‘arg2’
was not declared in this scope
       arg2 = *temp;
       ^~~~
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx:49616:7: note:
suggested alternative: ‘argp2’
       arg2 = *temp;
       ^~~~
       argp2
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx:49617:39: error: type
‘<type error>’ argument given to ‘delete’, expected pointer
       if (SWIG_IsNewObj(res2)) delete temp;
                                       ^~~~
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx:49622:74: error: ‘arg2’
was not declared in this scope
       libsumo::Vehicle::setLaneChangeDuration((std::string const
&)*arg1,arg2);
                                                                         
^~~~
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx:49622:74: note:
suggested alternative: ‘argp2’
       libsumo::Vehicle::setLaneChangeDuration((std::string const
&)*arg1,arg2);
                                                                         
^~~~
                                                                         
argp2
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx: In function
‘PyTypeObject* swig_varlink_type()’:
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx:58629:7: warning:
missing initializer for member ‘_typeobject::tp_vectorcall’
[-Wmissing-field-initializers]
       };
       ^
/home/john/sumo/tools/libsumo/libsumoPYTHON_wrap.cxx:58629:7: warning:
missing initializer for member ‘_typeobject::tp_print’
[-Wmissing-field-initializers]
Scanning dependencies of target netgenerate
[ 75%] Building CXX object
src/netgen/CMakeFiles/netgenerate.dir/netgen_main.cpp.o
[ 75%] Building CXX object
src/guisim/CMakeFiles/guisim.dir/GUIJunctionWrapper.cpp.o
src/libsumo/CMakeFiles/_libsumo.dir/build.make:88: recipe for target
'src/libsumo/CMakeFiles/_libsumo.dir/__/__/tools/libsumo/libsumoPYTHON_wrap.cxx.o'
failed
make[2]: ***
[src/libsumo/CMakeFiles/_libsumo.dir/__/__/tools/libsumo/libsumoPYTHON_wrap.cxx.o]
Error 1
CMakeFiles/Makefile2:1469: recipe for target
'src/libsumo/CMakeFiles/_libsumo.dir/all' failed
make[1]: *** [src/libsumo/CMakeFiles/_libsumo.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 75%] Building CXX object src/guisim/CMakeFiles/guisim.dir/GUILane.cpp.o
[ 76%] Building CXX object
src/netgen/CMakeFiles/netgenerate.dir/NGEdge.cpp.o
[ 76%] Building CXX object
src/router/CMakeFiles/router.dir/RONetHandler.cpp.o
[ 76%] Building CXX object
src/netgen/CMakeFiles/netgenerate.dir/NGFrame.cpp.o
[ 76%] Building CXX object
src/guisim/CMakeFiles/guisim.dir/GUILaneSpeedTrigger.cpp.o
[ 76%] Building CXX object src/netgen/CMakeFiles/netgenerate.dir/NGNet.cpp.o
[ 77%] Building CXX object src/guisim/CMakeFiles/guisim.dir/GUIPerson.cpp.o
[ 77%] Building CXX object src/router/CMakeFiles/router.dir/RONode.cpp.o
[ 78%] Building CXX object src/router/CMakeFiles/router.dir/ROPerson.cpp.o
[ 78%] Building CXX object
src/netgen/CMakeFiles/netgenerate.dir/NGNode.cpp.o
[ 78%] Building CXX object src/guisim/CMakeFiles/guisim.dir/GUINet.cpp.o
[ 78%] Building CXX object
src/netgen/CMakeFiles/netgenerate.dir/NGRandomNetBuilder.cpp.o
[ 78%] Building CXX object src/router/CMakeFiles/router.dir/RORoute.cpp.o
[ 78%] Linking CXX executable ../../../bin/netgenerate
[ 78%] Built target netgenerate
[ 78%] Building CXX object
src/guisim/CMakeFiles/guisim.dir/GUITrafficLightLogicWrapper.cpp.o
[ 78%] Building CXX object
src/guisim/CMakeFiles/guisim.dir/GUITriggeredRerouter.cpp.o
[ 78%] Building CXX object src/router/CMakeFiles/router.dir/RORouteDef.cpp.o
[ 78%] Building CXX object
src/router/CMakeFiles/router.dir/RORouteHandler.cpp.o
[ 78%] Building CXX object src/router/CMakeFiles/router.dir/ROVehicle.cpp.o
[ 78%] Building CXX object
src/guisim/CMakeFiles/guisim.dir/GUICalibrator.cpp.o
[ 78%] Building CXX object
src/guisim/CMakeFiles/guisim.dir/GUIChargingStation.cpp.o
[ 78%] Building CXX object
src/guisim/CMakeFiles/guisim.dir/GUIBaseVehicle.cpp.o
[ 78%] Linking CXX static library librouter.a
[ 78%] Built target router
[ 79%] Building CXX object src/guisim/CMakeFiles/guisim.dir/GUIVehicle.cpp.o
[ 79%] Building CXX object
src/guisim/CMakeFiles/guisim.dir/GUIVehicleControl.cpp.o
[ 79%] Building CXX object
src/guisim/CMakeFiles/guisim.dir/GUITransportableControl.cpp.o
[ 79%] Linking CXX static library libguisim.a
[ 79%] Built target guisim
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2




Instead of errors incurred by libproj-dev or any other packages, the
information is such as

error: ‘SUMOTime’ has not been declared,
error: ‘arg2’ was not declared in this scope,

Do you have any clue about this? Any kind of help would be appreciated!

Thanks and regards,
John



--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top