clasp icon indicating copy to clipboard operation
clasp copied to clipboard

build failed on fedora

Open zhscn opened this issue 2 years ago • 0 comments

Describe the bug Follow the steps described in Wiki, I got the link error from ninja.

Expected behavior build clasp success.

Actual behavior

../src/core/debug_unixes.cc:398:add_dynamic_library_impl Could not find library by walking objects or by searching for external symbol '_init' - library boehmprecise/iclasp: undefined symbol: _init dlerror = /home/zhscn/project/clasp/build/boehmprecise/iclasp

Looks like iclasp doesn't contain "_init" symbol, but the outputs of nm are opposite:

❯ nm -C boehmprecise/iclasp | rg " _init"
0000000000cd8e08 t _init

Code at issue

    // debug_unixes.cc:
    void* addr = dlsym(handle, "_init");
    const char* error = dlerror();
    if (error) {
      printf("%s:%d:%s Could not find library by walking objects or by searching for external symbol '_init' - library %s dlerror "
             "= %s\n",
             __FILE__, __LINE__, __FUNCTION__, error, libraryName.c_str());
      abort();
    }

Context OS: fedora 39 clang: 17.0.6 clasp commit: 087eb99fe8524c873206df0e0f2fde13232699c0(tag 2.5.0)

zhscn avatar Jan 07 '24 02:01 zhscn