mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-22 13:33:52 +03:00
Added help to build crash and more debugging information
git-svn-id: http://svn.opennebula.org/one/trunk@107 3034c82b-c49b-4eb3-8279-a7acafdc01c0
This commit is contained in:
parent
03ab52f25b
commit
dd9b249ced
15
SConstruct
15
SConstruct
@ -69,8 +69,19 @@ if build_parsers=='yes':
|
||||
else:
|
||||
main_env.Append(parsers='no')
|
||||
|
||||
main_env.ParseConfig('share/scons/get_xmlrpc_config server')
|
||||
|
||||
try:
|
||||
main_env.ParseConfig('share/scons/get_xmlrpc_config server')
|
||||
except Exception, e:
|
||||
print ""
|
||||
print "Error searching for xmlrpc-c libraries. Please check this things:"
|
||||
print ""
|
||||
print " * You have installed development libraries for xmlrpc-c. One way to check"
|
||||
print " this is calling xmlrpc-c-config that is provided with the development"
|
||||
print " package."
|
||||
print " * Check that the version of xmlrpc-c is at least 1.06. You can do this also"
|
||||
print " calling:"
|
||||
print " $ xmlrpc-c-config --version"
|
||||
exit(-1)
|
||||
|
||||
# SCONS scripts to build
|
||||
build_scripts=[
|
||||
|
@ -92,11 +92,16 @@ TestCode={
|
||||
}
|
||||
|
||||
# Executes a command and discards stderr
|
||||
def exec_command(text)
|
||||
def exec_command(command)
|
||||
lambda {
|
||||
#STDERR.puts text
|
||||
text=`#{text} 2>/dev/null`
|
||||
text=`#{command} 2>/dev/null`
|
||||
text.gsub!("\n", " ")
|
||||
|
||||
STDERR.puts text.inspect
|
||||
|
||||
if $?!=0
|
||||
STDERR.puts " Error calling #{command}"
|
||||
nil
|
||||
else
|
||||
text
|
||||
@ -125,8 +130,8 @@ Configs=[
|
||||
# Configuration using xmlrpc-c-config
|
||||
{
|
||||
:description => "xmlrpc-c-config",
|
||||
:client => exec_command("xmlrpc-c-config c++2 client --libs"),
|
||||
:server => exec_command("xmlrpc-c-config c++2 abyss-server --libs")
|
||||
:client => exec_command("xmlrpc-c-config c++2 client --libs --cflags"),
|
||||
:server => exec_command("xmlrpc-c-config c++2 abyss-server --libs --cflags")
|
||||
},
|
||||
# Debian lenny
|
||||
{
|
||||
@ -135,9 +140,10 @@ Configs=[
|
||||
'xmlrpc_client', 'xmlrpc_client', 'xmlrpc', 'xmlrpc_util',
|
||||
'xmlrpc_xmlparse', 'xmlrpc_xmltok', 'xmlrpc_client++', 'xmlrpc++'
|
||||
]),
|
||||
:server => exec_command("xmlrpc-c-config c++2 abyss-server --libs"),
|
||||
:server => exec_command("xmlrpc-c-config c++2 abyss-server --libs --cflags"),
|
||||
},
|
||||
# Configuration for Mac OS X and Debian
|
||||
=begin
|
||||
{
|
||||
:description => "hardcoded libraries for Mac OS X (installed using port)",
|
||||
:server => flags_and_libs_array("-I/opt/local/include -L/opt/local/lib", [
|
||||
@ -159,7 +165,7 @@ Configs=[
|
||||
'wwwcore', 'wwwutils', 'm', 'md5'
|
||||
])
|
||||
},
|
||||
|
||||
=end
|
||||
# Example adding more custom libraries
|
||||
# {
|
||||
# :client => exec_command("xmlrpc-c-config client c++ --cflags --libs"),
|
||||
@ -170,7 +176,13 @@ Configs=[
|
||||
|
||||
# Compiles test code with given arguments
|
||||
def compile(file, args)
|
||||
command="g++ #{file} -o #{file}.out #{args} 1>/dev/null 2>/dev/null"
|
||||
logfile="#{file}.log"
|
||||
command="g++ #{file} -o #{file}.out #{args} 1>>#{logfile} 2>&1"
|
||||
|
||||
open(logfile, "w+") {|f|
|
||||
f.write(command)
|
||||
}
|
||||
|
||||
STDERR.puts command
|
||||
STDERR.puts ""
|
||||
out=system(command)
|
||||
|
Loading…
Reference in New Issue
Block a user