[Scons-users] missing platforms (aix, hpux, etc.) in shlib_emitter_names
Malek,Christophe [CMC]
Christophe.Malek at ec.gc.ca
Thu Aug 6 11:17:35 EDT 2015
Hi Bill,
This fix definitely works for xlc, I haven't tried for gcc but I wouldn't be surprised if it worked for that too.
- Chris
From: Scons-users [mailto:scons-users-bounces at scons.org] On Behalf Of Bill Deegan
Sent: 05 August, 2015 15:21
To: SCons users mailing list
Subject: Re: [Scons-users] missing platforms (aix, hpux,etc.) in shlib_emitter_names
Chris,
Will this only work if you use gcc on aix, or also work with xlc?
-Bill
On Wed, Aug 5, 2015 at 11:55 AM, Malek,Christophe [CMC] <Christophe.Malek at ec.gc.ca> wrote:
Hi Scons devs,
Hopefully, providing you with a small fix... :)
I am trying to compile Subversoin on AIX from source and noticed that you are missing platform checks for several platforms in shlib_emitter_names in SCons/Tool/link.py. I am using the latest version 2.3.6 of SCons but an old version of Python (sorry).
The result is the following exception:
scons: Reading SConscript files ...
IndexError: list index out of range:
File "/ssm/net/cmda/thirdparty/15.2-rc1/subversion_1819_aix-7.1-ppc7-64/serf-1.3.8/SConstruct", line 275:
lib_shared = env.SharedLibrary(LIBNAME, SOURCES + SHARED_SOURCES)
File "/ssm/net/cmda/thirdparty/15.2-rc1/subversion_1819_aix-7.1-ppc7-64/lib/python2.6/site-packages/SCons/Environment.py", line 260:
return MethodWrapper.__call__(self, target, source, *args, **kw)
File "/ssm/net/cmda/thirdparty/15.2-rc1/subversion_1819_aix-7.1-ppc7-64/lib/python2.6/site-packages/SCons/Environment.py", line 224:
return self.method(*nargs, **kwargs)
File "/ssm/net/cmda/thirdparty/15.2-rc1/subversion_1819_aix-7.1-ppc7-64/lib/python2.6/site-packages/SCons/Builder.py", line 631:
return self._execute(env, target, source, OverrideWarner(kw), ekw)
File "/ssm/net/cmda/thirdparty/15.2-rc1/subversion_1819_aix-7.1-ppc7-64/lib/python2.6/site-packages/SCons/Builder.py", line 552:
tlist, slist = self._create_nodes(env, target, source)
File "/ssm/net/cmda/thirdparty/15.2-rc1/subversion_1819_aix-7.1-ppc7-64/lib/python2.6/site-packages/SCons/Builder.py", line 516:
target, source = self.emitter(target=tlist, source=slist, env=env)
File "/ssm/net/cmda/thirdparty/15.2-rc1/subversion_1819_aix-7.1-ppc7-64/lib/python2.6/site-packages/SCons/Builder.py", line 342:
target, source = e(target, source, env)
File "/ssm/net/cmda/thirdparty/15.2-rc1/subversion_1819_aix-7.1-ppc7-64/lib/python2.6/site-packages/SCons/Tool/link.py", line 87:
target[0].attributes.shlibname = version_names[0]
Traceback (most recent call last):
File "/ssm/net/env/master/ssm_10.9_all/lib/ssm.d/python/ssm/package.py", line 233, in install
self.execute_script("post-install")
File "/ssm/net/env/master/ssm_10.9_all/lib/ssm.d/python/ssm/package.py", line 191, in execute_script
raise Exception("error: execute script failed")
Exception: error: execute script failed
because the version_names variable remains empty after the call to shlib_emitter_names.
The fix appears to be very simple, as I believe you only need to add the additional platform to line 113 in link.py:
if platform == 'posix' or platform == 'sunos' or platform == 'aix':
etc.
At least this change appears to work for me.
It might also be nice if you included an "else" condition to the platform check and throw a better exception when the platform isn't found.
Hope this helps!
- Chris
_______________________________________________
Scons-users mailing list
Scons-users at scons.org
https://pairlist4.pair.net/mailman/listinfo/scons-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150806/9a7c5dd8/attachment-0001.html>
More information about the Scons-users
mailing list