[Scons-dev] Fwd: [serf-dev] [Patch] Shared library failure in Solaris

rupert.thurner at gmail.com rupert.thurner at gmail.com
Tue Dec 24 07:32:34 EST 2013



On Tuesday, December 24, 2013 1:31:15 PM UTC+1, rupert.... at gmail.com wrote:

>

>

> On Wednesday, September 4, 2013 10:08:30 PM UTC+2, lgo wrote:

>>

>> Hi Alexander,

>>

>> On Fri, Aug 30, 2013 at 2:45 PM, Alexander Thomas

>> <kca.al... at gmail.com> wrote:

>> >

>> > SConstruct is fails in sunos platforms while building shared library in

>> > sunos platforms with "IndexError: list index out of range:" error.

>> > Seems to be the problem with scons where its not handling 'sunos'. I'm

>> > attaching a patch here. This issue can be reproduced in any platforms

>> > by modifying Sconstruct file with

>> >

>> > env = Environment(variables=opts,

>> > tools=('default', 'textfile',),

>> > CPPPATH=['.', ],

>> > platform='sunos',

>> > )

>>

>> I get the same error when I apply this change, haven't tested on Solaris

>> yet.

>>

>> > [[[

>> > Fixes SConstruct failure while creating SharedLibrary

>> > in 'sunos' platforms with SCons Version 2.3.0.

>> >

>> > * SConstruct: Environment resets to 'posix', if 'sunos' platform.

>> > ]]]

>> >

>>

>> Patch inlined for easier review:

>> > Index: SConstruct

>> > ===================================================================

>> > --- SConstruct (revision 2151)

>> > +++ SConstruct (working copy)

>> > @@ -246,6 +246,7 @@

>> >

>> > if sys.platform == 'sunos5':

>> > env.Append(LIBS='m')

>> > + env['PLATFORM'] = 'posix'

>> > else:

>> > # Warning level 4, no unused argument warnings

>> > env.Append(CCFLAGS=['/W4', '/wd4100'])

>>

>> I think this is the wrong approach to fix the issue.

>>

>> Scons internally knows about the 'sunos' platform (it's translated

>> from 'sunos5' in platform_default() ). If you set the PLATFORM

>> environment variable to 'posix', all sunos specific scons code will

>> not be triggered anymore.

>> That may or may not turn into real problems, I don't know for sure.

>>

>> I think this should be fixed in SCons. There seem to be a few places

>> in the scons code related to versioned shared libraries where it only

>> checks for 'posix', not for 'sunos':

>> * engine/SCons/Tool/install.py - versionedLibVersion()

>> * engine/SCons/Tool/link.py - shlib_emitter_names()

>>

>> Do you agree? Are you willing to bring this to the scons mailing list?

>>

>

> building serf-1.3.3 on solaris still gives the same error. i brought it to

> the scons-dev mailing list, but unfortunately there was no answer:

> http://two.pairlist.net/pipermail/scons-dev/2013-September/000893.html

> (therefor i'm crossposting it there as well ... the original is on

> https://groups.google.com/forum/#!searchin/serf-dev/solaris/serf-dev/Miv9nqTg3g0/aQM9LPL3qGIJ

> )

>

> what do you suggest, except merry christmas of course :)

>

>

> rupert.

>

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20131224/60e3c75c/attachment.html>


More information about the Scons-dev mailing list