You are not logged in.

#1 2019-11-04 13:36:36

de18
Member
Registered: 2019-11-04
Posts: 4

Not able to build package because of failed scons.script

When i try to install the software the message coming is build failed because-

==> Starting build()...
SCons import failed. Unable to find engine files in:
  /usr/lib/scons-3.1.1
  /usr/lib/scons-3.1.1
  /usr/local/lib/scons-3.1.1
  /usr/lib/python2.7/site-packages/scons-3.1.1
  /usr/lib/python2.7/site-packages/scons-3.1.1
  /usr/lib/scons-3.1.1
  /usr/lib/scons
  /usr/lib/scons
  /usr/local/lib/scons
  /usr/lib/python2.7/site-packages/scons
  /usr/lib/python2.7/site-packages/scons
  /usr/lib/scons
Traceback (most recent call last):
  File "/usr/bin/scons", line 195, in <module>
    import SCons.Script
ImportError: No module named SCons.Script

Pls help me what should i do.

Last edited by de18 (2019-11-05 01:49:10)

Offline

#2 2019-11-04 13:56:59

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,406

Re: Not able to build package because of failed scons.script

Please use [ code ] [ /code ] tags without spaces for posting command output.

What is "software" exactly?

Last edited by V1del (2019-11-04 13:57:21)

Offline

#3 2019-11-04 14:00:50

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,477

Re: Not able to build package because of failed scons.script

output of pacman -Qs scons ?

It looks like the package wants a python2 compatible scons which isn't available on archlinux.
Which software are you trying to install ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#4 2019-11-05 01:48:15

de18
Member
Registered: 2019-11-04
Posts: 4

Re: Not able to build package because of failed scons.script

Actually I want to install linuxdcpp which is in arch user repository but it is written in python 2,
So i have changed my python from python 3 to python 2.

https://aur.archlinux.org/packages/linuxdcpp/

Output of pacman -Qs scons is:-

 local/scons 3.1.1-3
    Extensible Python-based build utility

Pls help me what should I do to install it successfully.

Last edited by de18 (2019-11-05 01:50:57)

Offline

#5 2019-11-05 02:09:35

loqs
Member
Registered: 2014-03-06
Posts: 19,098

Re: Not able to build package because of failed scons.script

Did you try using the updated patch from the latest comment on the packages AUR page?
The build should then fail due to openssl-1.1 incompatibilities.  If you change the dependency to openssl-1.0 ,
a clean chroot build then completed on my system.

Last edited by loqs (2019-11-05 02:10:06)

Offline

#6 2019-11-05 17:07:21

de18
Member
Registered: 2019-11-04
Posts: 4

Re: Not able to build package because of failed scons.script

how to change dependencies to openssl-1.0?

Offline

#7 2019-11-05 17:12:08

loqs
Member
Registered: 2014-03-06
Posts: 19,098

Re: Not able to build package because of failed scons.script

PKGBUILD#depends
change the entry in the depends array from openssl to openssl-1.0
Edit:
git diff after applying patch,  updating checksum and changing depends

diff --git a/PKGBUILD b/PKGBUILD
index 4e7b7d9..4373aae 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,7 +10,7 @@ pkgdesc="A Gtk+ Direct Connect client based on DC++."
 url="https://launchpad.net/linuxdcpp/"
 license=('GPL')
 arch=('i686' 'x86_64')
-depends=('openssl' 'glib2' 'libglade' 'bzip2' 'libnotify' 'hicolor-icon-theme')
+depends=('openssl-1.0' 'glib2' 'libglade' 'bzip2' 'libnotify' 'hicolor-icon-theme')
 makedepends=('scons' 'boost')
 conflicts=('linuxdcpp-bzr')
 source=(
@@ -18,7 +18,7 @@ source=(
     "linuxdcpp-sconstruct.patch"
 )
 md5sums=('037de708bdb1e5dd7ac6c359b0e2c1a0'
-         '3e631a979470890481667be91cb69d10')
+         '6fd66e15eb104bed41a25309410e4ff9')
 
 prepare() {
   cd "$srcdir/$pkgname-$pkgver"
diff --git a/linuxdcpp-sconstruct.patch b/linuxdcpp-sconstruct.patch
index 6bf6172..ca4b939 100644
--- a/linuxdcpp-sconstruct.patch
+++ b/linuxdcpp-sconstruct.patch
@@ -1,6 +1,21 @@
-diff -ura --color linuxdcpp-1.1.0/SConstruct linuxdcpp-1.1.0-patched/SConstruct
---- linuxdcpp-1.1.0/SConstruct	2011-04-17 14:57:09.000000000 -0300
-+++ linuxdcpp-1.1.0-patched/SConstruct	2019-02-14 11:02:27.916181107 -0200
+--- ./SConstruct	2019-11-03 12:57:44.353847037 +0100
++++ ./SConstruct_patched	2019-11-03 13:01:20.744549187 +0100
+@@ -2,13 +2,13 @@
+ # -*- coding: utf-8 -*-
+ 
+ import os
+-import commands
++import subprocess
+ import string
+ 
+ try:
+ 	from bzrlib import branch
+ except ImportError:
+-	print "bzrlib not installed"
++	print("bzrlib not installed")
+ 
+ EnsureSConsVersion(0, 98, 1)
+ 
 @@ -18,8 +18,8 @@
  BUILD_LOCALE_PATH = BUILD_PATH + 'locale/'
  
@@ -12,12 +27,162 @@ diff -ura --color linuxdcpp-1.1.0/SConstruct linuxdcpp-1.1.0-patched/SConstruct
  	'release' : ['-O3', '-fomit-frame-pointer', '-DNDEBUG']
  }
  
