OpenMPDK / SMDK

SMDK, Scalable Memory Development Kit, is developed for Samsung CXL(Compute Express Link) Memory Expander to enable full-stack Software-Defined Memory system
271 stars 60 forks source link

Environment configuration issues #24

Closed SiDaiJie closed 1 year ago

SiDaiJie commented 1 year ago

Dear open-source contributor: I encountered some issues while setting up the SMDK environment on my server. My environment consists of an Intel Xeon 4th Gen Intel Scalable Processor CPU(Sapphire Rapids ), a PCIe 5.0 compatible server, and Ubuntu 23.04 server edition with M88MX5891 controller. During the process of selecting the SMDK kernel through Grub, I encountered several problems. I will describe some of the issues below:

1.What settings are required to enable the SRAT table?Are there any other preconditions needed? How to set them? 2.When running ./dep_pkg_install.sh under SMDK/script, I encountered the following errors indicating that some libraries have been deprecated. How can I resolve this? What impact will it have if these libraries are missing? I am using the Alibaba source for package installation.http://mirrors.aliyun .com/ubuntu/ **E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. E: Package 'python' has no installation candidate E: Package 'ctags' has no installation candidate E: Package 'python-dev' has no installation candidate error: externally-managed-environment

× This environment is externally managed ╰─> To install Python packages system-wide, try apt install     python3-xyz, where xyz is the package you are trying to     install.          If you wish to install a non-Debian-packaged Python package,     create a virtual environment using python3 -m venv path/to/venv.     Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make     sure you have python3-full installed.          If you wish to install a non-Debian packaged Python application,     it may be easiest to use pipx install xyz, which will manage a     virtual environment for you. Make sure you have pipx installed.          See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. E: Unable to locate package libjson-c3**

When I change back to the original official mirror source, I will give the following error: **E: Unable to correct problems, you have held broken packages. E: Unable to correct problems, you have held broken packages. error: externally-managed-environment

× This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.

If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.

If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.

See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. E: Unable to locate package libjson-c3**

3.After encountering the aforementioned issues, I still tried to proceed with the instructions provided at https://github.com/OpenMPDK/SMDK/wiki/3.-Installation.  Since it would be time-consuming to try on a physical host, I used Ubuntu 23.04 desktop in the virtual Box environment. I tried multiple versions of SMDK, and only version 1.2 allowed me to successfully select the 5.18.0-rc3-smdk kernel in Grub and boot into the Ubuntu system. However, there were other problems, such as the failure to build tools like py_smdk, bwd, cxl_cli, etc. Therefore, I would like to ask: Can the SMDK environment be tested in a virtual machine? It would be more convenient for me to test in a virtual machine instead of on the server host every time. I would appreciate a detailed build method and a comprehensive system environment (including software and hardware), which is not provided in detail at https://github.com/OpenMPDK/SMDK/wiki/3.-Installation.  Below is the log showing the failure to build cxl_cli. **[build cxl_cli]

The Meson build system Version: 1.0.1 Source dir: /home/hcm2304/Desktop/SMDK-smdk_v1.2.2/lib/cxl_cli Build dir: /home/hcm2304/Desktop/SMDK-smdk_v1.2.2/lib/cxl_cli/build Build type: native build Project name: ndctl Project version: 73 C compiler for the host machine: cc (gcc 12.2.0 "cc (Ubuntu 12.2.0-17ubuntu1) 12.2.0") C linker for the host machine: cc ld.bfd 2.40 Host machine cpu family: x86_64 Host machine cpu: x86_64 Compiler for C supports arguments -Wall: YES  Compiler for C supports arguments -Wchar-subscripts: YES  Compiler for C supports arguments -Wformat-security: YES  Compiler for C supports arguments -Wmissing-declarations: YES  Compiler for C supports arguments -Wmissing-prototypes: YES  Compiler for C supports arguments -Wnested-externs : NO  Compiler for C supports arguments -Wshadow: YES  Compiler for C supports arguments -Wsign-compare: YES  Compiler for C supports arguments -Wstrict-prototypes: YES  Compiler for C supports arguments -Wtype-limits: YES  Compiler for C supports arguments -Wmaybe-uninitialized: YES  Compiler for C supports arguments -Wdeclaration-after-statement: YES  Compiler for C supports arguments -Wunused-result: YES  Compiler for C supports arguments -D_FORTIFY_SOURCE=2: YES  Compiler for C supports arguments -O2: YES  meson.build:77: WARNING: Consider using the built-in warning_level option instead of using "-Wall". meson.build:77: WARNING: Consider using the built-in optimization level instead of using "-O2". Program git found: YES (/usr/bin/git) Program env found: YES (/usr/bin/env) WARNING: You should add the boolean check kwarg to the run_command call.          It currently defaults to false,          but it will default to true in future releases of meson.          See also: https://github.com/mesonbuild/meson/issues/9300 Found pkg-config: /usr/bin/pkg-config (1.8.1) Run-time dependency libkmod found: YES 30 Found CMake: /usr/bin/cmake (3.25.1) Run-time dependency libudev found: NO (tried pkgconfig and cmake)

meson.build:139:0: ERROR: Dependency "libudev" not found, tried pkgconfig and cmake

A full log can be found at /home/hcm2304/Desktop/SMDK-smdk_v1.2.2/lib/cxl_cli/build/meson-logs/meson-log.txt ./build_lib.sh: line 246: cd: cxl_cli/build: No such file or directory

[build cxl_cli]..error**