[Scons-dev] Help debugging

Jean-Baptiste Lab jeanbaptiste.lab at gmail.com
Thu Sep 17 05:02:24 EDT 2015


Hi Paweł, Russel,

FYI, I've ran into the exact same issue as Russel when creating a
SharedLibrary using the dmd tool, which, to sum up, would cause the
SharedLibrary to always be relinked.
I'm not using versioning at all.
As you suggested, I gave you clone a go and the issue has gone away, so it
looks like you did fix this issue.

You can see my project here:

https://bitbucket.org/jbl/geany-plugin-d

When using scons v2.3.6, the SharedLibrary would always relink, when using
your clone, everything is as I expect it...

It is probably not a good test case for this (but hey, cheap publicity
right? :) ) due to the semi-complicated setup to get it to build, but I
guess I could create a minimal config that can be used to trigger the bug
if that helps ?

Cheers,

JB

Some logs:

jbl at jbl-mint:~/perso/scons2 (master) $ scons --version
SCons by Steven Knight et al.:
script: v2.3.6.rel_2.3.6:3354:b428880e51d2, 2015/08/31 12:54:01, by jbl on
jbl-mint
engine: v2.3.6.rel_2.3.6:3354:b428880e51d2, 2015/08/31 12:54:01, by jbl on
jbl-mint
engine path: ['/usr/local/lib/scons-2.3.6/SCons']
Copyright (c) 2001 - 2015 The SCons Foundation

jbl at jbl-mint:~/perso/geany-plugin-d (master) $ scons
scons: Reading SConscript files ...
Checking for pkg-config... (cached) yes
Checking for geany >= 1.20... (cached) yes
Checking for gtkd1 >= 1.7.4... (cached) yes
Checking for Geany ABI/API version <= 225... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
dmd -ofbuild/i386/release/libgeany-plugin-d.so
-L-L/usr/lib/x86_64-linux-gnu -L-L/usr/lib/i386-linux-gnu -L-l:libgtkd1.so
-L-l:libdl.so.2 -L--no-warn-search-mismatch -defaultlib=libphobos2.so
-L-zrelro -L-znow -m32 -shared -defaultlib=libphobos2.so
build/i386/release/config.o build/i386/release/geany.o
build/i386/release/ilog.o build/i386/release/plugin.o
scons: `build/i386/release/po' is up to date.
scons: done building targets.

^^^NOTICE THE LINK STEP

jbl at jbl-mint:~/perso/geany-plugin-d (master) $ scons
scons: Reading SConscript files ...
Checking for pkg-config... (cached) yes
Checking for geany >= 1.20... (cached) yes
Checking for gtkd1 >= 1.7.4... (cached) yes
Checking for Geany ABI/API version <= 225... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
dmd -ofbuild/i386/release/libgeany-plugin-d.so
-L-L/usr/lib/x86_64-linux-gnu -L-L/usr/lib/i386-linux-gnu -L-l:libgtkd1.so
-L-l:libdl.so.2 -L--no-warn-search-mismatch -defaultlib=libphobos2.so
-L-zrelro -L-znow -m32 -shared -defaultlib=libphobos2.so
build/i386/release/config.o build/i386/release/geany.o
build/i386/release/ilog.o build/i386/release/plugin.o
scons: `build/i386/release/po' is up to date.
scons: done building targets.

^^^NOTICE THE LINK STEP AGAIN

jbl at jbl-mint:~/perso/geany-plugin-d (master) $ cd ../scons2/

