nrnivmodl missing -lX11

Post Reply
RobinDS
Posts: 22
Joined: Mon Nov 04, 2019 12:17 pm

nrnivmodl missing -lX11

Post by RobinDS »

When trying to run nrnivmodl on a new Ubuntu machine I get the following error

Code: Select all

/usr/bin/ld: cannot find -lX11
collect2: error: ld returned 1 exit status
/usr/local/nrn/x86_64/bin/nrnmech_makefile:94: recipe for target 'libnrnmech.la' failed
make: *** [libnrnmech.la] Error 1
RobinDS
Posts: 22
Joined: Mon Nov 04, 2019 12:17 pm

Re: nrnivmodl missing -lX11

Post by RobinDS »

In my case it was because ld was unable to locate the libX11. If you run into a similar problem here's how to resolve it:

[*] Check if you have the library or its dev variant installed, for -lX11, libX11 version 6, libx11-6 should be installed
[*] Check ld in verbose mode (ld -lX11 --verbose) to see where it's looking for the files and compare with the package's installed filed, found with dpkg-query -L libX11-6
[*] If a .so file or versioned .so.x.y.z is found but not exactly where ld looks for it simply create a symbolic link on a location where ld looks for the library file and the problem should be resolved
Post Reply