Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ubuntu 18.04 - make install - miss ldconfig? #490

Open
boaks opened this issue Apr 26, 2020 · 5 comments
Open

ubuntu 18.04 - make install - miss ldconfig? #490

boaks opened this issue Apr 26, 2020 · 5 comments

Comments

@boaks
Copy link

boaks commented Apr 26, 2020

if libcoap is build on a new system, "make install" installs the libraries at "/usr/local/lib".
But if the coap-client is started, it reports, that the libcoap is missing.
AFAIK, a call of ldconfig is required, but missing. After that, the coap-client executes without that failure.

@obgm
Copy link
Owner

obgm commented Apr 27, 2020

True, but calling ldconfig on the install directory (or adding it to /etc/ld.so.conf is system configuration. IMO this should not belong into the Makefile's responsibility. @tijuca ?

@tijuca
Copy link
Contributor

tijuca commented Apr 27, 2020

I guess then is something miss configured an the system.

I'm not working with Ubuntu but on the following parts Ubuntu and Debian is behaving the same.
O.k. looking at /etc/ld.so.conf we will see that content:

include /etc/ld.so.conf.d/*.conf

And in /etc/ld.so.conf.d/ you will find a file called libc.conf with that content:

# libc default configuration
/usr/local/lib

Which package belongs to /etc/ld.so.conf.d/libc.conf?

$ dpkg -S /etc/ld.so.conf.d/libc.conf
libc-bin: /etc/ld.so.conf.d/libc.conf

But the package libc-bin is an essential package, means this is always installed as it is really essential. 😃

$ apt show libc-bin | grep Essential

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Essential: yes

In the end ldconfig is configured as default to also respect the folder /usr/local/lib, there aren't normally any further steps needed if you install libcoap into /usr/local and did not configured any specific target folder.
This is also the first complain that using the default installation folder isn't working so far I remember.

OTOH I agree with obgm that ldconfig calls are not part of any installation step.

@obgm
Copy link
Owner

obgm commented Apr 27, 2020

The question if /usr/local/lib is included somewhere in /etc/ld.so.conf put aside—if changing --prefix during configure, you would have the same issue as described by @boaks. IIRC, the linker outputs a note explicitly stating the steps you might want to make ld find the shared libraries.

@boaks
Copy link
Author

boaks commented Apr 27, 2020

My understanding was, that ldconfig updates the "library index/cache".
If you alter something with that libraries, either a "restart" or a explicit call to ldconfig is required.
I called ldconfig in my home directory. After I executed it, the example execs have worked.

@boaks
Copy link
Author

boaks commented Apr 27, 2020

The question if /usr/local/lib is included somewhere in /etc/ld.so.conf

Yes, it was, but without refresh the libs-cache with ldconfig, it seems not to work.
If wanted, I may test this with a new ubuntu 18.04 installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants