Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Ticket #420 (closed defect: wontfix)

Opened 2 years ago

Last modified 1 year ago

[Feature] dmd-backend 1.062

Reported by: bioinfornatics Assigned to: ChristianK
Priority: major Milestone:
Component: unspecified Version: hg tip
Keywords: Cc: bioinfornatics@gmail.com

Description

hello i haave replace old dmd-backend by latest release, is easy

1. take ldc

$ hg clone -r 1655 http://bitbucket.org/lindquist/ldc ldc-20100804hg1655

2. take last dmd-backend

$ urlgrabber http://ftp.digitalmars.com/dmd.1.062.zip

3. Unzip

$ unzip dmd.1.062.zip

4. remove old backend

$ rm -fr ldc-20100804hg1655/dmd/*

5. copy the latest backend

$ cp -a dmd-backend/* ldc-20100804hg1655/dmd/

6. is done build ldc

Attachments

log.txt (206.2 kB) - added by bioinfornatics on 08/08/10 21:27:11.
build log
ldc-0.9.2-fix.patch (21.1 kB) - added by bioinfornatics on 08/08/10 21:27:47.
patch 5

Change History

08/08/10 09:06:00 changed by bioinfornatics

sorry i press enter before build finish they are some error i look

08/08/10 09:14:58 changed by bioinfornatics

i start to patch this

08/08/10 10:23:24 changed by bioinfornatics

current patch, still some errors

08/08/10 11:02:22 changed by ChristianK

Unfortunately, it is more complicated than this: a lot of the files in dmd/* have largish changes for LDC. You will want to do a 3-way merge between the LDC DMDfe the DMDfe that LDC is currently based on and the new DMDfe you want to migrate to,

08/08/10 11:52:21 changed by bioinfornatics

yeah sure i put the latest patch

08/08/10 12:49:19 changed by bioinfornatics

after this i do not know what i nee do[[BR]] log error:

ldc-20100804hg1655/dmd/backend/cc.h:108:25: error: TGcc.h: No such file or directory[[BR]]
ldc-20100804hg1655/dmd/backend/cc.h:109:25: error: str4.h: No such file or directory[[BR]]

i try a quick search but fail:

$ find . -name "TGcc.h"
$ find . -name "str4.h"

08/08/10 17:14:25 changed by mwarning

To update version by version is far easier compared to got from dmdfe 1.057 to 1.062 in one step.

08/08/10 21:26:43 changed by bioinfornatics

i fix last problem is more and more difficult for me who do not know ldc

                 from /home/builder/rpmbuild/BUILD/ldc-20100804hg1655/dmd/bit.c:16:
/home/builder/rpmbuild/BUILD/ldc-20100804hg1655/dmd/backend/ty.h:154: error: expected identifier before 'extern'
/home/builder/rpmbuild/BUILD/ldc-20100804hg1655/dmd/backend/ty.h:154: error: expected '}' before 'extern'
/home/builder/rpmbuild/BUILD/ldc-20100804hg1655/dmd/backend/ty.h:154: error: 'signed' or 'unsigned' invalid for 'tytab'
In file included from /home/builder/rpmbuild/BUILD/ldc-20100804hg1655/dmd/backend/cc.h:148,
                 from /home/builder/rpmbuild/BUILD/ldc-20100804hg1655/dmd/bit.c:16:
/home/builder/rpmbuild/BUILD/ldc-20100804hg1655/dmd/backend/ty.h:277: error: 'tym_t' does not name a type

i see this two error from use the keyword extern in file ty.h line 154 and 277 these variable are declared in dmd/backend/optabgen.c

you can use :

$ find . -type f -name "optabgen.c" | xargs grep -H -n "tym_t
./dmd/backend/optabgen.c:753:    static tym_t _ptr[]      = { TYjhandle,TYnptr,TYsptr,TYcptr,TYf16ptr,TYfptr,TYhptr,
./dmd/backend/optabgen.c:755:    static tym_t _real[]     = { TYfloat,TYdouble,TYdouble_alias,TYldouble,
./dmd/backend/optabgen.c:757:    static tym_t _imaginary[] = {
./dmd/backend/optabgen.c:760:    static tym_t _complex[] =  {
./dmd/backend/optabgen.c:763:    static tym_t _integral[] = { TYbool,TYchar,TYschar,TYuchar,TYshort,
./dmd/backend/optabgen.c:767:    static tym_t _ref[]      = { TYnref,TYfref,TYref };
./dmd/backend/optabgen.c:769:    static tym_t _func[]     = { TYnfunc,TYffunc,TYnpfunc,TYfpfunc,TYpsfunc,
./dmd/backend/optabgen.c:772:    static tym_t _func[]     = { TYnfunc,TYffunc,TYnpfunc,TYfpfunc,TYf16func,
./dmd/backend/optabgen.c:776:    static tym_t _uns[]     = { TYuchar,TYushort,TYuint,TYulong,
./dmd/backend/optabgen.c:781:    static tym_t _mptr[]    = { TYmemptr };
./dmd/backend/optabgen.c:782:    static tym_t _nullptr[] = { TYnullptr };
./dmd/backend/optabgen.c:783:    static tym_t _fv[]      = { TYfptr, TYvptr };
./dmd/backend/optabgen.c:785:    static tym_t _farfunc[] = { TYffunc,TYfpfunc,TYfsfunc,TYfsysfunc };
./dmd/backend/optabgen.c:788:    static tym_t _pasfunc[] = { TYnpfunc,TYfpfunc,TYpsfunc,TYnsfunc,TYfsfunc };
./dmd/backend/optabgen.c:789:    static tym_t _revfunc[] = { TYnpfunc,TYfpfunc,TYpsfunc };
./dmd/backend/optabgen.c:791:    static tym_t _pasfunc[] = { TYnpfunc,TYfpfunc,TYf16func,TYnsfunc,TYfsfunc,TYmfunc,TYjfunc };
./dmd/backend/optabgen.c:792:    static tym_t _revfunc[] = { TYnpfunc,TYfpfunc,TYf16func,TYjfunc };
./dmd/backend/optabgen.c:794:    static tym_t _short[]     = { TYbool,TYchar,TYschar,TYuchar,TYshort,
./dmd/backend/optabgen.c:796:    static tym_t _aggregate[] = { TYstruct,TYarray };
./dmd/backend/optabgen.c:801:        tym_t ty;       /* TYxxxx                       */
./dmd/backend/optabgen.c:802:        tym_t unsty;    /* conversion to unsigned type  */
./dmd/backend/optabgen.c:803:        tym_t relty;    /* type for relaxed type checking */
./dmd/backend/optabgen.c:885:    static tym_t tytouns[64 * 4];
./dmd/backend/optabgen.c:886:    static tym_t _tyrelax[TYMAX];
./dmd/backend/optabgen.c:887:    static tym_t _tyequiv[TYMAX];
./dmd/backend/optabgen.c:958:    fprintf(f,"const tym_t tytouns[] =\n{ ");
$ find . -type f -name "optabgen.c" | xargs grep -H -n "tytab"
./dmd/backend/optabgen.c:27:void dotytab();
./dmd/backend/optabgen.c:188:    dotytab();
./dmd/backend/optabgen.c:751:void dotytab()
./dmd/backend/optabgen.c:884:    static unsigned tytab[64 * 4];
./dmd/backend/optabgen.c:896:                     {  tytab[arr[i]] |= mask; \
./dmd/backend/optabgen.c:897:                        tytab[arr[i] + 64] |= mask; \
./dmd/backend/optabgen.c:898:                        tytab[arr[i] + 128] |= mask; \
./dmd/backend/optabgen.c:899:                        tytab[arr[i] + 192] |= mask; \
./dmd/backend/optabgen.c:902:                     {  tytab[arr[i]] |= mask; \
./dmd/backend/optabgen.c:903:                        tytab[arr[i] + 64] |= mask; \
./dmd/backend/optabgen.c:904:                        tytab[arr[i] + 128] |= mask; \
./dmd/backend/optabgen.c:905:                        tytab[arr[i] + 192] |= mask; \
./dmd/backend/optabgen.c:931:    f = fopen("tytab.c","w");
./dmd/backend/optabgen.c:933:    fprintf(f,"unsigned tytab[] =\n{ ");
./dmd/backend/optabgen.c:934:    for (i = 0; i < arraysize(tytab); i++)
./dmd/backend/optabgen.c:935:    {   fprintf(f,"0x%02x,",tytab[i]);
./dmd/backend/optabgen.c:936:        if ((i & 7) == 7 && i < arraysize(tytab) - 1)
./dmd/backend/optabgen.c:942:    fprintf(f,"unsigned char tytab2[] =\n{ ");
./dmd/backend/optabgen.c:943:    for (i = 0; i < arraysize(tytab2); i++)
./dmd/backend/optabgen.c:944:    {   fprintf(f,"0x%02x,",tytab2[i]);
./dmd/backend/optabgen.c:945:        if ((i & 7) == 7 && i < arraysize(tytab2) - 1)

i do not understand why i have an error on this.

i have some other error i had attached the build log

08/08/10 21:27:11 changed by bioinfornatics

  • attachment log.txt added.

build log

08/08/10 21:27:47 changed by bioinfornatics

  • attachment ldc-0.9.2-fix.patch added.

patch 5

08/09/10 01:44:25 changed by ChristianK

bioinformatics, what you're trying is not going to work. The fact that you're getting errors from dmd/backend/* - which shouldn't even be compiled for LDC since it uses its own LLVM backend - shows that you're completely on the wrong path.

As mwarning says, the sanest way is to update the DMD frontend is to follow the official repository patch-by-patch.

08/09/10 12:34:58 changed by bioinfornatics

ok i will try so

09/05/10 09:09:25 changed by mwarning

  • status changed from new to closed.
  • resolution set to wontfix.

This approach is not viable and we need to update from dmdfe version to version.

Copyright © 2008, LDC Development Team.