Jump to page: 1 2
Thread overview
[Issue 11114] New: Undefined symbols after merging dmd pull #2550
Sep 24, 2013
Denis Shelomovskij
Sep 24, 2013
Denis Shelomovskij
Sep 25, 2013
Kenji Hara
Sep 25, 2013
Denis Shelomovskij
Sep 25, 2013
Denis Shelomovskij
Sep 25, 2013
Kenji Hara
Sep 25, 2013
Denis Shelomovskij
Sep 27, 2013
Kenji Hara
Sep 27, 2013
Denis Shelomovskij
Oct 08, 2013
Walter Bright
Oct 08, 2013
Denis Shelomovskij
Oct 13, 2013
Walter Bright
Oct 14, 2013
Denis Shelomovskij
Oct 14, 2013
Walter Bright
Oct 14, 2013
Denis Shelomovskij
Oct 14, 2013
Walter Bright
Oct 15, 2013
Denis Shelomovskij
Oct 26, 2013
Walter Bright
Oct 26, 2013
Denis Shelomovskij
September 24, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11114

           Summary: Undefined symbols after merging dmd pull #2550
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: link-failure
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: verylonglogin.reg@gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-09-24 12:25:50 MSD ---
Merging dmd pull #2550 [1] (commit ba48d3e) causes "Symbol Undefined" linker errors for some templates.

The project builds fine before the pull. Application is in `levelling` package, other package are libs it is linked with. OPTLINK errors just after merging, symbols are demangled using VisualD:
----------
Debug\Levelling.obj(Levelling)
 Error 42: Symbol Undefined
_D6metaui8controls5panel54__T5PanelTC9levelling14LevFileManager14LevFileManagerZ5Panel6__ctorMFNfC6metaui8controls9container16ContainerControlAC6metaui8controls5panel54__T5PanelTC9levelling14LevFileManager14LevFileManagerZ5PanelXC6metaui8controls5panel54__T5PanelTC9levelling14LevFileManager14LevFileManagerZ5Panel
(@safe
metaui.controls.panel.Panel!(levelling.LevFileManager.LevFileManager).Panel
metaui.controls.panel.Panel!(levelling.LevFileManager.LevFileManager).Panel.__ctor(metaui.controls.container.ContainerControl,
metaui.controls.panel.Panel!(levelling.LevFileManager.LevFileManager).Panel[]...))
Debug\Levelling.obj(Levelling)
 Error 42: Symbol Undefined
_D6metaui8controls5panel54__T5PanelTC9levelling14LevFileManager14LevFileManagerZ5Panel6sourceMNgFNaNbNdNfZNgC9levelling14LevFileManager14LevFileManager
(metaui.controls.panel.Panel!(levelling.LevFileManager.LevFileManager).Panel.sourceinout(pure
nothrow @property @safe inout(levelling.LevFileManager.LevFileManager)
function()))
Debug\Levelling.obj(Levelling)
 Error 42: Symbol Undefined
_D6metaui8controls5panel54__T5PanelTC9levelling14LevFileManager14LevFileManagerZ5Panel6__ctorMFNaNfC6metaui8controls9container16ContainerControlZC6metaui8controls5panel54__T5PanelTC9levelling14LevFileManager14LevFileManagerZ5Panel
(pure @safe
metaui.controls.panel.Panel!(levelling.LevFileManager.LevFileManager).Panel
metaui.controls.panel.Panel!(levelling.LevFileManager.LevFileManager).Panel.__ctor(metaui.controls.container.ContainerControl))
Debug\Levelling.obj(Levelling)
 Error 42: Symbol Undefined
_D3std10functional28__T8unaryFunVAyaa4_74727565Z40__T8unaryFunTC4gtkd3gtk8controls6WidgetZ8unaryFunFNaNbNfC4gtkd3gtk8controls6WidgetZb
(pure nothrow @safe bool
std.functional.unaryFun!("true").unaryFun!(gtkd.gtk.controls.Widget).unaryFun(gtkd.gtk.controls.Widget))
Debug\Levelling.obj(Levelling)
 Error 42: Symbol Undefined
_D5unstd5casts95__T6upCastTC11levellingui6native10GTKContext10GTKContextTC11levellingui6panels7context7ContextZ6upCastFNaNbNdNfNgC11levellingui6panels7context7ContextZNgC11levellingui6native10GTKContext10GTKContext
(pure nothrow @property @safe inout(levellingui.native.GTKContext.GTKContext)
unstd.casts.upCast!(levellingui.native.GTKContext.GTKContext,
levellingui.panels.context.Context).upCast(inout(levellingui.panels.context.Context)))
Debug\Levelling.obj(Levelling)
 Error 42: Symbol Undefined
