Salut à tous,
J'essaye de compiler
gaia ( un espece de google earth mais avec support du gps ). Le problème est qu'il utilise
scons à la place des makefiles.
Pour compiler, j'ai besoin de certaines librairies :
Je les ai bien installé ( via yum ) et j'ai vérifié la présence des fichiers d'en tetes.
Mais quand je lance scons :
[laurent@localhost gaia-0.1.2]$ scons
scons: Reading SConscript files ...
Compiling for Unix/Posix/Linux
Checking for C header file curl/curl.h... yes
Checking for C header file SDL.h... yes
Checking for C header file GL/gl.h... yes
Checking for C header file jpeglib.h... yes
Checking for C header file png.h... yes
Checking for main() in C library curl... no
You need to install libcurl development libraries
Checking for main() in C library jpeg... no
You need to install jpeg development libraries
Checking for main() in C library png... no
You need to install png development libraries
Il ne doit pas savoir où trouver les bons fichiers. Scons utilise des scripts python. Je vous poste le script Sconstruct ( utilisé pas scons pour la construction ) :
#!/bin/env python
import os
import sys
version="0.1.2"
#######################################
# OPTIONS
#######################################
opts = Options(ARGUMENTS)
# conditionally build parts of gaia
#opts.Add(BoolOption('gaia', 'Compile gaia OpenGL client', 1));
# conditional features
opts.Add(BoolOption('gpsd', 'Compile with gpsd support (libgps)', 0));
opts.Add(BoolOption('extras', 'Compile examples and tests', 0));
opts.Add(BoolOption('use_env', 'Use environment variables (CC, CXX, CCFLAGS, CXXFLAGS, CPPPATH, LIBPATH)', 0));
# paths
opts.Add(('prefix', 'Install prefix', ''));
opts.Add(('bindir', 'Path (relative to prefix) where to install executables to (default bin)', 'bin'));
opts.Add(('datadir', 'Path (relative to prefix) where to install read-only data to (default share/gaia)', 'share/gaia'));
#######################################
# ENVIRONMENT & SYSTEM_SPECIFIC CONFIGURATION
#######################################
env = Environment( options = opts )
if env['prefix'] == "":
env['prefix'] = '.'
env['bindir'] = '.'
env['datadir'] = 'data'
SConsignFile()
if not env.GetOption('clean'):
if sys.platform.startswith('freebsd'):
print "Compiling for FreeBSD"
env.Append(CPPPATH = [ '/usr/local/include', '/usr/X11R6/include' ])
env.Append(LIBPATH = [ '/usr/local/lib', '/usr/X11R6/lib' ])
elif sys.platform == 'openbsd':
# TODO: confirm that sys.platform == 'openbsd' for OpenBSD (feedback welcome)
print "Compiling for OpenBSD"
env.Append(CPPPATH = [ '/usr/local/include', '/usr/X11R6/include' ])
env.Append(LIBPATH = [ '/usr/local/lib', '/usr/X11R6/lib' ])
elif sys.platform == 'darwin':
print "Compiling for MacOSX"
env.Append(CPPPATH = [ '/usr/local/include', '/usr/X11R6/include', '/opt/local/include', '/sw/include' ])
env.Append(LIBPATH = [ '/usr/local/lib', '/usr/X11R6/lib', '/opt/local/lib', '/sw/lib' ])
else:
print "Compiling for Unix/Posix/Linux"
env.Append(CPPPATH = [ '/usr/local/include', '/usr/X11R6/include' ])
env.Append(LIBPATH = [ '/usr/local/lib', '/usr/X11R6/lib' ])
if int(env['use_env']):
for key in ['CC', 'CCFLAGS', 'CXX', 'CXXFLAGS', 'CPPPATH', 'LIBPATH' ]:
if os.environ.has_key(key):
env.Replace( **{key: os.environ[key].split(' ')} )
env.Append(CCFLAGS = [ '-DGAIA_VERSION="\\"' + version + '\\""' ])
env.Append(CXXFLAGS = [ '-DGAIA_VERSION="\\"' + version + '\\""' ])
env.Append(CCFLAGS = [ '-Wall', '-g' ], CXXFLAGS = [ '-Wall', '-g' ])
#######################################
# CHECKS
#######################################
#######################################
# TARGETS
#######################################
libwwfetch = SConscript('lib/wwfetch/SConscript', exports = ['env'])
SConscript('programs/gaia/SConscript', exports = ['env', 'libwwfetch'])
if env['prefix'] != ".":
env.Alias('install', env['prefix'])
Ca doit pouvoir se modifier mais là c'est trop ardu pour moi. Si quelqu'un pouvait m'aider...