Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Compile system Error: fatal error: bpf/bpf.h: No such file or directory #18

Open
shou123 opened this issue Oct 23, 2024 · 0 comments

Comments

@shou123
Copy link

shou123 commented Oct 23, 2024

I create a conda environement, but the conda cannot install by conda-forge. So I install the bpf library from system side.

My bpf/bpf.h located at:
/usr/include/bpf/bpf.h

when I run cmake .

There is no any error.

When I do make, There is error as:

(cxlsim) [hous562@junction01 CXLMemSim]$ make
[  3%] Building CXX object CMakeFiles/CXLMemSim.dir/src/cxlcontroller.cpp.o
In file included from /people/hous562/project/CXLMemSim/include/incore.h:7,
                 from /people/hous562/project/CXLMemSim/include/helper.h:8,
                 from /people/hous562/project/CXLMemSim/include/cxlendpoint.h:8,
                 from /people/hous562/project/CXLMemSim/include/cxlcontroller.h:9,
                 from /people/hous562/project/CXLMemSim/src/cxlcontroller.cpp:5:
/people/hous562/project/CXLMemSim/include/perf.h:8:10: fatal error: bpf/bpf.h: No such file or directory
    8 | #include <bpf/bpf.h>

I changed the cmakelist.txt as:

cmake_minimum_required(VERSION 3.11.0)
project(CXLMemSim VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 20)

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
    add_compile_options (-fdiagnostics-color=always)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    add_compile_options (-fcolor-diagnostics)
endif ()

list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})

