www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8605] New: rdmd aborts during link

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8605

           Summary: rdmd aborts during link
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: charleshixsn earthlink.net



18:19:24 PDT ---
Created an attachment (id=1142)
this is a pair of files that appear to compile with dmd, but not with rdmd, IF
the folder they are in is named Parser

This appears to only happen if the folder is named "Parser".  When I copied the
folder elsewhere the error disappeared.  It also doesn't seem to happen for
short cases.  So the only example case I can offer is around 500 lines long.
And dmd doesn't complain about the problem.  (OTOH, rdmd caught several actual
bugs that dmd didn't.)

Please note that this is a pair of files.  If the utils file is included in the
avl file, the error disappears.

The error message is:
charles mandala1:~/projects/D/Parser$ rdmd -unittest avl.d utils.d
/tmp/.rdmd-1000/rdmd-avl.d-EFC2A8F3F9817BAA59A3A00532D5696F/objs/avl.o: In
function `_D3avl3AVL6insertMFKC3avl3AVL4NodeKC3avl3AVL4NodeKbZC3avl3AVL4Node':
avl.d:(.text._D3avl3AVL6insertMFKC3avl3AVL4NodeKC3avl3AVL4NodeKbZC3avl3AVL4Node+0x10d):
undefined reference to `_D5utils10LogicError7__ClassZ'
avl.d:(.text._D3avl3AVL6insertMFKC3avl3AVL4NodeKC3avl3AVL4NodeKbZC3avl3AVL4Node+0x144):
undefined reference to
`_D5utils10LogicError6__ctorMFAyamC6object9ThrowableZC5utils10LogicError'
avl.d:(.text._D3avl3AVL6insertMFKC3avl3AVL4NodeKC3avl3AVL4NodeKbZC3avl3AVL4Node+0x273):
undefined reference to `_D5utils10LogicError7__ClassZ'
avl.d:(.text._D3avl3AVL6insertMFKC3avl3AVL4NodeKC3avl3AVL4NodeKbZC3avl3AVL4Node+0x2aa):
undefined reference to
`_D5utils10LogicError6__ctorMFAyamC6object9ThrowableZC5utils10LogicError'
/tmp/.rdmd-1000/rdmd-avl.d-EFC2A8F3F9817BAA59A3A00532D5696F/objs/avl.o: In
function `_D3avl3AVL10delLeftBalMFKC3avl3AVL4NodeKbZC3avl3AVL4Node':
avl.d:(.text._D3avl3AVL10delLeftBalMFKC3avl3AVL4NodeKbZC3avl3AVL4Node+0x13e):
undefined reference to `_D5utils10LogicError7__ClassZ'
avl.d:(.text._D3avl3AVL10delLeftBalMFKC3avl3AVL4NodeKbZC3avl3AVL4Node+0x175):
undefined reference to
`_D5utils10LogicError6__ctorMFAyamC6object9ThrowableZC5utils10LogicError'
avl.d:(.text._D3avl3AVL10delLeftBalMFKC3avl3AVL4NodeKbZC3avl3AVL4Node+0x230):
undefined reference to `_D5utils10LogicError7__ClassZ'
avl.d:(.text._D3avl3AVL10delLeftBalMFKC3avl3AVL4NodeKbZC3avl3AVL4Node+0x267):
undefined reference to
`_D5utils10LogicError6__ctorMFAyamC6object9ThrowableZC5utils10LogicError'
/tmp/.rdmd-1000/rdmd-avl.d-EFC2A8F3F9817BAA59A3A00532D5696F/objs/avl.o: In
function `_D3avl3AVL10delRghtBalMFKC3avl3AVL4NodeKbZC3avl3AVL4Node':
avl.d:(.text._D3avl3AVL10delRghtBalMFKC3avl3AVL4NodeKbZC3avl3AVL4Node+0x13e):
undefined reference to `_D5utils10LogicError7__ClassZ'
avl.d:(.text._D3avl3AVL10delRghtBalMFKC3avl3AVL4NodeKbZC3avl3AVL4Node+0x175):
undefined reference to
`_D5utils10LogicError6__ctorMFAyamC6object9ThrowableZC5utils10LogicError'
avl.d:(.text._D3avl3AVL10delRghtBalMFKC3avl3AVL4NodeKbZC3avl3AVL4Node+0x230):
undefined reference to `_D5utils10LogicError7__ClassZ'
avl.d:(.text._D3avl3AVL10delRghtBalMFKC3avl3AVL4NodeKbZC3avl3AVL4Node+0x267):
undefined reference to
`_D5utils10LogicError6__ctorMFAyamC6object9ThrowableZC5utils10LogicError'
collect2: ld returned 1 exit status
--- errorlevel 1

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 31 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8605


Charles Hixson <charleshixsn earthlink.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |charleshixsn earthlink.net



18:23:32 PDT ---
Sorry, nearly forgot this:
charles mandala1:~/projects/D/Parser$ dmd
DMD64 D Compiler v2.060
Copyright (c) 1999-2012 by Digital Mars written by Walter Bright
Documentation: http://www.dlang.org/index.html

And my computer is debian stable updated to 2012/08/30, with a couple of
additions from testing.  (Basically, if got a recent version of Vala installed.
 I think it was Vala that demanded a couple of libraries to be pulled from
testing.)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 31 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8605


Dmitry Olshansky <dmitry.olsh gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmitry.olsh gmail.com



02:50:38 PDT ---
Can't reproduce on Win32. Both files work with rdmd on their own or in Parser
folder. That might mean the bug is platform specific.

Also try --dry-run option it'll give you the commands rdmd tries to run.
You can then run them one by one until you hit the error.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 01 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8605


Vladimir Panteleev <thecybershadow gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |thecybershadow gmail.com
         Resolution|                            |INVALID



11:31:15 EET ---
I'm going to invoke my psychic powers and conclude that you have a file called
utils.di in the Parser directory.

rdmd currently assumes that if you're using .di files, the code for them will
be found in a library that's implicitly imported by your code (e.g. using
pragma(lib)).

I noticed that you tried to manually include utils.d in the compilation by
putting it on rdmd's command line:

 charles mandala1:~/projects/D/Parser$ rdmd -unittest avl.d utils.d
This is not how rdmd works - the first .d file is considered as your program's entry point, and all arguments after that as arguments to be passed to your program when executing it. rdmd looks at which files the compiler consults (output of dmd -v) to figure out which modules should be compiled. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 10 2013