libhwloc.so.5 error while installing vortex

336 views Asked by At

While trying 'make' in vortex after installing all the dependencies, I get the following error:


    /usr/bin/ld: warning: libhwloc.so.5, needed by /opt/pocl/runtime/lib/libOpenCL.so, not found (try using -rpath or -rpath-link)
    /usr/bin/ld: /opt/pocl/runtime/lib/libOpenCL.so: undefined reference to `hwloc_topology_load'
    /usr/bin/ld: /opt/pocl/runtime/lib/libOpenCL.so: undefined reference to `hwloc_get_api_version'
    /usr/bin/ld: /opt/pocl/runtime/lib/libOpenCL.so: undefined reference to `hwloc_get_nbobjs_by_depth'
    /usr/bin/ld: /opt/pocl/runtime/lib/libOpenCL.so: undefined reference to `hwloc_topology_destroy'
    /usr/bin/ld: /opt/pocl/runtime/lib/libOpenCL.so: undefined reference to `hwloc_bitmap_isequal'
    /usr/bin/ld: /opt/pocl/runtime/lib/libOpenCL.so: undefined reference to `hwloc_topology_ignore_type'
    /usr/bin/ld: /opt/pocl/runtime/lib/libOpenCL.so: undefined reference to `hwloc_get_type_depth'
    /usr/bin/ld: /opt/pocl/runtime/lib/libOpenCL.so: undefined reference to `hwloc_get_obj_by_depth'
    /usr/bin/ld: /opt/pocl/runtime/lib/libOpenCL.so: undefined reference to `hwloc_topology_init'
    collect2: error: ld returned 1 exit status

I attempted by installing the hwloc library (v1.10) and setting the library path for it, but, I am still encountering the following error:


    `/opt/pocl/compiler/bin/poclcc: error while loading shared libraries: libhwloc.so.5: cannot open shared object file: No such file or directory
    make[3]: *** [../common.mk:76: kernel.pocl] Error 127
    make[2]: *** [Makefile:2: all] Error 2
    make[1]: *** [Makefile:11: opencl] Error 2
    make: *** [Makefile:7: all] Error 2`
2

There are 2 answers

0
Yonggang Liu On

I met the same question, I tried to install hwloc v2.40 and maunally to create a link which can solve the link issue, but the new issue was raised that show as below:

/usr/bin/ld: /opt/pocl/runtime/lib/libOpenCL.so: undefined reference to hwloc_topology_ignore_type'. But hwloc_topology_ignore_type' was supported from v0.9.3. I am not sure if it was deleted. Just share info. no solution now.

0
Xlucidator On

I met the same question when using the ubunutu/bionic toolchain of vortex in Ubuntu 22.04 (wsl2).

This problem can be simply solved by switching to ubuntu/focal toolchain. Just change the variable OSDIR and OS would be OK (in toolchain_install.sh and toolchain_env.sh)

Probable Reason: default version of hwloc's so file in Ubuntu18.04 may be libhwloc.so.5 ( and libhwloc.so.15 in 20.04, libhwloc.so.15.5.2 in 22.04. You can see them in dir /usr/lib/x86_64-linux-gnu/ after using apt install libhwloc-dev ), and variable hwloc_topology_ignore_type was removed in the recent two versions.