Only link libcocotb against libpython
libcocotb is the library that actually _embeds_ python, so therefore must be linked against it.
All the other modules are loaded within python or libcocotb, so do not need to link against this library.
@@ -212,7 +212,7 @@ def _get_common_lib_ext(include_dir, share_lib_dir):
libgpilog = Extension(
os.path.join("cocotb", "libs", "libgpilog"),
include_dirs=[include_dir],
- libraries=[_get_python_lib_link(), "cocotbutils"],
+ libraries=["cocotbutils"],
library_dirs=python_lib_dirs,
sources=[os.path.join(share_lib_dir, "gpi_log", "gpi_logging.cpp")],
extra_link_args=_extra_link_args("libgpilog"),
@@ -255,7 +255,7 @@ def _get_common_lib_ext(include_dir, share_lib_dir):
libsim = Extension(
os.path.join("cocotb", "simulator"),
include_dirs=[include_dir],
- libraries=[_get_python_lib_link(), "cocotbutils", "gpilog", "gpi"],
+ libraries=["cocotbutils", "gpilog", "gpi"],
library_dirs=python_lib_dirs,
sources=[os.path.join(share_lib_dir, "simulator", "simulatormodule.cpp")],
extra_compile_args=_extra_cxx_compile_args,
