LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-23-2007, 03:17 PM   #1
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Rep: Reputation: 45
Installed dependency not found - scons related


Code:
[root:/usr/src/linuxdcpp#] scons
scons: Reading SConscript files ...
Checking for g++ >= 3.4...ok
Checking for pkg-config... ok
Checking for gtk+-2.0 >= 2.6... failed
        gtk+ >= 2.6 not found.
        Note: You might have the lib but not the headers
Code:
[root:/usr/src/linuxdcpp#] yum list | grep gtk2
gtk2.i386                                2.10.8-1.fc6           installed
gtk2.x86_64                              2.10.8-1.fc6           installed
gtk2-devel.i386                          2.10.8-1.fc6           installed
gtk2-devel.x86_64                        2.10.8-1.fc6           installed
gtk2-engines.x86_64                      2.8.0-1.fc6            installed
gtk2-engines.i386                        2.8.0-1.fc6            installed
pygtk2.x86_64                            2.10.3-4.fc6           installed
pygtk2-codegen.x86_64                    2.10.3-4.fc6           installed
pygtk2-devel.i386                        2.10.3-4.fc6           installed
pygtk2-devel.x86_64                      2.10.3-4.fc6           installed
pygtk2-libglade.x86_64                   2.10.3-4.fc6           installed
ghc-gtk2hs.x86_64                        0.9.10.2-0.1.fc6       extras
ghc642-gtk2hs.x86_64                     0.9.10-4.fc6           extras
ghc642-gtk2hs-mozembed.x86_64            0.9.10-4.fc6           extras
ghc66-gtk2hs.x86_64                      0.9.10.2-0.1.fc6       extras
ghc66-gtk2hs-mozembed.x86_64             0.9.10.2-0.1.fc6       extras
gtk2hs-doc.x86_64                        0.9.10.2-0.1.fc6       extras
libswt3-gtk2.i386                        1:3.2.2-1.fc6          updates
libswt3-gtk2.x86_64                      1:3.2.2-1.fc6          updates
pygtk2.x86_64                            2.10.4-1.fc6           updates
pygtk2-codegen.x86_64                    2.10.4-1.fc6           updates
pygtk2-devel.i386                        2.10.4-1.fc6           updates
pygtk2-devel.x86_64                      2.10.4-1.fc6           updates
pygtk2-libglade.x86_64                   2.10.4-1.fc6           updates
uim-gtk2.x86_64                          1.3.0-1.fc6            extras
Am I missing something about the error related to gtk? The system is FC6 x86_64.
 
Old 02-23-2007, 03:17 PM   #2
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
Here is Sconstruct

Code:
# -*- coding: utf-8 -*-

import os
import commands
import string

EnsureSConsVersion(0, 96)


# ----------------------------------------------------------------------
# Function definitions
# ----------------------------------------------------------------------

def CheckPKGConfig(context):
	context.Message('Checking for pkg-config... ')
	ret = context.TryAction('pkg-config --version')[0]
	context.Result(ret)
	return ret

def CheckPKG(context, name):
	context.Message('Checking for %s... ' % name)
	ret = context.TryAction('pkg-config --exists \'%s\'' % name)[0]
	context.Result(ret)
	return ret

def CheckCXXVersion(context, name, major, minor):
	context.Message('Checking for %s >= %d.%d...' % (name, major, minor))
	ret = commands.getoutput('%s -dumpversion' % name)

	retval = 0
	try:
		if ((string.atoi(ret[0]) == major and string.atoi(ret[2]) >= minor)
		or (string.atoi(ret[0]) > major)):
			retval = 1
	except ValueError:
		print "No C++ compiler found!"

	context.Result(retval)
	return retval

def CheckIconv(context):
	context.Message('Checking iconv... ')
	t = """
#include <iconv.h>
int main() { size_t r = iconv(0, (%s)0, 0, (char**)0, 0); return 0; }
"""
	ret = context.TryCompile(t % 'const char **' , '.cc')

	if ret:
		env['ICONV_CONST']='const'
	else:
		env['ICONV_CONST']=''
		ret = context.TryCompile(t % 'char **', '.cc')

	context.Result(ret)
	return ret

# ----------------------------------------------------------------------
# Command-line options
# ----------------------------------------------------------------------

# Parameters are only sticky from scons -> scons install, otherwise they're cleared.
if 'install' in COMMAND_LINE_TARGETS:
	opts = Options('build/sconf/scache.conf')
else:
	opts = Options()

opts.AddOptions(
	BoolOption('debug', 'Compile the program with debug information', 0),
	BoolOption('release', 'Compile the program with optimizations', 0),
	BoolOption('profile', 'Compile the program with profiling information', 0),
	PathOption('PREFIX', 'Compile the program with PREFIX as the root for installation', '/usr/local'),
	('FAKE_ROOT', 'Make scons install linuxdcpp under a fake root (for gentoo ebuilds)', '')
)


# ----------------------------------------------------------------------
# Initialization
# ----------------------------------------------------------------------

env = Environment(ENV = os.environ, options = opts)

conf = Configure(env,
	custom_tests =
	{
		'CheckPKGConfig' : CheckPKGConfig,
		'CheckPKG' : CheckPKG,
		'CheckCXXVersion' : CheckCXXVersion,
		'CheckIconv' : CheckIconv
	},
	conf_dir = 'build/sconf',
	log_file = 'build/sconf/config.log')

if os.environ.has_key('CXX'):
	env['CXX'] = os.environ['CXX']

if os.environ.has_key('CXXFLAGS'):
	env['CXXFLAGS'] = os.environ['CXXFLAGS'].split()

env.SConsignFile('build/sconf/.sconsign')
opts.Save('build/sconf/scache.conf', env)
Help(opts.GenerateHelpText(env))


# ----------------------------------------------------------------------
# Dependencies
# ----------------------------------------------------------------------

if not 'install' in COMMAND_LINE_TARGETS:

	if not (env.has_key('CXX') and env['CXX']):
		print 'CXX env variable is not set, attempting to use g++'
		env['CXX'] = 'g++'

	if not conf.CheckCXXVersion(env['CXX'], 3, 4):
		print 'Compiler version check failed. g++ 3.4 or later is needed'
		Exit(1)

	if not conf.CheckPKGConfig():
		print '\tpkg-config not found.'
		Exit(1)

	if not conf.CheckPKG('gtk+-2.0 >= 2.6'):
		print '\tgtk+ >= 2.6 not found.'
		print '\tNote: You might have the lib but not the headers'
		Exit(1)

	if not conf.CheckPKG('gthread-2.0 >= 2.4'):
		print '\tgthread >= 2.4 not found.'
		print '\tNote: You might have the lib but not the headers'
		Exit(1)

	if not conf.CheckPKG('libglade-2.0 >= 2.4'):
		print '\tlibglade-2.0 >= 2.4 not found.'
		print '\tNote: You might have the lib but not the headers'
		Exit(1)

	if not conf.CheckHeader('time.h'):
		print '\tHeader file time.h not found'
		Exit(1)

	if not conf.CheckHeader('signal.h'):
		print '\tHeader file signal.h not found'
		Exit(1)

	if not conf.CheckHeader('unistd.h'):
		print '\tHeader file unistd.h not found'
		Exit(1)

	if not conf.CheckLibWithHeader('pthread', 'pthread.h', 'c'):
		print '\tpthread library not found'
		print '\tNote: You might have the lib but not the headers'
		Exit(1)

	if not conf.CheckLibWithHeader('z', 'zlib.h', 'c'):
		print '\tz library (gzip/z compression) not found'
		print '\tNote: You might have the lib but not the headers'
		Exit(1)

	if not conf.CheckLibWithHeader('bz2', 'bzlib.h', 'c'):
		print '\tbz2 library (bz2 compression) not found'
		print '\tNote: You might have the lib but not the headers'
		Exit(1)

	if not conf.CheckLibWithHeader('ssl', 'openssl/ssl.h', 'c'):
		print '\tOpenSSL library (libssl) not found'
		print '\tNote: You might have the lib but not the headers'
		Exit(1)

	if not conf.CheckIconv():
		print '\tEither unable to find iconv.h or'
		print '\tcould not determine if iconv() uses const or not'
		Exit(1)

	env = conf.Finish()


# ----------------------------------------------------------------------
# Compile and link flags
# ----------------------------------------------------------------------

	env.Append(CXXFLAGS = Split('-I. -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64'))
	env.Append(LINKFLAGS = ['-Wl,--as-needed'])

	if env.has_key('ICONV_CONST') and env['ICONV_CONST']:
		env.Append(CXXFLAGS = '-DICONV_CONST=' + env['ICONV_CONST'])

	if env.has_key('debug') and env['debug']:
		env.Append(CXXFLAGS = Split('-g -ggdb -D_DEBUG -Wall'))
		env.Append(LINKFLAGS = Split('-g -ggdb -Wall'))

	if env.has_key('release') and env['release']:
		env.Append(CXXFLAGS = '-O3')

	if env.has_key('profile') and env['profile']:
		env.Append(CXXFLAGS = '-pg')
		env.Append(LINKFLAGS= '-pg')

	if env.has_key('PREFIX') and env['PREFIX']:
		env.Append(CXXFLAGS = '-D_DATADIR=\'\"' + env['PREFIX'] + '/share' + '\"\'')

	env.ParseConfig('pkg-config --libs libglade-2.0')
	env.ParseConfig('pkg-config --libs gthread-2.0')


# ----------------------------------------------------------------------
# Build
# ----------------------------------------------------------------------

	build = env.Program(target = 'linuxdcpp', source = [
		SConscript('client/SConstruct', exports='env', build_dir='build/client', duplicate=0),
		SConscript('linux/SConstruct', exports='env', build_dir='build/gui', duplicate=0)])
	Default(build)


# ----------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------

else:

	glade_files = [
		'glade/downloadqueue.glade',
		'glade/favoritehubs.glade',
		'glade/finishedtransfers.glade',
		'glade/hash.glade',
		'glade/hub.glade',
		'glade/mainwindow.glade',
		'glade/privatemessage.glade',
		'glade/publichubs.glade',
		'glade/search.glade',
		'glade/settingsdialog.glade',
		'glade/sharebrowser.glade']

	pixmap_files =	[
		'pixmaps/connect.png',
		'pixmaps/dc++.png',
		'pixmaps/dc++-fw.png',
		'pixmaps/dc++-fw-op.png',
		'pixmaps/dc++-op.png',
		'pixmaps/download.png',
		'pixmaps/favhubs.png',
		'pixmaps/FinishedDL.png',
		'pixmaps/FinishedUL.png',
		'pixmaps/hash.png',
		'pixmaps/linuxdcpp.png',
		'pixmaps/linuxdcpp-icon.png',
		'pixmaps/normal.png',
		'pixmaps/normal-fw.png',
		'pixmaps/normal-fw-op.png',
		'pixmaps/normal-op.png',
		'pixmaps/publichubs.png',
		'pixmaps/queue.png',
		'pixmaps/quit.png',
		'pixmaps/search.png',
		'pixmaps/settings.png',
		'pixmaps/upload.png']

	text_files = [
		'Changelog.txt',
		'Credits.txt',
		'License.txt',
		'Readme.txt']

	env.Alias('install', env.Install(dir = env['FAKE_ROOT'] + env['PREFIX'] + '/share/linuxdcpp/glade', source = glade_files))
	env.Alias('install', env.Install(dir = env['FAKE_ROOT'] + env['PREFIX'] + '/share/linuxdcpp/pixmaps', source = pixmap_files))
	env.Alias('install', env.Install(dir = env['FAKE_ROOT'] + env['PREFIX'] + '/share/doc/linuxdcpp', source = text_files))
	env.Alias('install', env.Install(dir = env['FAKE_ROOT'] + env['PREFIX'] + '/bin', source = 'linuxdcpp'))
 
Old 02-28-2007, 02:38 PM   #3
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
The problem was related to pango. So I installed pango and pango-devel and all was good after that.
 
  


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
Required dependency already installed agtlewis Linux - General 6 10-06-2005 04:48 PM
Eliminate dependency on gentoo from package installed from downloaded source aeruzcar Linux - Distributions 2 10-02-2005 12:50 PM
Says Failed dependency even when libpcap.so.0 installed. X-Unix Mandriva 2 09-13-2004 11:19 PM
libexif-gtk-0.3.3 dependency related error? resaguk Linux - Software 1 09-07-2004 07:49 AM
kernel panic, init related, found cause, but cant fix...help :) sirpelidor Linux - Software 7 12-24-2003 07:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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
Open Source Consulting | Domain Registration