-
Notifications
You must be signed in to change notification settings - Fork 198
Description
Build From Source error but when i bulid it in onther env in worked
(tensorflow) hp2@hp2-HP-Z8-G5-Workstation-Desktop-PC:~/CityFlow$ pip install .
Processing /home/hp2/CityFlow
Preparing metadata (setup.py) ... done
Building wheels for collected packages: CityFlow
Building wheel for CityFlow (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [239 lines of output]
running bdist_wheel
running build
running build_ext
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.10 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 GNU 12.3.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - 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: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Submodule: extern/pybind11/CMakeLists.txt
-- Found Submodule: extern/rapidjson/include
CMake Deprecation Warning at extern/pybind11/CMakeLists.txt:8 (cmake_minimum_required):
Compatibility with CMake < 3.10 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.
CMake Deprecation Warning at extern/pybind11/tools/pybind11Tools.cmake:8 (cmake_minimum_required):
Compatibility with CMake < 3.10 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.
Call Stack (most recent call first):
extern/pybind11/CMakeLists.txt:33 (include)
CMake Warning (dev) at extern/pybind11/tools/FindPythonLibsNew.cmake:60 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
extern/pybind11/tools/pybind11Tools.cmake:16 (find_package)
extern/pybind11/CMakeLists.txt:33 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PythonInterp: /home/hp2/anaconda3/envs/tensorflow/bin/python3 (found version "3.12.7")
-- Found PythonLibs: /home/hp2/anaconda3/envs/tensorflow/lib/libpython3.12.so
-- pybind11 v2.3.0
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done (1.1s)
-- Generating done (0.0s)
-- Build files have been written to: /home/hp2/CityFlow/build/temp.linux-x86_64-cpython-312
[ 7%] Building CXX object src/CMakeFiles/cityflow_lib.dir/utility/utility.cpp.o
[ 15%] Building CXX object src/CMakeFiles/cityflow_lib.dir/utility/barrier.cpp.o
[ 23%] Building CXX object src/CMakeFiles/cityflow_lib.dir/engine/archive.cpp.o
[ 30%] Building CXX object src/CMakeFiles/cityflow_lib.dir/engine/engine.cpp.o
[ 38%] Building CXX object src/CMakeFiles/cityflow_lib.dir/flow/flow.cpp.o
[ 46%] Building CXX object src/CMakeFiles/cityflow_lib.dir/roadnet/roadnet.cpp.o
[ 53%] Building CXX object src/CMakeFiles/cityflow_lib.dir/roadnet/trafficlight.cpp.o
[ 61%] Building CXX object src/CMakeFiles/cityflow_lib.dir/vehicle/router.cpp.o
[ 69%] Building CXX object src/CMakeFiles/cityflow_lib.dir/vehicle/vehicle.cpp.o
[ 76%] Building CXX object src/CMakeFiles/cityflow_lib.dir/vehicle/lanechange.cpp.o
[ 84%] Linking CXX static library libcityflow_lib.a
[ 84%] Built target cityflow_lib
[ 92%] Building CXX object CMakeFiles/cityflow.dir/src/cityflow.cpp.o
In file included from /home/hp2/CityFlow/extern/pybind11/include/pybind11/cast.h:16,
from /home/hp2/CityFlow/extern/pybind11/include/pybind11/attr.h:13,
from /home/hp2/CityFlow/extern/pybind11/include/pybind11/pybind11.h:49,
from /home/hp2/CityFlow/src/cityflow.cpp:4:
/home/hp2/CityFlow/extern/pybind11/include/pybind11/detail/internals.h: In function ‘pybind11::detail::internals& pybind11::detail::get_internals()’:
/home/hp2/CityFlow/extern/pybind11/include/pybind11/detail/internals.h:200:27: warning: ‘void PyEval_InitThreads()’ is deprecated [-Wdeprecated-declarations]
200 | PyEval_InitThreads();
| ~~~~~~~~~~~~~~~~~~^~
In file included from /home/hp2/anaconda3/envs/tensorflow/include/python3.12/Python.h:95,
from /home/hp2/CityFlow/extern/pybind11/include/pybind11/detail/common.h:112,
from /home/hp2/CityFlow/extern/pybind11/include/pybind11/pytypes.h:12,
from /home/hp2/CityFlow/extern/pybind11/include/pybind11/cast.h:13:
/home/hp2/anaconda3/envs/tensorflow/include/python3.12/ceval.h:132:37: note: declared here
132 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
| ^~~~~~~~~~~~~~~~~~
/home/hp2/CityFlow/extern/pybind11/include/pybind11/cast.h: In function ‘std::string pybind11::detail::error_string()’:
/home/hp2/CityFlow/extern/pybind11/include/pybind11/cast.h:442:36: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
442 | " " + handle(frame->f_code->co_filename).cast<std::string>() +
| ^~
In file included from /home/hp2/anaconda3/envs/tensorflow/include/python3.12/Python.h:42:
/home/hp2/anaconda3/envs/tensorflow/include/python3.12/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
22 | typedef struct _frame PyFrameObject;
| ^~~~~~
/home/hp2/CityFlow/extern/pybind11/include/pybind11/cast.h:442:75: error: expected primary-expression before ‘>’ token
442 | " " + handle(frame->f_code->co_filename).cast<std::string>() +
| ^
/home/hp2/CityFlow/extern/pybind11/include/pybind11/cast.h:442:77: error: expected primary-expression before ‘)’ token
442 | " " + handle(frame->f_code->co_filename).cast<std::string>() +
| ^
/home/hp2/CityFlow/extern/pybind11/include/pybind11/cast.h:444:29: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
444 | handle(frame->f_code->co_name).cast<std::string>() + "\n";
| ^~
/home/hp2/anaconda3/envs/tensorflow/include/python3.12/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
22 | typedef struct _frame PyFrameObject;
| ^~~~~~
/home/hp2/CityFlow/extern/pybind11/include/pybind11/cast.h:444:64: error: expected primary-expression before ‘>’ token
444 | handle(frame->f_code->co_name).cast<std::string>() + "\n";
| ^
/home/hp2/CityFlow/extern/pybind11/include/pybind11/cast.h:444:66: error: expected primary-expression before ‘)’ token
444 | handle(frame->f_code->co_name).cast<std::string>() + "\n";
| ^
/home/hp2/CityFlow/extern/pybind11/include/pybind11/cast.h:445:26: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
445 | frame = frame->f_back;
| ^~
/home/hp2/anaconda3/envs/tensorflow/include/python3.12/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
22 | typedef struct _frame PyFrameObject;
| ^~~~~~
/home/hp2/CityFlow/extern/pybind11/include/pybind11/pybind11.h: In function ‘pybind11::function pybind11::get_type_overload(const void*, const detail::type_info*, const char*)’:
/home/hp2/CityFlow/extern/pybind11/include/pybind11/pybind11.h:2032:49: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
2032 | PyFrameObject *frame = PyThreadState_Get()->frame;
| ^~~~~
| cframe
/home/hp2/CityFlow/extern/pybind11/include/pybind11/pybind11.h:2033:41: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
2033 | if (frame && (std::string) str(frame->f_code->co_name) == name &&
| ^~
/home/hp2/anaconda3/envs/tensorflow/include/python3.12/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
22 | typedef struct _frame PyFrameObject;
| ^~~~~~
/home/hp2/CityFlow/extern/pybind11/include/pybind11/pybind11.h:2034:14: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
2034 | frame->f_code->co_argcount > 0) {
| ^~
/home/hp2/anaconda3/envs/tensorflow/include/python3.12/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
22 | typedef struct _frame PyFrameObject;
| ^~~~~~
/home/hp2/CityFlow/extern/pybind11/include/pybind11/pybind11.h:2037:18: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
2037 | frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0));
| ^~
/home/hp2/anaconda3/envs/tensorflow/include/python3.12/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
22 | typedef struct _frame PyFrameObject;
| ^~~~~~
In file included from /home/hp2/anaconda3/envs/tensorflow/include/python3.12/Python.h:35:
/home/hp2/CityFlow/extern/pybind11/include/pybind11/pybind11.h:2037:52: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
2037 | frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0));
| ^~
/home/hp2/anaconda3/envs/tensorflow/include/python3.12/tupleobject.h:27:18: note: in expansion of macro ‘PyType_FastSubclass’
27 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_TUPLE_SUBCLASS)
| ^~~~~~~~~~~~~~~~~~~
/home/hp2/anaconda3/envs/tensorflow/include/python3.12/object.h:194:28: note: in expansion of macro ‘_Py_CAST’
194 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op))
| ^~~~~~~~
/home/hp2/anaconda3/envs/tensorflow/include/python3.12/object.h:223:31: note: in expansion of macro ‘_PyObject_CAST’
223 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob))
| ^~~~~~~~~~~~~~
/home/hp2/anaconda3/envs/tensorflow/include/python3.12/tupleobject.h:27:38: note: in expansion of macro ‘Py_TYPE’
27 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_TUPLE_SUBCLASS)
| ^~~~~~~
/home/hp2/anaconda3/envs/tensorflow/include/python3.12/cpython/tupleobject.h:18:13: note: in expansion of macro ‘PyTuple_Check’
18 | (assert(PyTuple_Check(op)), _Py_CAST(PyTupleObject*, (op)))
| ^~~~~~~~~~~~~
/home/hp2/anaconda3/envs/tensorflow/include/python3.12/cpython/tupleobject.h:28:38: note: in expansion of macro ‘_PyTuple_CAST’
28 | #define PyTuple_GET_ITEM(op, index) (_PyTuple_CAST(op)->ob_item[(index)])
| ^~~~~~~~~~~~~
/home/hp2/CityFlow/extern/pybind11/include/pybind11/pybind11.h:2037:30: note: in expansion of macro ‘PyTuple_GET_ITEM’
2037 | frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0));
| ^~~~~~~~~~~~~~~~
/home/hp2/anaconda3/envs/tensorflow/include/python3.12/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
22 | typedef struct _frame PyFrameObject;
| ^~~~~~
In file included from /home/hp2/anaconda3/envs/tensorflow/include/python3.12/Python.h:38:
/home/hp2/CityFlow/extern/pybind11/include/pybind11/pybind11.h:2037:52: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
2037 | frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0));
| ^~
/home/hp2/anaconda3/envs/tensorflow/include/python3.12/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
24 | #define _Py_CAST(type, expr) ((type)(expr))
| ^~~~
/home/hp2/anaconda3/envs/tensorflow/include/python3.12/cpython/tupleobject.h:28:38: note: in expansion of macro ‘_PyTuple_CAST’
28 | #define PyTuple_GET_ITEM(op, index) (_PyTuple_CAST(op)->ob_item[(index)])
| ^~~~~~~~~~~~~
/home/hp2/CityFlow/extern/pybind11/include/pybind11/pybind11.h:2037:30: note: in expansion of macro ‘PyTuple_GET_ITEM’
2037 | frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0));
| ^~~~~~~~~~~~~~~~
/home/hp2/anaconda3/envs/tensorflow/include/python3.12/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
22 | typedef struct _frame PyFrameObject;
| ^~~~~~
gmake[3]: *** [CMakeFiles/cityflow.dir/build.make:79:CMakeFiles/cityflow.dir/src/cityflow.cpp.o] 错误 1
gmake[2]: *** [CMakeFiles/Makefile2:132:CMakeFiles/cityflow.dir/all] 错误 2
gmake[1]: *** [CMakeFiles/Makefile2:139:CMakeFiles/cityflow.dir/rule] 错误 2
gmake: *** [Makefile:124:cityflow] 错误 2
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/home/hp2/CityFlow/setup.py", line 60, in <module>
setup(
File "/home/hp2/anaconda3/envs/tensorflow/lib/python3.12/site-packages/setuptools/__init__.py", line 108, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hp2/anaconda3/envs/tensorflow/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "/home/hp2/anaconda3/envs/tensorflow/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/home/hp2/anaconda3/envs/tensorflow/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/home/hp2/anaconda3/envs/tensorflow/lib/python3.12/site-packages/setuptools/dist.py", line 1213, in run_command
super().run_command(command)
File "/home/hp2/anaconda3/envs/tensorflow/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/hp2/anaconda3/envs/tensorflow/lib/python3.12/site-packages/wheel/_bdist_wheel.py", line 387, in run
self.run_command("build")
File "/home/hp2/anaconda3/envs/tensorflow/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/hp2/anaconda3/envs/tensorflow/lib/python3.12/site-packages/setuptools/dist.py", line 1213, in run_command
super().run_command(command)
File "/home/hp2/anaconda3/envs/tensorflow/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/hp2/anaconda3/envs/tensorflow/lib/python3.12/site-packages/setuptools/_distutils/command/build.py", line 132, in run
self.run_command(cmd_name)
File "/home/hp2/anaconda3/envs/tensorflow/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/hp2/anaconda3/envs/tensorflow/lib/python3.12/site-packages/setuptools/dist.py", line 1213, in run_command
super().run_command(command)
File "/home/hp2/anaconda3/envs/tensorflow/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/hp2/CityFlow/setup.py", line 32, in run
self.build_extension(ext)
File "/home/hp2/CityFlow/setup.py", line 57, in build_extension
subprocess.check_call(['cmake', '--build', '.', '--target', 'cityflow'] + build_args, cwd=self.build_temp)
File "/home/hp2/anaconda3/envs/tensorflow/lib/python3.12/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'cityflow', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for CityFlow
Running setup.py clean for CityFlow
Failed to build CityFlow
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (CityFlow)