-@@ -208,7 +208,7 @@
- 		print '\tNote: You might have the lib but not the headers'
+@@ -41,15 +41,15 @@
+ 
+ def check_cxx_version(context, name, major, minor):
+ 	context.Message('Checking for %s >= %d.%d...' % (name, major, minor))
+-	ret = commands.getoutput('%s -dumpversion' % name)
++	ret = subprocess.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)):
++		if ((int(ret[0]) == major and int(ret[2]) >= minor)
++		or (int(ret[0]) > major)):
+ 			retval = 1
+ 	except ValueError:
+-		print "No C++ compiler found!"
++		print("No C++ compiler found!")
+ 
+ 	context.Result(retval)
+ 	return retval
+@@ -62,7 +62,7 @@
+ 		b = branch.Branch.open('.')
+ 		revision = str(b.revno())
+ 	except:
+-		print "failed"
++		print("failed")
+ 
+ 	context.env['BZR_REVISION'] = revision
+ 	context.Result(revision)
+@@ -121,22 +121,22 @@
+ env['mode'] = 'debug' if env.get('debug') else 'release'
+ env['build_path'] = BUILD_PATH + env['mode'] + '/'
+ 
+-if os.environ.has_key('CXX'):
++if 'CXX' in os.environ:
+ 	env['CXX'] = os.environ['CXX']
+ else:
+-	print 'CXX env variable is not set, attempting to use g++'
++	print('CXX env variable is not set, attempting to use g++')
+ 	env['CXX'] = 'g++'
+ 
+-if os.environ.has_key('CC'):
++if 'CC' in os.environ:
+ 	env['CC'] = os.environ['CC']
+ 
+-if os.environ.has_key('CXXFLAGS'):
++if 'CXXFLAGS' in os.environ:
+ 	env['CPPFLAGS'] = env['CXXFLAGS'] = os.environ['CXXFLAGS'].split()
+ 
+-if os.environ.has_key('LDFLAGS'):
++if 'LDFLAGS' in os.environ:
+ 	env['LINKFLAGS'] = os.environ['LDFLAGS'].split()
+ 
+-if os.environ.has_key('CFLAGS'):
++if 'CFLAGS' in os.environ:
+ 	env['CFLAGS'] = os.environ['CFLAGS'].split()
+ 
+ env['CPPDEFINES'] = [] # Initialize as a list so Append doesn't concat strings
+@@ -186,32 +186,32 @@
+ if not 'install' in COMMAND_LINE_TARGETS:
+ 
+ 	if not conf.CheckCXXVersion(env['CXX'], 4, 1):
+-		print 'Compiler version check failed. g++ 4.1 or later is needed'
++		print('Compiler version check failed. g++ 4.1 or later is needed')
+ 		Exit(1)
+ 
+ 	if not conf.CheckPKGConfig():
+-		print '\tpkg-config not found.'
++		print('\tpkg-config not found.')
+ 		Exit(1)
+ 
+ 	if not conf.CheckPKG('gtk+-2.0 >= 2.12'):
+-		print '\tgtk+ >= 2.12 not found.'
+-		print '\tNote: You might have the lib but not the headers'
++		print('\tgtk+ >= 2.12 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'
++		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'
++		print('\tlibglade-2.0 >= 2.4 not found.')
++		print('\tNote: You might have the lib but not the headers')
  		Exit(1)
  
 -	
 +
  	if not conf.CheckCXXHeader('boost/version.hpp', '<>'):
- 		print '\tboost not found.'
- 		print '\tNote: You might have the lib but not the headers'
+-		print '\tboost not found.'
+-		print '\tNote: You might have the lib but not the headers'
++		print('\tboost not found.')
++		print('\tNote: You might have the lib but not the headers')
+ 		Exit(1)
+ 
+ 	if not conf.CheckHeader('time.h'):
+@@ -224,34 +224,34 @@
+ 		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'
++		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'
++		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'
++		print('\tbz2 library (bz2 compression) not found')
++		print('\tNote: You might have the lib but not the headers')
+ 		Exit(1)
+ 
+ 	# This needs to be before ssl check on *BSD systems
+ 	if not conf.CheckLib('crypto'):
+-		print '\tcrypto library not found'
+-		print '\tNote: This library may be a part of libssl on your system'
++		print('\tcrypto library not found')
++		print('\tNote: This library may be a part of libssl on your system')
+ 		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'
++		print('\tOpenSSL library (libssl) not found')
++		print('\tNote: You might have the lib but not the headers')
+ 		Exit(1)
+ 
+ 	# Needed for XFlush(). Headers shouldn't be needed since we include gdk/gdkx.h
+ 	if not conf.CheckLib('X11'):
+-		print '\tX11 library not found'
++		print('\tX11 library not found')
+ 		Exit(1)
+ 
+ 	if not conf.CheckHeader('iconv.h'):
+@@ -264,8 +264,8 @@
+ 
+ 	# TODO: Implement a plugin system so libnotify doesn't have compile-time dependencies
+ 	if not conf.CheckPKG('libnotify >= 0.4.1'):
+-		print '\tlibnotify >= 0.4.1 not found, disabling notifications.'
+-		print '\tNote: You might have the lib but not the headers'
++		print('\tlibnotify >= 0.4.1 not found, disabling notifications.')
++		print('\tNote: You might have the lib but not the headers')
+ 	else:
+ 		conf.env.Append(CPPDEFINES = 'HAVE_LIBNOTIFY')
+ 		conf.env.ParseConfig('pkg-config --libs libnotify')

Last edited by loqs (2019-11-05 17:16:54)

Offline

#8 2019-11-05 17:16:50

de18
Member
Registered: 2019-11-04
Posts: 4

Re: Not able to build package because of failed scons.script

Thanks to you all for the help.
The problem is solved. smile

Offline

Board footer

Powered by FluxBB