Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lib directory on 64-bit OpenSuse distribution

A project I'm working on uses a non-standard distribution system, which internally downloads and compiles the dependency libraries. This crock launches, for each library, the configure script giving as prefix an internal directory of the compiling system. Then it runs make and make install, then it verifies the content by searching the install directory with the lib/<mylib>.a file. This last step fails.

Trying to understand what's happening, I compiled a pair of random libraries by myself, including one I'm the author of. I noticed that under my distribution (openSUSE, 64 bit) the installing path is not populated with /lib, but with /lib64 instead.

It's clear that this is a setting of the distribution, and I'm pretty sure that this setting concerns a configuration of autotools shipped with the distro.

Is there a way of changing this behavior or, as an alternative, to read this information from the system (so that I can patch the above mentioned crock)?

Thanks for your help

Update: I learnt about the --libdir flag in configure, so I think I can solve my problem. Still I would like to know if there's a way of knowing this detail from somehow querying the distribution (e.g. read some configuration file).

like image 998
Dacav Avatar asked Feb 12 '12 09:02

Dacav


People also ask

Where is lib folder located?

When you don't see the libs/ folder inside the app/ module, then you may have deleted the folder accidentally. You need to create a new libs/ folder by right-clicking on the app/ module, then select New > Directory from the context menu. Name the new directory as libs .

What is the libs folder?

lib – Application specific libraries. Basically, any kind of custom code that doesn't belong under controllers, models, or helpers. This directory is in the load path.


2 Answers

The configure script should never try to make assumptions about the machine, or attempt to install libraries in locations other than ${exec_prefix}/lib unless the user explicitly requests a different location for $libdir. One mechanism by which the user can explicitly request an alternate location is through a config.site file. If the file ${prefix}/share/config.site exists, it may specify an alternate value for $libdir, causing the user to unknowingly explicitly specify an alternate installation location.

like image 182
William Pursell Avatar answered Dec 17 '22 03:12

William Pursell


That's a good answer by William Pursell. I just wanted to add, since this question specifically concerns openSUSE, that openSUSE doesn't install a file called config.site. The equivalent file is actually installed into /usr/share/site via the site-config rpm, and then activated via /etc/profile/site.{c,}sh which exports the CONFIG_SITE environment variable to point to this file. That variable is then honoured by autoconf, as you may have already seen.

like image 37
Adam Spiers Avatar answered Dec 17 '22 04:12

Adam Spiers