﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3998	OMC does not search in the correct places for libs under Linux	Dietmar Winkler	Martin Sjölund	"When working on [https://github.com/modelica/Modelica_DeviceDrivers/issues/114 Modelica_DeviceDrivers gh#114] I tried to run (on OpenModelica 1.11.0~dev-42-g1a73b84 under Ubuntu 16.04 64bit):

{{{#!mo
model Try4
  parameter String mem_name = ""COM4"";
  import Modelica_DeviceDrivers.Communication.SharedMemory;
  import Modelica_DeviceDrivers.Communication.SharedMemory_;
  import Modelica_DeviceDrivers.Packaging.SerialPackager;
  import Modelica_DeviceDrivers.Packaging.SerialPackager_;
protected
  SharedMemory sm = SharedMemory(mem_name, 16 * 1024);
  SerialPackager pkg = SerialPackager();
equation
  SharedMemory_.read(sm, pkg);
  annotation(uses(Modelica_DeviceDrivers(version=""1.4.4"")));
end Try4;
}}}

which compiles fine and even seems to execute but I got a translation warning:

{{{
[4] 09:08:37 Translation Warning
[Modelica_DeviceDrivers.Communication.SharedMemory: 17:3-25:17]: 
Could not find library pthread in either of:
  /usr/lib/x86_64-linux-gnu/omc/libpthread.a
  /usr/lib/x86_64-linux-gnu/omc/libpthread.so
  /usr/lib//libpthread.a
  /usr/lib//libpthread.so
 ...
}}}

the lib actually resides in:
{{{
$ locate libpthread.a
/usr/lib/x86_64-linux-gnu/libpthread.a
/usr/lib32/libpthread.a
/usr/libx32/libpthread.a
}}}

Same goes for `librt`.

So OMC should first search `/usr/lib/x86_64-linux-gnu/` then `/usr/lib/x86_64-linux-gnu/omc/`

"	defect	accepted	high	Future	Backend	v1.11.0			Adrian Pop
