I need to know the library rnvironment variable in linux. Ie, I install zlib directory in the custom path /usr/local/mylib and give --enable-zlib in the ffmpeg install, ffmpeg should check for the zlib libraries in the path /usr/local/mylib. Currently it checks /usr/lib if 32 bit OS and in /usr/lib64/ if 64 bit. So, I need to set the library Env path, so that it will set to /usr/local/mylib during the compilation time.
Eg, like this.
PKG_CONFIG_PATH=/usr/lib/pkgconfig
export PKG_CONFIG_PATH
I compiled libogg-1.2.2 with ./configure --prefix=/usr/local/myapps --with-pic
It got installed fine.
Then I typed the following
Then compile libvorbis with ./configure --prefix=/usr
It needs libogg.so and it is not checking the /usr/local/myapps dir for the libraries. It checks /usr/lib or /usr/lib64. I am not sure. How to make it check /usr/local/myapps by default? See the error below.
I should say the .pc file of libogg has got the details. But all packages dont make .pc files.
When I issue the following commands, libvorbis configure script will not throw error.
I need the configure script check /usr/local/myapps/lib without using PKG_CONFIG_PATH variable.
But that's not where your libs are. You should set LDFLAGS to -L/usr/local/myapps/lib
BTW, it doesn't need .so. That's dynamic library (shared object), that gets loaded at runtime. It wants the static library libogg.a to link against.
It's likely that you will need to define the path to header files also, export
And as I am looking at the output of ./configure --help (of some other program, but should be same), I read:
So the following should take care of it, without messing with env vars:
Then installed libraw1394. The files got installed fine in the following locations.
Now, when I try to install libdc1394 which checks for the occurence of libraw, says libraw is not installed. Why the configure script fails to check at the at the path /usr/local/myapps ?
What environment variable needs to be set?
II)
I install ffmpeg with prefix as /usr/local/myapps . But after installing it, when I type "/usr/local/myapps/bin/ffmpeg -version" it says libraries such as libavfilter.so.15 not found. I did an strace and found that ffmpeg binary checks the .so files in the paths, /lib64, /usr/lib64 etc and fails. I have to make symlinks to make this work. How to make ffmpeg binary check the libraries at /usr/local/myapps/lib itself?
---------- Post updated at 02:12 PM ---------- Previous update was at 01:55 PM ----------
Got the answer to the first question.
I opened the file /usr/local/myapps/lib/pkgconfig/libraw1394.pc and saw "Libs: -L${libdir}".
I set the LIBS env variable as follows.
That solved the issue.
Please help me how to solve FFmpeg issue described above.
---------- Post updated at 03:19 PM ---------- Previous update was at 02:12 PM ----------
Solved!!
I was able to solve the secind issue
Add "/usr/local/myapps/lib" to a new file /etc/ld.so.conf.d/myapps.conf and run the command below.
or you could also set LD_LIBRARY_PATH, but storing it in /etc/ld.so.conf is better -- permanent solution. Glad you worked it out.
Note that you have two different libraries -- static (.a files), that get linked against at the compilation time, and dynamic (.so), that are loaded at runtime. Compiler needs to know location of static libs, when you define the LDFLAGS var; whereas /etc/ld.so.conf, or LD_LIBRARY_PATH store the location of dynamic libs.
Cheers!
Hello,
I am always confused about adding library path for ./configure when compiling software under Linux Debian based OS. For example the README of the software tells
--with-boost=PATH specify directory for the boost header files
--with-mpi=PATH specify prefix directory for... (4 Replies)
My product has 2 libraries say "x & y".
x depends on y.
During the installation of my products package, user will be prompted for his own location to copy my product libraries.
Installation will copy libraries "x & y" and create my product specific ENV variable say "MYPATH" pointing to User... (4 Replies)
Hello,
How to set up the path for downloaded C/C++ libraries (or, header files) so that they can be included like system headers (stdio.h or iostream)? The libraries/headers are from a package containing different folders each has different sets of headers and put in... (1 Reply)
Hello,
Any inputs about this one?
/usr/lib/dld.sl: Can't find path for shared library: libintl.sl
/usr/lib/dld.sl: No such file or directory
: Core file for 32-bit PA-RISC application
: /tmp/usr/local/bin/git saved to /etc/core.git.
ABORT instruction (core dumped)
bash-4.0# echo... (3 Replies)
I don't know how to put this. However here is the problem.
While executing command remotely on a Unix machine i get an error
/usr/lib/hpux32/dld.so: Unable to find library 'libxerces-c.sl.21'.
However when i execute the command on the remote machine locally. it works fine.
Also i have... (2 Replies)
Is there something which is an alternative to the variable LD_LIBRARY_PATH?
The behaviour of this variable is that the path specified here will be checked before checking usual paths. But I want to have some folders checked for shared libraries after the usual paths. i.e usual paths have to... (3 Replies)
Hi all,
This is probably a basic question. I had installed a stand-alone library called szip in my home directory, as I don't have the necessary root permission.
I tried to set an environment for both include and lib files in my .cshrc script as
setenv /home/szip/lib
setenv... (3 Replies)
Hi Everyone
I have written an installer dependant on several shared libraries. I am attempting to strip the full path from these dependant libraries using the chatr command via a script file but am having no success. Running ldd on the intaller exe fails with the following error. Cant open... (4 Replies)