_D6metaui8controls5panel54__T5PanelTC9levelling14LevFileManager14LevFileManagerZ5Panel6sourceMFNdNfC9levelling14LevFileManager14LevFileManagerZv
(@property @safe void
metaui.controls.panel.Panel!(levelling.LevFileManager.LevFileManager).Panel.source(levelling.LevFileManager.LevFileManager))
Debug\Levelling.obj(Levelling)
 Error 42: Symbol Undefined
_D6metaui8controls5panel54__T5PanelTC9levelling14LevFileManager14LevFileManagerZ5Panel20setTypedSourceObjectMFNaNfC6ObjectZv
(pure @safe void
metaui.controls.panel.Panel!(levelling.LevFileManager.LevFileManager).Panel.setTypedSourceObject(Object))
--- errorlevel 7
----------
Also see Issue 10920 which looks similar but isn't a "regression" so I created a new one.


[1] https://github.com/D-Programming-Language/dmd/pull/2550

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 24, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11114



--- Comment #1 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-09-24 12:46:03 MSD ---
And the funny thing is: all libraries builds fine and works with latest HEAD. The only thing I have to build without the pull is the final executable.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 25, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11114



--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> 2013-09-24 19:38:22 PDT ---
Could you please post the reduced test case? Posting just only error messages cannot help for fixing the regression.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 25, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11114



--- Comment #3 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-09-25 10:44:17 MSD ---
(In reply to comment #2)
> Could you please post the reduced test case? Posting just only error messages cannot help for fixing the regression.

I'd post if I could. Sorry, but I doesn't look possible. Too much code and no obvious auto-reduction criteria. Maybe this will give some info:

Here is a module:
---
import document.interfaces;
import metaui.controls.panel;
import levelling.LevFileManager;

void f(Panel!IFileManager pnl1, Panel!LevFileManager pnl2)
{
    pnl1.addSubPanel(pnl2, fileMgr => cast(LevFileManager) fileMgr); // line A
    pnl2.source = null; // line B
}
---

There are other modules where these Panel!T templates are used. If line A is commented - project builds. If not but line B is commented we get 4 error:
----------
Debug\Levelling.obj(Levelling)
 Error 42: Symbol Undefined
_D6metaui8controls5panel54__T5PanelTC9levelling14LevFileManager14LevFileManagerZ5Panel6__ctorMFNfC6metaui8controls9container16ContainerControlAC6metaui8controls5panel54__T5PanelTC9levelling14LevFileManager14LevFileManagerZ5PanelXC6metaui8controls5panel54__T5PanelTC9levelling14LevFileManager14LevFileManagerZ5Panel
(@safe
metaui.controls.panel.Panel!(levelling.LevFileManager.LevFileManager).Panel
metaui.controls.panel.Panel!(levelling.LevFileManager.LevFileManager).Panel.__ctor(metaui.controls.container.ContainerControl,
metaui.controls.panel.Panel!(levelling.LevFileManager.LevFileManager).Panel[]...))
Debug\Levelling.obj(Levelling)
 Error 42: Symbol Undefined
_D6metaui8controls5panel54__T5PanelTC9levelling14LevFileManager14LevFileManagerZ5Panel6sourceMNgFNaNbNdNfZNgC9levelling14LevFileManager14LevFileManager
(metaui.controls.panel.Panel!(levelling.LevFileManager.LevFileManager).Panel.sourceinout(pure
nothrow @property @safe inout(levelling.LevFileManager.LevFileManager)
function()))
Debug\Levelling.obj(Levelling)
 Error 42: Symbol Undefined
_D6metaui8controls5panel54__T5PanelTC9levelling14LevFileManager14LevFileManagerZ5Panel6__ctorMFNaNfC6metaui8controls9container16ContainerControlZC6metaui8controls5panel54__T5PanelTC9levelling14LevFileManager14LevFileManagerZ5Panel
(pure @safe
metaui.controls.panel.Panel!(levelling.LevFileManager.LevFileManager).Panel
metaui.controls.panel.Panel!(levelling.LevFileManager.LevFileManager).Panel.__ctor(metaui.controls.container.ContainerControl))
Debug\Levelling.obj(Levelling)
 Error 42: Symbol Undefined
_D6metaui8controls5panel54__T5PanelTC9levelling14LevFileManager14LevFileManagerZ5Panel20setTypedSourceObjectMFNaNfC6ObjectZv
(pure @safe void
metaui.controls.panel.Panel!(levelling.LevFileManager.LevFileManager).Panel.setTypedSourceObject(Object))
--- errorlevel 4
----------

If line B is also uncommented we get one more error:
----------
...
Debug\Levelling.obj(Levelling)
 Error 42: Symbol Undefined
_D6metaui8controls5panel54__T5PanelTC9levelling14LevFileManager14LevFileManagerZ5Panel6sourceMFNdNfC9levelling14LevFileManager14LevFileManagerZv
(@property @safe void
metaui.controls.panel.Panel!(levelling.LevFileManager.LevFileManager).Panel.source(levelling.LevFileManager.LevFileManager))
Debug\Levelling.obj(Levelling)
...
--- errorlevel 5
----------

I can also provide remote access to my PC if someone needed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 25, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11114



--- Comment #4 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-09-25 11:19:48 MSD ---
OK. Sorry, I haven't checked issues and latest pulls. This looks like a dup of Issue 11069 and its fixing dmd pull (#2577 [1]) fixes all but one linker errors. The only rest error is:
----------
 Error 42: Symbol Undefined
_D5unstd5casts95__T6upCastTC11levellingui6native10GTKContext10GTKContextTC11levellingui6panels7context7ContextZ6upCastFNaNbNdNfNgC11levellingui6panels7context7ContextZNgC11levellingui6native10GTKContext10GTKContext
(pure nothrow @property @safe inout(levellingui.native.GTKContext.GTKContext)
unstd.casts.upCast!(levellingui.native.GTKContext.GTKContext,
levellingui.panels.context.Context).upCast(inout(levellingui.panels.context.Context)))
----------

So I'd say Issue 11069 isn't fully fixed.

[1] https://github.com/D-Programming-Language/dmd/pull/2577

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 25, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11114



--- Comment #5 from Kenji Hara <k.hara.pg@gmail.com> 2013-09-25 07:40:15 PDT ---
(In reply to comment #4)
> So I'd say Issue 11069 isn't fully fixed.

OK, I checked compiler code on desk, and found two suspicious code places.

Could you test this patch on git head (da3d2e6)?

 src/template.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/template.c b/src/template.c
index b7c58ca..a4f67f3 100644
--- a/src/template.c
+++ b/src/template.c
@@ -1122,10 +1122,8 @@ MATCH
TemplateDeclaration::deduceFunctionTemplateMatch(FuncDeclaration *f, Loc l
     paramsym->parent = scope->parent;
     Scope *paramscope = scope->push(paramsym);

-    paramscope->instantiatingModule = sc->instantiatingModule;
     Module *mi = sc->instantiatingModule ? sc->instantiatingModule :
sc->module;
-    if (!sc->instantiatingModule || sc->instantiatingModule->isRoot())
-        paramscope->instantiatingModule = mi;
+    paramscope->instantiatingModule = mi;

     paramscope->callsc = sc;
     paramscope->stc = 0;
@@ -2640,7 +2638,8 @@ FuncDeclaration
*TemplateDeclaration::doHeaderInstantiation(Scope *sc,
     ti->argsym = new ScopeDsymbol();
     ti->argsym->parent = scope->parent;
     scope = scope->push(ti->argsym);
-    scope->instantiatingModule = sc->instantiatingModule;
+    Module *mi = sc->instantiatingModule ? sc->instantiatingModule :
sc->module;
+    scope->instantiatingModule = mi;

     bool hasttp = false;

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 25, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11114



--- Comment #6 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-09-25 19:54:38 MSD ---
(In reply to comment #5)
> (In reply to comment #4)
> > So I'd say Issue 11069 isn't fully fixed.
> 
> OK, I checked compiler code on desk, and found two suspicious code places.
> 
> Could you test this patch on git head (da3d2e6)?

Thanks, but same failure occurs with the patch.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 27, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11114



--- Comment #7 from Kenji Hara <k.hara.pg@gmail.com> 2013-09-27 00:22:29 PDT ---
Issue 11127 is also a regression caused by pull #2550. For that, I opened: https://github.com/D-Programming-Language/dmd/pull/2590

Denis, may the pull #2590 fix your link-failure?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 27, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11114



--- Comment #8 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-09-27 11:55:22 MSD ---
(In reply to comment #7)
> Issue 11127 is also a regression caused by pull #2550. For that, I opened: https://github.com/D-Programming-Language/dmd/pull/2590
> 
> Denis, may the pull #2590 fix your link-failure?

Thanks but negative again.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 08, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11114


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com


--- Comment #9 from Walter Bright <bugzilla@digitalmars.com> 2013-10-08 02:15:32 PDT ---
Denis, we're going to need some more help with this, i.e. code we can compile that duplicates the error.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
« First   ‹ Prev
1 2