jbl at jbl-mint:~/perso/scons2 (master) $ python bootstrap.py -C
../geany-plugin-d/
/usr/bin/python /home/jbl/perso/scons2/bootstrap/src/script/scons.py
scons: Reading SConscript files ...
Checking for pkg-config... (cached) yes
Checking for geany >= 1.20... (cached) yes
Checking for gtkd1 >= 1.7.4... (cached) yes
Checking for Geany ABI/API version <= 225... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
dmd -ofbuild/i386/release/libgeany-plugin-d.so
-L-L/usr/lib/x86_64-linux-gnu -L-L/usr/lib/i386-linux-gnu -L-l:libgtkd1.so
-L-l:libdl.so.2 -L--no-warn-search-mismatch -defaultlib=libphobos2.so
-L-zrelro -L-znow -m32 -shared -defaultlib=libphobos2.so
build/i386/release/config.o build/i386/release/geany.o
build/i386/release/ilog.o build/i386/release/plugin.o
scons: `build/i386/release/po' is up to date.
scons: done building targets.

^^^THIS REBUILD IS PROBABLY DUE TO CHANGES IN YOUR CLONE

jbl at jbl-mint:~/perso/scons2 (master) $ python bootstrap.py -C
../geany-plugin-d/
/usr/bin/python /home/jbl/perso/scons2/bootstrap/src/script/scons.py
scons: Reading SConscript files ...
Checking for pkg-config... (cached) yes
Checking for geany >= 1.20... (cached) yes
Checking for gtkd1 >= 1.7.4... (cached) yes
Checking for Geany ABI/API version <= 225... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
scons: `build/i386/release/po' is up to date.
scons: `build/i386/release' is up to date.
scons: done building targets.
jbl at jbl-mint:~/perso/scons2 (master)

^^^ NO LINK STEP, AS EXPECTED


On 16 September 2015 at 23:17, Paweł Tomulik <ptomulik at meil.pw.edu.pl>
wrote:

> By the way,
>
> do you use SHLIBVERSION or so? If not, then the current code is broken
> also for non-versioned libraries, so maybe it could be good to merge
> PR#247 which fixes this?
>
>
> W dniu 16.09.2015 o 23:09, Paweł Tomulik pisze:
> > Russel,
> >
> > if you can sacrify 1 minute, you may clone
> > https://bitbucket.org/ptomulik/scons2 and see if it works for you
> > (python ~/path/to/cloned/scons2/src/script/scons.py).
> >
> >
> > Regards!
> >
> > W dniu 16.09.2015 o 21:32, William Blevins pisze:
> >> Russel,
> >>
> >> I looked into this at one point.  Please see some notes that I made
> >> here: http://scons.tigris.org/issues/show_bug.cgi?id=3006
> >>
> >> I can give you a better idea of the code area if you would like to
> >> investigate.  I know Pawell is already reworking he SharedLibrary code.
> >> It was not written well since flags were based on platform versus
> >> tool:
> https://bitbucket.org/scons/scons/pull-requests/247/new-versioned-libraries-gnulink-and/diff
> >>
> >> V/R,
> >> William
> >>
> >> On Wed, Sep 16, 2015 at 6:22 PM, Russel Winder <russel at winder.org.uk
> >> <mailto:russel at winder.org.uk>> wrote:
> >>
> >>     On Wed, 2015-09-16 at 07:03 -0400, Gary Oberbrunner wrote:
> >>     > --debug=explain might help, Russel.
> >>
> >>     Aha, a strong RTFM moment their :-)
> >>
> >>     OK so I do that and get:
> >>
> >>         scons: rebuilding `processAll_library_d.so' because the
> contents of
> >>         the build action changed
> >>                        action: SharedFlagChecker(target, source, env)
> >>                                VersionedSharedLibrary(target, source,
> env)
> >>
> >>     which leads to todays WTF moment! Absolutely nothing has changed on
> the
> >>     filestore or in the SConstruct file, so this must be in SCons
> itself,
> >>     most likely due to something in the D tool. Except that neither
> >>     SharedFlagChecker or VersionedSharedLibrary appear in any of the D-
> >>     related tools code.
> >>
> >>     VersionedSharedLibrary is in __init__.py, so I guess I have to go
> >>     there…
> >>
> >>     --
> >>     Russel.
> >>
>  =============================================================================
> >>     Dr Russel Winder      t: +44 20 7585 2200
> >>     <tel:%2B44%2020%207585%202200>   voip: sip:russel.winder at ekiga.net
> >>     <mailto:sip%3Arussel.winder at ekiga.net>
> >>     41 Buckmaster Road    m: +44 7770 465 077
> >>     <tel:%2B44%207770%20465%20077>   xmpp: russel at winder.org.uk
> >>     <mailto:russel at winder.org.uk>
> >>     London SW11 1EN, UK   w: www.russel.org.uk
> >>     <http://www.russel.org.uk>  skype: russel_winder
> >>
> >>
> >>     _______________________________________________
> >>     Scons-dev mailing list
> >>     Scons-dev at scons.org <mailto:Scons-dev at scons.org>
> >>     https://pairlist2.pair.net/mailman/listinfo/scons-dev
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> Scons-dev mailing list
> >> Scons-dev at scons.org
> >> https://pairlist2.pair.net/mailman/listinfo/scons-dev
> >>
> >
> >
>
>
> --
> Pawel Tomulik
> _______________________________________________
> Scons-dev mailing list
> Scons-dev at scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20150917/62dbc628/attachment.html>


More information about the Scons-dev mailing list