# Getting error during Gromacs installation

**URL:** <https://gromacs.bioexcel.eu/t/getting-error-during-gromacs-installation/3585>\
**Category:** User discussions\
**Tags:** installation-error\
**Created:** [February 2, 2022, 2:50pm UTC](https://gromacs.bioexcel.eu/t/getting-error-during-gromacs-installation/3585 "2022-02-02T14:50:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsaha](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@dsaha](https://gromacs.bioexcel.eu/u/dsaha)\
**Post date:** [February 2, 2022, 2:50pm UTC](https://gromacs.bioexcel.eu/t/getting-error-during-gromacs-installation/3585/1 "2022-02-02T14:50:21Z")

</div>

GROMACS version: 2020.6  
GROMACS modification: No  
Here post your question

After installation of OpenMPI, fftw and at the last step of GROMACS installation, I am getting error everytime. Command line used are given below.

cd build  
sudo CC=/usr/bin/mpicc F77=/usr/bin/f77 CXX=/usr/bin/mpicxx MPICC=/usr/bin/mpicc CMAKE\_PREFIX\_PATH=/soft/fftw339/lib cmake … -DFFTWF\_INCLUDE\_DIR=/soft/fftw339/include -DFFTWF\_LIBRARIES=/soft/fftw339/lib/libfftw3.so -DCMAKE\_INSTALL\_PREFIX=/soft/gmx2020 -DGMX\_X11=OFF -DCMAKE\_CXX\_COMPILER=/usr/bin/mpicxx -DCMAKE\_C\_COMPILER=/usr/bin/mpicc -DGMX\_MPI=ON -DGMX\_DOUBLE=OFF -DGMX\_DEFAULT\_SUFFIX=ON -DGMX\_PREFER\_STATIC\_LIBS=ON -DGMX\_SIMD=SSE2 -DGMX\_SIMD=AVX2\_256 -DGMX\_USE\_RDTSCP=OFF  
sudo make  
sudo make install

ERROR Message

/usr/bin/ld: /usr/lib/x86\_64-linux-gnu/libhwloc.a(topology-linux.o): in function `hwloc_linux_component_instantiate': (.text+0x8a1): undefined reference to `udev\_new’  
/usr/bin/ld: /usr/lib/x86\_64-linux-gnu/libhwloc.a(topology-linux.o): in function `hwloc_linux_backend_disable': (.text+0x8eb): undefined reference to `udev\_unref’  
/usr/bin/ld: /usr/lib/x86\_64-linux-gnu/libhwloc.a(topology-linux.o): in function `hwloc_linuxfs_block_class_fillinfos.isra.0': (.text+0x5185): undefined reference to `udev\_device\_new\_from\_subsystem\_sysname’  
/usr/bin/ld: (.text+0x51a5): undefined reference to `udev_device_get_property_value' /usr/bin/ld: (.text+0x51ce): undefined reference to `udev\_device\_get\_property\_value’  
/usr/bin/ld: (.text+0x51fc): undefined reference to `udev_device_get_property_value' /usr/bin/ld: (.text+0x522d): undefined reference to `udev\_device\_get\_property\_value’  
/usr/bin/ld: (.text+0x5266): undefined reference to `udev_device_get_property_value' /usr/bin/ld: (.text+0x528b): undefined reference to `udev\_device\_unref’  
/usr/bin/ld: /usr/lib/x86\_64-linux-gnu/libhwloc.a(components.o): in function `hwloc__dlforeach_cb': (.text+0xa4): undefined reference to `lt\_dlopenext’  
/usr/bin/ld: (.text+0x12e): undefined reference to `lt_dlsym' /usr/bin/ld: (.text+0x15a): undefined reference to `lt\_dlclose’  
/usr/bin/ld: (.text+0x19f): undefined reference to `lt_dlerror' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libhwloc.a(components.o): in function `hwloc\_plugins\_exit’:  
(.text+0x48c): undefined reference to `lt_dlclose' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libhwloc.a(components.o): in function `hwloc\_components\_init’:  
(.text+0xbe8): undefined reference to `lt_dlinit' /usr/bin/ld: (.text+0xc33): undefined reference to `lt\_dlforeachfile’  
/usr/bin/ld: /usr/lib/x86\_64-linux-gnu/libhwloc.a(components.o): in function `hwloc_plugins_exit': (.text+0x4c1): undefined reference to `lt\_dlexit’  
collect2: error: ld returned 1 exit status  
make[2]: \*\*\* [src/programs/CMakeFiles/gmx.dir/build.make:117: bin/gmx\_mpi] Error 1  
make[1]: \*\*\* [CMakeFiles/Makefile2:5804: src/programs/CMakeFiles/gmx.dir/all] Error 2  
make: \*\*\* [Makefile:163: all] Error 2

Thanks in advance

---

<div class="post-metadata">

**Author:** ![ebriand](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/ebriand/32/2314_2.png) [@ebriand](https://gromacs.bioexcel.eu/u/ebriand)\
**Post date:** [February 3, 2022, 9:25am UTC](https://gromacs.bioexcel.eu/t/getting-error-during-gromacs-installation/3585/2 "2022-02-03T09:25:22Z")

</div>

The static library version of hwloc (libhwloc.a) is used (as per GMX\_PREFER\_STATIC\_LIBS=ON), and seems to require symbols from libltdl and libudev

You can try adding the following variable before cmake invokation

```auto
LDFLAGS="-L/path/to/librarydir -ludev -lltdl"

```

where `/path/to/librarydir` is a path containing libudev.so and libltdl.so
