LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-15-2007, 04:27 PM   #1
cbabbage
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Rep: Reputation: 0
Setting Ubuntu include library path


What's the best way to add to the include library path in Ubuntu? I have tried to install a number of different packages and am constantly coming up with problems because packages such as Tk and gtk which are already installed are not being picked up by the library path.
 
Old 10-15-2007, 04:53 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
Without seeing the actual errors you're receiving and where in the process you receive them (configure, build, or install) one can only guess what env var needs to be set. You are on *buntu, so the most likely cause of your problems is missing development packages for Gtk and Tk on your system. Install the Gtk and Tk development packages.

Gtk2 use a metadata file to assist the configuration of other programs, Gtk1 uses a config script. Don't know which one you're using because you don't provide sufficient information to troubleshoot your problem. The env var that needs to be set to pick up these respective files is different. If things aren't installed in non-standard locations, you shouldn't need to muck with env vars anyway.
 
Old 10-15-2007, 06:46 PM   #3
cbabbage
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Original Poster
Rep: Reputation: 0
The development packages for Tk and Gtk are installed. The errors are happening at the compile stage. For example, I'm trying to install Grass
GIS. Tk8.4 is already installed and the header library is in /usr/include. But the configure script keeps stopping with a message along the lines of 'unable to find tk.h'
Any ideas?
 
Old 10-15-2007, 09:13 PM   #4
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
OK, is it failing the build (compile stage) or the configure (configure script)? Generally one would post the last 20-30 lines of the failed build (if it really is the build that is failing), not just a paraphrase of the error message. The error message is important, but it's also important to know what the package was trying to do.
 
Old 10-16-2007, 04:29 PM   #5
cbabbage
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Original Poster
Rep: Reputation: 0
Here are the last twenty or so lines I get when I run the configure script. As mentioned before, tk.h and other tk files are installed and sitting in /usr/include. Nothing I do has worked to get the script to recognize the tk files, including to editing ld.so.conf.

checking whether to use JPEG... yes
checking for location of JPEG includes...
checking for jpeglib.h... yes
checking for location of JPEG library...
checking for jpeg_start_compress in -ljpeg... yes
checking whether to use GDAL... yes
checking for gdal-config... /usr/local/bin/gdal-config
checking for GDALOpen... yes
checking whether to use TIFF... yes
checking for location of TIFF includes...
checking for tiffio.h... yes
checking for location of TIFF library...
checking for TIFFOpen in -ltiff... yes
checking whether to use PNG... yes
checking for location of PNG includes...
checking for png.h... yes
checking for location of PNG library...
checking for png_read_image in -lpng... yes
checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes...
checking for tcl.h... yes
checking for tk.h... no
configure: error: *** Unable to locate Tk includes.

I had similar problems trying to compile wxWidgets. I was getting a similar message regarding Gtk+, which is installed under /usr/include. In that case I successfully got around it by compiling wxWidgets with
the x11 option.

Any ideas?
 
Old 10-16-2007, 06:07 PM   #6
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
Tk creates a shell script containing installation information that is used by other packages. The script is called tkConfig.sh. Mine are installed in /usr/lib and /usr/lib64. Sometimes a package needs to be told where to look for this script. Generally packages that do or may use Tcl or Tk have a configure option to point to the configure script. For example, the configure script for R needs to be passed --with-tk-config=/usr/lib/tkConfig.sh or it won't find the tk stuff. Take a look at the output of ./configure --help to see if there is a similar option for the package(s) you're trying to install.
 
Old 10-17-2007, 04:18 PM   #7
cbabbage
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Original Poster
Rep: Reputation: 0
The procedure above didn't fix the problem, however using the --help option on configure, which I hadn't been aware of before, has opened up several lines of enquiry. I think the problem is with the way Tcl Tk has been installed. The configure script is looking for a single TclTk directory whereas I have Tcl and Tk in two different directories because that's how they installed from the Ubuntu disk.
My plan at this stage is to uninstall Tcl Tk, get hold of the source code and work on the problem from that angle.
 
Old 10-17-2007, 04:49 PM   #8
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
What, exactly, are you trying to install?
 
Old 10-17-2007, 05:51 PM   #9
cbabbage
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Original Poster
Rep: Reputation: 0
I'm trying to install GRASS GIS.
 
Old 10-17-2007, 06:39 PM   #10
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
Too many dependencies that I don't want to install. But while I was poking around the GRASS GIS website, I saw that they have an Ubuntu package. Why not just install that?
 
Old 10-17-2007, 08:18 PM   #11
cbabbage
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Original Poster
Rep: Reputation: 0
Two reasons - my home computer isn't attached to the internet, and I'm trying to install software from source in order to learn about Linux. Getting the actual package up and running is less important than expanding my knowledge base.
 
Old 10-21-2007, 06:42 PM   #12
cbabbage
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Original Poster
Rep: Reputation: 0
Success! Reinstalling TclTk using the source package did the trick, though I'm not absolutely sure way. I now have GRASS GIS up and running.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
library path setting b123coder Linux - Software 1 04-25-2006 01:37 PM
Setting a different library path on compile brainlesspinkey Linux - Software 7 11-13-2005 05:42 PM
problems setting up PATH in ubuntu lemuel Linux - General 7 01-14-2005 11:51 PM
Include and library path problem sadeer Linux - Software 1 11-07-2002 02:35 AM
Setting $PATH to include /home at login?? smurphy Linux - General 3 08-08-2001 02:46 PM


All times are GMT -5. The time now is 01:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration