Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

undefined reference to `_d_arrayliteralTX' (Tango trunk w/ dmd 1.067)

Moderators: kris

Posted: 05/01/11 21:11:30

Parts of array creation seems to be broken.

auto values = [ 1, 2, 3 ];

yields the following error:

src/test.d:(.text._Dmain+0x16): undefined reference to `_d_arrayliteralTX'

GregorianCalender? can't be linked because of that.

auto values = new int [ 1, 2, 3 ]; works though.

Author Message

Posted: 05/02/11 19:05:04 -- Modified: 05/02/11 20:04:53 by
larsivi

Hi ArKay,

trunk has not been updated for DMD 1.067's breaking changes yet. However, if you look in branches/dmd-1.067/ you should find a version that looks better. Please test it, it will probably be merged soon.

Posted: 05/04/11 18:55:08

The build tool doesn't like me.

arkay@desktop:~/Downloads/dmd/tango/dmd-1.067> mkdir output
arkay@desktop:~/Downloads/dmd/tango/dmd-1.067> cd output/
arkay@desktop:~/Downloads/dmd/tango/dmd-1.067/output> ../build/bin/linux32/bob -vu -r=dmd -c=dmd -p=linux ..
tango.core.Exception.AssertException@build/src/bob.d(686): FileFilter.exclude: Path does not exist: tango/sys/win32
arkay@desktop:~/Downloads/dmd/tango/dmd-1.067/output> ../build/bin/linux32/bob -vu -r=dmd -c=dmd -p=linux ~/Downloads/dmd/tango/dmd-1.067/
tango.core.Exception.AssertException@build/src/bob.d(686): FileFilter.exclude: Path does not exist: tango/sys/win32

If I compile in the branch directory (kinda messy IMHO, I'd rather have an output directory) I get another error:

arkay@desktop:~/Downloads/dmd/tango/dmd-1.067> ./build/bin/linux32/bob -vu -r=dmd -c=dmd -p=linux .
...
dmd -c -I./tango/core -I. -I./tango/core/vendor -release -oftango-util-cipher-XTEA-release.o ./tango/util/cipher/XTEA.d 
dmd -c -I./tango/core -I. -I./tango/core/vendor -release -oftango-util-cipher-Salsa20-release.o ./tango/util/cipher/Salsa20.d 
tango-core-rt-compiler-dmd-monitor-release.o ./tango/core/rt/compiler/dmd/monitor.c 
tango.sys.Process.ProcessCreateException: Could not create process for tango-core-rt-compiler-dmd-monitor-release.o : No such file or directory

Posted: 05/05/11 16:55:02 -- Modified: 05/05/11 16:59:32 by
ArKay

Can't build bob with a broken tango lib...

arkay@desktop:~/Downloads/dmd/tango/dmd-1.067/build/src> dmd bob.d 
/opt/dmd/bin/../lib32/libtango.a(tango-sys-Process-release.o): In function `_D5tango3sys7Process7Process4argsMFAaAAaXAAa':
../tango/sys/Process.d:(.text._D5tango3sys7Process7Process4argsMFAaAAaXAAa+0x1b): undefined reference to `_d_arrayliteralTX'
/opt/dmd/bin/../lib32/libtango.a(tango-sys-Process-release.o): In function `_D5tango3sys7Process7Process7executeMFAaAAaXv':
../tango/sys/Process.d:(.text._D5tango3sys7Process7Process7executeMFAaAAaXv+0x1b): undefined reference to `_d_arrayliteralTX'
collect2: ld returned 1 exit status
--- errorlevel 1

but I guess that the error can be found in line 166:

                if (args.march.length)
                {
                    march = " -m" ~ args.march;
                    gcc = args.march == "64" ? gcc64 : gcc32;
                }

Since I didn't spot a default for args.march gcc should probably be set to gcc32.

                if (args.march.length)
                {
                    march = " -m" ~ args.march;
                    gcc = args.march == "64" ? gcc64 : gcc32;
                } else {
                    march = " -m32";
                    gcc = gcc32;
                }

With -m=32 added the build process works.

Cheers, Rainer

Posted: 05/05/11 17:56:59

New breakage (worked before) :(

response = IServletResponse (mango)

response.setStatus(HttpResponses.OK);

src/httpserver.d(118): Error: cannot modify final variable 'OK'
response.sendError(HttpResponses.NotFound);

src/ServletHandler.d(37): Error: cannot modify final variable 'NotFound'
private static const HashMap!(char[], MethodServlet) handlers;

/opt/dmd/bin/../import/tango/util/container/HashMap.d(155): Error: function tango.util.container.HashMap.HashMap!(char[],MethodServlet).HashMap.Iterator.opApply (int delegate(ref char[] key, ref MethodServlet value)) does not match parameter types (_error_ delegate(ref char[] k, ref MethodServlet v))
/opt/dmd/bin/../import/tango/util/container/HashMap.d(155): Error: cannot implicitly convert expression (__dgliteral171) of type _error_ delegate(ref char[] k, ref MethodServlet v) to int delegate(ref char[] key, ref MethodServlet value)

Also, am I imagining things or are final & const swapped? If I define a static variable as final I won't be able to initialize it in the static constructor. If I set it to const it works. Shouldn't that be the other way around?

Posted: 05/05/11 18:06:32

I've created a ticket with a patch for the bob issue: http://dsource.org/projects/tango/ticket/2049