find_package(cxxopts REQUIRED)
find_package(fmt REQUIRED)
file(GLOB_RECURSE SOURCE_FILES src/*.cpp)

# Include directories for BPF and fmt
include_directories(/usr/include/bpf)

execute_process(COMMAND uname -r OUTPUT_VARIABLE arch OUTPUT_STRIP_TRAILING_WHITESPACE)
set(CMAKE_CXX_FLAGS "-Wall -fPIC -pthread -ldl -lrt -mavx512f -mpreferred-stack-boundary=4 -g -O0")

add_executable(CXLMemSim ${SOURCE_FILES} src/main.cc)

target_include_directories(CXLMemSim PRIVATE 
    include 
    /usr/include
    ${cxxopts_INCLUDE_DIR} 
    ${fmt_INCLUDE_DIR}
)

include_directories(CXLMemSim include ${cxxopts_INCLUDE_DIR} ${fmt_INCLUDE_DIR})
target_link_libraries(CXLMemSim fmt::fmt cxxopts::cxxopts)

add_library(CXLMemSimHook SHARED src/module.cc)

target_include_directories(CXLMemSimHook PRIVATE 
    include 
    /usr/include
)

add_executable(CXLMemSimSock ${SOURCE_FILES} src/sock.cc)

target_include_directories(CXLMemSimSock PRIVATE 
    include 
    /usr/include
    ${cxxopts_INCLUDE_DIR} 
    ${fmt_INCLUDE_DIR}
)

target_link_libraries(CXLMemSimSock fmt::fmt cxxopts::cxxopts)

The error is same.

I fix above issue using:

export CPATH=/usr/include:/usr/include:$CPATH
export CPATH=/people/hous562/miniforge3/include:$CPATH

But there is a following problem as

(cxlsim) [hous562@junction01 CXLMemSim]$ make
-- The C compiler identification is GNU 14.1.0
-- The CXX compiler identification is GNU 14.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /people/hous562/miniforge3/envs/cxlsim/bin/x86_64-conda-linux-gnu-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: /people/hous562/miniforge3/envs/cxlsim/bin/x86_64-conda-linux-gnu-c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (1.1s)
-- Generating done (0.2s)
-- Build files have been written to: /people/hous562/project/CXLMemSim
[  3%] Building CXX object CMakeFiles/CXLMemSim.dir/src/cxlcontroller.cpp.o
In file included from /qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/math.h:46,
                 from /qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cmath:47,
                 from /people/hous562/miniforge3/include/fmt/format.h:36,
                 from /people/hous562/miniforge3/include/fmt/color.h:11,
                 from /people/hous562/project/CXLMemSim/include/logging.h:11,
                 from /people/hous562/project/CXLMemSim/include/helper.h:9,
                 from /people/hous562/project/CXLMemSim/include/cxlendpoint.h:8,
                 from /people/hous562/project/CXLMemSim/include/cxlcontroller.h:9,
                 from /people/hous562/project/CXLMemSim/src/cxlcontroller.cpp:5:
/usr/include/bits/mathdef.h:19:3: error: #error "Never use <bits/mathdef.h> directly; include <complex.h> instead"
   19 | # error "Never use <bits/mathdef.h> directly; include <complex.h> instead"
      |   ^~~~~
In file included from /qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:79,
                 from /qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/ext/string_conversions.h:43,
                 from /qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/bits/basic_string.h:4154,
                 from /qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/string:54,
                 from /people/hous562/project/CXLMemSim/include/cxlcounter.h:10,
                 from /people/hous562/project/CXLMemSim/include/cxlcontroller.h:8:
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:95:1: error: '__BEGIN_NAMESPACE_STD' does not name a type; did you mean 'FMT_BEGIN_NAMESPACE'?
   95 | __BEGIN_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~~~
      | FMT_BEGIN_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:101:5: error: 'div_t' does not name a type
  101 |   } div_t;
      |     ^~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:112:1: error: '__END_NAMESPACE_STD' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  112 | __END_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:121:5: error: 'lldiv_t' does not name a type; did you mean 'ldiv_t'?
  121 |   } lldiv_t;
      |     ^~~~~~~
      |     ldiv_t
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:123:1: error: '__END_NAMESPACE_C99' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  123 | __END_NAMESPACE_C99
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:142:1: error: '__BEGIN_NAMESPACE_STD' does not name a type; did you mean 'FMT_BEGIN_NAMESPACE'?
  142 | __BEGIN_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~~~
      | FMT_BEGIN_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:152:1: error: '__END_NAMESPACE_STD' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  152 | __END_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:159:1: error: '__END_NAMESPACE_C99' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  159 | __END_NAMESPACE_C99
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:167:1: error: '__END_NAMESPACE_STD' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  167 | __END_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:178:1: error: '__END_NAMESPACE_C99' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  178 | __END_NAMESPACE_C99
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:190:1: error: '__END_NAMESPACE_STD' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  190 | __END_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:217:1: error: '__END_NAMESPACE_C99' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  217 | __END_NAMESPACE_C99
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
In file included from /qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:235:
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/xlocale.h:39:14: error: expected constructor, destructor, or type conversion before ';' token
   39 | } *__locale_t;
      |              ^
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:372:1: error: '__BEGIN_NAMESPACE_STD' does not name a type; did you mean 'FMT_BEGIN_NAMESPACE'?
  372 | __BEGIN_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~~~
      | FMT_BEGIN_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:377:1: error: '__END_NAMESPACE_STD' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  377 | __END_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:463:1: error: '__BEGIN_NAMESPACE_STD' does not name a type; did you mean 'FMT_BEGIN_NAMESPACE'?
  463 | __BEGIN_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~~~
      | FMT_BEGIN_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:469:1: error: '__END_NAMESPACE_STD' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  469 | __END_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:483:1: error: '__END_NAMESPACE_STD' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  483 | __END_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:512:1: error: '__BEGIN_NAMESPACE_STD' does not name a type; did you mean 'FMT_BEGIN_NAMESPACE'?
  512 | __BEGIN_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~~~
      | FMT_BEGIN_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:529:1: error: '__END_NAMESPACE_STD' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  529 | __END_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:538:1: error: '__BEGIN_NAMESPACE_STD' does not name a type; did you mean 'FMT_BEGIN_NAMESPACE'?
  538 | __BEGIN_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~~~
      | FMT_BEGIN_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:550:1: error: '__END_NAMESPACE_STD' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  550 | __END_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:557:1: error: '__END_NAMESPACE_C99' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  557 | __END_NAMESPACE_C99
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:564:1: error: '__END_NAMESPACE_STD' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  564 | __END_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:711:1: error: '__BEGIN_NAMESPACE_STD' does not name a type; did you mean 'FMT_BEGIN_NAMESPACE'?
  711 | __BEGIN_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~~~
      | FMT_BEGIN_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:717:1: error: '__END_NAMESPACE_STD' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  717 | __END_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:751:1: error: '__BEGIN_NAMESPACE_STD' does not name a type; did you mean 'FMT_BEGIN_NAMESPACE'?
  751 | __BEGIN_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~~~
      | FMT_BEGIN_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:772:1: error: '__END_NAMESPACE_STD' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  772 | __END_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:780:1: error: '__BEGIN_NAMESPACE_STD' does not name a type; did you mean 'FMT_BEGIN_NAMESPACE'?
  780 | __BEGIN_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~~~
      | FMT_BEGIN_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:788:1: error: '__END_NAMESPACE_STD' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  788 | __END_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:795:1: error: '__END_NAMESPACE_C99' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  795 | __END_NAMESPACE_C99
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:876:1: error: '__END_NAMESPACE_STD' does not name a type; did you mean 'FMT_END_NAMESPACE'?
  876 | __END_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~
      | FMT_END_NAMESPACE
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:131:11: error: 'div_t' has not been declared in '::'
  131 |   using ::div_t;
      |           ^~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:134:11: error: 'abort' has not been declared in '::'
  134 |   using ::abort;
      |           ^~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:144:11: error: 'atof' has not been declared in '::'
  144 |   using ::atof;
      |           ^~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:147:11: error: 'bsearch' has not been declared in '::'
  147 |   using ::bsearch;
      |           ^~~~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:149:11: error: 'div' has not been declared in '::'
  149 |   using ::div;
      |           ^~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:150:11: error: 'exit' has not been declared in '::'
  150 |   using ::exit;
      |           ^~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:152:11: error: 'getenv' has not been declared in '::'
  152 |   using ::getenv;
      |           ^~~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:155:11: error: 'malloc' has not been declared in '::'
  155 |   using ::malloc;
      |           ^~~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:157:11: error: 'mblen' has not been declared in '::'
  157 |   using ::mblen;
      |           ^~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:167:11: error: 'rand' has not been declared in '::'
  167 |   using ::rand;
      |           ^~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:168:11: error: 'realloc' has not been declared in '::'
  168 |   using ::realloc;
      |           ^~~~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:170:11: error: 'strtod' has not been declared in '::'
  170 |   using ::strtod;
      |           ^~~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:171:11: error: 'strtol' has not been declared in '::'
  171 |   using ::strtol;
      |           ^~~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:173:11: error: 'system' has not been declared in '::'
  173 |   using ::system;
      |           ^~~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:204:11: error: 'lldiv_t' has not been declared in '::'
  204 |   using ::lldiv_t;
      |           ^~~~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:210:11: error: '_Exit' has not been declared in '::'
  210 |   using ::_Exit;
      |           ^~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:214:11: error: 'llabs' has not been declared in '::'
  214 |   using ::llabs;
      |           ^~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:216:10: error: 'lldiv_t' does not name a type; did you mean 'ldiv_t'?
  216 |   inline lldiv_t
      |          ^~~~~~~
      |          ldiv_t
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:220:11: error: 'lldiv' has not been declared in '::'
  220 |   using ::lldiv;
      |           ^~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:231:11: error: 'atoll' has not been declared in '::'
  231 |   using ::atoll;
      |           ^~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:232:11: error: 'strtoll' has not been declared in '::'
  232 |   using ::strtoll;
      |           ^~~~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:235:11: error: 'strtof' has not been declared in '::'
  235 |   using ::strtof;
      |           ^~~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:244:22: error: 'lldiv_t' has not been declared in '__gnu_cxx'
  244 |   using ::__gnu_cxx::lldiv_t;
      |                      ^~~~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:246:22: error: '_Exit' has not been declared in '__gnu_cxx'
  246 |   using ::__gnu_cxx::_Exit;
      |                      ^~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:248:22: error: 'llabs' has not been declared in '__gnu_cxx'
  248 |   using ::__gnu_cxx::llabs;
      |                      ^~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:249:22: error: 'div' has not been declared in '__gnu_cxx'
  249 |   using ::__gnu_cxx::div;
      |                      ^~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:250:22: error: 'lldiv' has not been declared in '__gnu_cxx'
  250 |   using ::__gnu_cxx::lldiv;
      |                      ^~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:252:22: error: 'atoll' has not been declared in '__gnu_cxx'
  252 |   using ::__gnu_cxx::atoll;
      |                      ^~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:253:22: error: 'strtof' has not been declared in '__gnu_cxx'
  253 |   using ::__gnu_cxx::strtof;
      |                      ^~~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cstdlib:254:22: error: 'strtoll' has not been declared in '__gnu_cxx'
  254 |   using ::__gnu_cxx::strtoll;
      |                      ^~~~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/bits/basic_string.h: In function 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)':
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/bits/basic_string.h:4165:47: error: 'strtol' is not a member of 'std'; did you mean 'strtoul'?
 4165 |   { return __gnu_cxx::__stoa<long, int>(&std::strtol, "stoi", __str.c_str(),
      |                                               ^~~~~~
      |                                               strtoul
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/bits/basic_string.h: In function 'long int std::__cxx11::stol(const std::string&, std::size_t*, int)':
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/bits/basic_string.h:4170:36: error: 'strtol' is not a member of 'std'; did you mean 'strtoul'?
 4170 |   { return __gnu_cxx::__stoa(&std::strtol, "stol", __str.c_str(),
      |                                    ^~~~~~
      |                                    strtoul
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/bits/basic_string.h: In function 'long long int std::__cxx11::stoll(const std::string&, std::size_t*, int)':
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/bits/basic_string.h:4181:36: error: 'strtoll' is not a member of 'std'; did you mean 'strtoull'?
 4181 |   { return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(),
      |                                    ^~~~~~~
      |                                    strtoull
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/bits/basic_string.h: In function 'double std::__cxx11::stod(const std::string&, std::size_t*)':
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/bits/basic_string.h:4200:36: error: 'strtod' is not a member of 'std'; did you mean 'strtold'?
 4200 |   { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); }
      |                                    ^~~~~~
      |                                    strtold
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/bits/basic_string.h: In function 'float std::__cxx11::stof(const std::string&, std::size_t*)':
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/bits/basic_string.h:4206:36: error: 'strtof' is not a member of 'std'; did you mean 'strtoul'?
 4206 |   { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); }
      |                                    ^~~~~~
      |                                    strtoul
In file included from /qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/bits/unicode.h:38,
                 from /qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/format:58,
                 from /qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/ostream:43,
                 from /qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/bits/unique_ptr.h:43,
                 from /qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/bits/std_thread.h:43,
                 from /qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/stop_token:40,
                 from /qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/thread:42,
                 from /people/hous562/project/CXLMemSim/include/perf.h:22,
                 from /people/hous562/project/CXLMemSim/include/incore.h:7,
                 from /people/hous562/project/CXLMemSim/include/helper.h:8:
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/bits/stl_algo.h: In function 'void std::random_shuffle(_RAIter, _RAIter)':
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/bits/stl_algo.h:4503:48: error: 'rand' is not a member of 'std'; did you mean 'srand'?
 4503 |                                         + std::rand() % ((__i - __first) + 1);
      |                                                ^~~~
      |                                                srand
In file included from /qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/math.h:70:
/usr/include/bits/mathcalls.h: At global scope:
/usr/include/bits/mathcalls.h:62:16: error: expected constructor, destructor, or type conversion before '(' token
   62 | __MATHCALL_VEC (cos,, (_Mdouble_ __x));
      |                ^
/usr/include/bits/mathcalls.h:64:16: error: expected constructor, destructor, or type conversion before '(' token
   64 | __MATHCALL_VEC (sin,, (_Mdouble_ __x));
      |                ^
/usr/include/bits/mathcalls.h:79:22: error: 'sincos' has not been declared
   79 | __MATHDECL_VEC (void,sincos,,
      |                      ^~~~~~
/usr/include/bits/mathcalls.h:79:29: error: expected identifier before ',' token
   79 | __MATHDECL_VEC (void,sincos,,
      |                             ^
/usr/include/bits/mathcalls.h:80:17: error: expected identifier before '(' token
   80 |                 (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx));
      |                 ^
/usr/include/bits/mathcalls.h:80:71: error: expected constructor, destructor, or type conversion before ';' token
   80 |                 (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx));
      |                                                                       ^
/usr/include/bits/mathcalls.h:95:16: error: expected constructor, destructor, or type conversion before '(' token
   95 | __MATHCALL_VEC (exp,, (_Mdouble_ __x));
      |                ^
/usr/include/bits/mathcalls.h:104:16: error: expected constructor, destructor, or type conversion before '(' token
  104 | __MATHCALL_VEC (log,, (_Mdouble_ __x));
      |                ^
/usr/include/bits/mathcalls.h:140:16: error: expected constructor, destructor, or type conversion before '(' token
  140 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      |                ^
In file included from /qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/math.h:89:
/usr/include/bits/mathcalls.h:62:16: error: expected constructor, destructor, or type conversion before '(' token
   62 | __MATHCALL_VEC (cos,, (_Mdouble_ __x));
      |                ^
/usr/include/bits/mathcalls.h:64:16: error: expected constructor, destructor, or type conversion before '(' token
   64 | __MATHCALL_VEC (sin,, (_Mdouble_ __x));
      |                ^
/usr/include/bits/mathcalls.h:79:22: error: 'sincos' has not been declared
   79 | __MATHDECL_VEC (void,sincos,,
      |                      ^~~~~~
/usr/include/bits/mathcalls.h:79:29: error: expected identifier before ',' token
   79 | __MATHDECL_VEC (void,sincos,,
      |                             ^
/usr/include/bits/mathcalls.h:80:17: error: expected identifier before '(' token
   80 |                 (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx));
      |                 ^
/usr/include/bits/mathcalls.h:80:71: error: expected constructor, destructor, or type conversion before ';' token
   80 |                 (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx));
      |                                                                       ^
/usr/include/bits/mathcalls.h:95:16: error: expected constructor, destructor, or type conversion before '(' token
   95 | __MATHCALL_VEC (exp,, (_Mdouble_ __x));
      |                ^
/usr/include/bits/mathcalls.h:104:16: error: expected constructor, destructor, or type conversion before '(' token
  104 | __MATHCALL_VEC (log,, (_Mdouble_ __x));
      |                ^
/usr/include/bits/mathcalls.h:140:16: error: expected constructor, destructor, or type conversion before '(' token
  140 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      |                ^
In file included from /qfs/people/hous562/miniforge3/envs/cxlsim/x86_64-conda-linux-gnu/sysroot/usr/include/math.h:133:
/usr/include/bits/mathcalls.h:62:16: error: expected constructor, destructor, or type conversion before '(' token
   62 | __MATHCALL_VEC (cos,, (_Mdouble_ __x));
      |                ^
/usr/include/bits/mathcalls.h:64:16: error: expected constructor, destructor, or type conversion before '(' token
   64 | __MATHCALL_VEC (sin,, (_Mdouble_ __x));
      |                ^
/usr/include/bits/mathcalls.h:79:22: error: 'sincos' has not been declared
   79 | __MATHDECL_VEC (void,sincos,,
      |                      ^~~~~~
/usr/include/bits/mathcalls.h:79:29: error: expected identifier before ',' token
   79 | __MATHDECL_VEC (void,sincos,,
      |                             ^
/usr/include/bits/mathcalls.h:80:17: error: expected identifier before '(' token
   80 |                 (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx));
      |                 ^
/usr/include/bits/mathcalls.h:80:71: error: expected constructor, destructor, or type conversion before ';' token
   80 |                 (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx));
      |                                                                       ^
/usr/include/bits/mathcalls.h:95:16: error: expected constructor, destructor, or type conversion before '(' token
   95 | __MATHCALL_VEC (exp,, (_Mdouble_ __x));
      |                ^
/usr/include/bits/mathcalls.h:104:16: error: expected constructor, destructor, or type conversion before '(' token
  104 | __MATHCALL_VEC (log,, (_Mdouble_ __x));
      |                ^
/usr/include/bits/mathcalls.h:140:16: error: expected constructor, destructor, or type conversion before '(' token
  140 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      |                ^
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cmath:177:11: error: 'cos' has not been declared in '::'
  177 |   using ::cos;
      |           ^~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cmath:215:11: error: 'exp' has not been declared in '::'
  215 |   using ::exp;
      |           ^~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cmath:322:11: error: 'log' has not been declared in '::'
  322 |   using ::log;
      |           ^~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cmath:372:11: error: 'pow' has not been declared in '::'
  372 |   using ::pow;
      |           ^~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cmath:400:11: error: 'sin' has not been declared in '::'
  400 |   using ::sin;
      |           ^~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cmath:1855:11: error: 'cosf' has not been declared in '::'
 1855 |   using ::cosf;
      |           ^~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cmath:1858:11: error: 'cosl' has not been declared in '::'
 1858 |   using ::cosl;
      |           ^~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cmath:1869:11: error: 'expf' has not been declared in '::'
 1869 |   using ::expf;
      |           ^~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cmath:1872:11: error: 'expl' has not been declared in '::'
 1872 |   using ::expl;
      |           ^~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cmath:1911:11: error: 'logf' has not been declared in '::'
 1911 |   using ::logf;
      |           ^~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cmath:1914:11: error: 'logl' has not been declared in '::'
 1914 |   using ::logl;
      |           ^~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cmath:1932:11: error: 'powf' has not been declared in '::'
 1932 |   using ::powf;
      |           ^~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cmath:1935:11: error: 'powl' has not been declared in '::'
 1935 |   using ::powl;
      |           ^~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cmath:1939:11: error: 'sinf' has not been declared in '::'
 1939 |   using ::sinf;
      |           ^~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cmath:1942:11: error: 'sinl' has not been declared in '::'
 1942 |   using ::sinl;
      |           ^~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cmath:2085:11: error: 'double_t' has not been declared in '::'
 2085 |   using ::double_t;
      |           ^~~~~~~~
/qfs/people/hous562/miniforge3/envs/cxlsim/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++/cmath:2086:11: error: 'float_t' has not been declared in '::'
 2086 |   using ::float_t;
      |           ^~~~~~~
/people/hous562/project/CXLMemSim/include/logging.h: In constructor 'LogWriter::LogWriter(const std::source_location&, LogLevel)':
/people/hous562/project/CXLMemSim/include/logging.h:41:27: error: 'getenv' is not a member of 'std'
   41 |         char *logv = std::getenv("LOGV");
      |                           ^~~~~~
make[2]: *** [CMakeFiles/CXLMemSim.dir/build.make:76: CMakeFiles/CXLMemSim.dir/src/cxlcontroller.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/CXLMemSim.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Is there any package version problems?
Could you please help to fix this error. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant