LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ./configure cant find libXext (https://www.linuxquestions.org/questions/linux-newbie-8/configure-cant-find-libxext-296771/)

addison014 03-02-2005 12:49 PM

./configure cant find libXext
 
whenever i go to compile some source i have to change the location of the Xincludes and Xlibraries. that overcame my problem of gcc not being able to find those. now it says that it can't find a working libXext file. i am running suse 9.2 pro 64 bit edition, and was able to locate the libXext file (don't remember exactly where right now, will be able to update once i get home tonight).

what command will allow me to change where ./configure looks for my libXext file?
this is keeping me from compiling pretty much everything from source.

thanks

linuxzealot 03-02-2005 03:01 PM

Code:

./configure CPPFLAGS=-I/path/to/header/files
That is to set where it searches for header files

Code:

./configure LDFLAGS=-L/path/to/library/files
That tells it where to look for library files, which I think is what you need. :)

wpn146 03-02-2005 03:16 PM

First choice:

Code:

./configure --help | less
Look through the configure options. Many products provide a parameter to do exactly what you need.

Second choice:

If there is no special configure parameter, configure will try to find its needed include (and other) files. If you installed into a location configure does not expect, it will need a little help finding it. Most products create a file with a ".pc" extension and leave it in "<path>/lib/pkgconfig", where "<path>" is the --prefix= path you specified when you built libXext. Locate it. Then set up the environment variable $PKG_CONFIG_PATH with the path to that file. Example:
Code:

export PKG_CONFIG_PATH=some_path/lib/pkgconfig
If the product you are building needs several of these non-standard locations, the syntax of the environment variable is the same as your $PATH variable -- separate fields with a colon ":".

Hopefully, this gets you past the "configure" step ind into the "make" step. If you have a dumb ./configure script, it may be necessary to use additional compiler directives to instruct the compiler where to search. This is done through environment variables.

Use one or more of these environment variables:
Code:

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS    linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
              headers in a nonstandard directory <include dir>
  CPP        C preprocessor
  CXX        C++ compiler command
  CXXFLAGS    C++ compiler flags
  CXXCPP      C++ preprocessor
  F77        Fortran 77 compiler command
  FFLAGS      Fortran 77 compiler flags

From your question, LDFLAGS and CPPFLAGS are applicable.

One final environment variable might be helpful:
Code:

export LD_LIBRARY_PATH=some_path/lib
Again syntax is the same as $PATH. This will probably only be needed if the make process runs a utility which needs the library.

Hope this helps...

addison014 03-15-2005 02:56 PM

I guess I don't understand what you said here. I made libXext? I thought it was just a library file that was already there.

You said:
"Most products create a file with a ".pc" extension and leave it in "<path>/lib/pkgconfig", where "<path>" is the --prefix= path you specified when you built libXext."

Also, I was not able to find the pkgconfig.pc file that you said would probably be generated by whatever package I'm trying to install. I set the install directory (prefix right?) to /opt/kde3 Its not in /opt/kde3/bin

__J 03-15-2005 03:10 PM

kde does not use pkg-config. mostly pkg-config is used by gnome ( but some other libs and programs use it too).

look in /usr/X11R6/lib for libXext.so.*, make sure you have /usr/X11R6/lib in /etc/ld.so.conf and have run ldconfig to update the cache.

if you still have problems, either use the LDFLAGS or LD_LIBRARY_PATH variables above. ( though you shouldn't need to do these if you have the path in /etc/ld.so.conf and have run ldconfig).


All times are GMT -5. The time now is 08:29 AM.