LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   gphoto wont compile (https://www.linuxquestions.org/questions/linux-software-2/gphoto-wont-compile-424205/)

njbrain 03-12-2006 03:52 PM

gphoto wont compile
 
I am having alot of trouble trying to compile gphoto. I first compiled libgphoto, and this is the error I get trying to compile gphoto.
checking for libgphoto2 to use... autodetect
checking for LIBGPHOTO2... Package libgphoto2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libgphoto2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libgphoto2' found
configure: error:
PKG_CONFIG_PATH=
LIBGPHOTO2_LIBS=
LIBGPHOTO2_CFLAGS=

* Fatal: gphoto2 requires libgphoto2 >= 2.1.99 to build.
*
* Possible solutions:
* - set PKG_CONFIG_PATH to adequate value
* - call configure with LIBGPHOTO2_LIBS=.. and LIBGPHOTO2_CFLAGS=..
* - call configure with one of the --with-libgphoto2 parameters
* - get libgphoto2 and install it:

root@Sagasto:/home/njbrain/Downloads/gphoto2-2.1.99#

Thanks in advance for any help.

titopoquito 03-12-2006 05:03 PM

Seems like your libgphoto2 isn't installed correctly? I installed it from source on a Slackware 10.2 system and the file libgphoto2.pc is in /usr/lib/pkgconfig/libgphoto2.pc. I had no problem after that to compile gphoto2, so I suggest to check what has been installed or not when compiling libgphoto2.

njbrain 03-12-2006 05:56 PM

I forgot to mention that libgphoto2.pc is in /usr/local/lib/pkgconfig.

titopoquito 03-13-2006 02:33 AM

I don't know sufficient about that, my only idea is to check /etc/ld.so.conf if /usr/local/lib is in the line of library folders there and call ldconfig to update the linked libraries, in case this step was not done right when/after installing glibphoto2.

titopoquito 03-13-2006 02:47 AM

If you change to root, what is the output of

pkg-config --cflags --libs libgphoto2

tomdkat 03-13-2006 09:14 AM

Quote:

Originally Posted by njbrain
I forgot to mention that libgphoto2.pc is in /usr/local/lib/pkgconfig.

You need to make sure pkg-config knows about stuff installed in /usr/local/lib/pkgconfig.

Run this command:

$ echo $PKG_CONFIG_PATH

and make sure /usr/local/lib/pkgconfig is in it. If it's not, add it and re-run the configure script. See if PKG_CONFIG_PATH is set in your .bash_profile. If it is, add /usr/local/lib/pkgconfig as necessary. Then it will always be in the pkg-config path.

Here is what you can do:

$ cd /path/to/gphoto/build/directory
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
$ ./configure [options]

see if that works. If it does, then add /usr/local/lib/pkgconfig to your .bash_profile, as mentioned above.

Good luck!

Peace...

njbrain 03-13-2006 10:35 AM

Thanks for a all the help. I got it to compile after linking libgphoto2.pc to /usr/lib.

tomdkat 03-13-2006 11:12 AM

Quote:

Originally Posted by njbrain
Thanks for a all the help. I got it to compile after linking libgphoto2.pc to /usr/lib.

Cool. That means /usr/lib/pkgconfig is in PKG_CONFIG_PATH. Anything else you install in /usr/local that has a pkg-config resource file (a ".pc" file) might cause you the same kind of grief as libgphoto2 did. Just a heads-up.

Glad you got everything working. :)

Peace...


All times are GMT -5. The time now is 04:28 PM.