RTimothyEdwards / magic

Magic VLSI Layout Tool
Other
447 stars 100 forks source link

compile error #270

Open sujatad15 opened 8 months ago

sujatad15 commented 8 months ago

when I write make command in mac terminal getting error like

44 warnings and 1 error generated. make[2]: [DRCmain.o] Error 1 make[1]: [modules] Error 1 make: *** [standard] Error 2 sujata@Sujatas-MacBook-Air magic %

error is: DRCmain.c:922:13: error: use of undeclared identifier 'DRC_NOT_RUNNING' DRCStatus = DRC_NOT_RUNNING;

please someone help me to fix this issue. for reference I'm sharing complete error window

Last login: Thu Oct 12 13:56:25 on ttys000 sujata@Sujatas-MacBook-Air ~ % cd magic sujata@Sujatas-MacBook-Air magic % make --- errors and warnings logged in file make.log --- making dependencies for dir in bplane cmwind commands database dbwind debug drc extflat extract graphics netmenu plow resis select sim textio tiles utils windows wiring ext2sim ext2spice calma cif plot lef readline garouter grouter irouter mzrouter router gcr lisp tcltk magic net2ir graphics; do \ (cd $dir && /Applications/Xcode.app/Contents/Developer/usr/bin/make depend) || exit 1; done make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. make[2]: Nothing to be done for depend'. make[2]: Nothing to be done fordepend'. --- making modules for dir in bplane cmwind commands database dbwind debug drc extflat extract graphics netmenu plow resis select sim textio tiles utils windows wiring ext2sim ext2spice calma cif plot lef readline garouter grouter irouter mzrouter router gcr magic net2ir graphics; do \ (cd $dir && /Applications/Xcode.app/Contents/Developer/usr/bin/make module) || exit 1; done make[2]: Nothing to be done for module'. make[2]: Nothing to be done formodule'. make[2]: Nothing to be done for module'. make[2]: Nothing to be done formodule'. make[2]: Nothing to be done for module'. make[2]: Nothing to be done formodule'. --- compiling drc/DRCmain.o rm -f DRCmain.o gcc -g -I. -I.. -I../readline -DCAD_DIR=\"/usr/local/lib\" -DBIN_DIR=\"/usr/local/bin\" -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DHAVE_ZLIB=1 -DX_DISPLAY_MISSING=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DUSE_READLINE=1 -DHAVE_LIBREADLINE=1 -DHAVE_LIBREADLINE=1 -DHAVE_LIBREADLINE=1 -DROUTE_MODULE=1 -DRSIM_MODULE=1 -DUSE_NEW_MACROS=1 -DVECTOR_FONTS=1 -D_FORTIFY_SOURCE=0 -DMAGIC_VERSION=\"cat ../VERSION | cut -d. -f1-2\" -DMAGIC_REVISION=\"cat ../VERSION | cut -d. -f3\" -DMAGIC_COMMIT=\"git rev-parse HEAD\" -DGCORE=\"/usr/bin/gcore\" -DSHDLIB_EXT=\"\" -DNDEBUG -c DRCmain.c In file included from DRCmain.c:36: In file included from ../database/database.h:41: In file included from ../bplane/bplane.h:203: ../bplane/bpEnum.h:509:11: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if(e=bpEnumNextBINS(bpe, 0)) return e; ~^~~~~~~ ../bplane/bpEnum.h:509:11: note: place parentheses around the assignment to silence this warning if(e=bpEnumNextBINS(bpe, 0)) return e; ^ ( ) ../bplane/bpEnum.h:509:11: note: use '==' to turn this assignment into an equality comparison if(e=bpEnumNextBINS(bpe, 0)) return e; ^

../bplane/bpEnum.h:513:11: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if(e=bpEnumNextBINS(bpe, 1)) return e; ~^~~~~~~ ../bplane/bpEnum.h:513:11: note: place parentheses around the assignment to silence this warning if(e=bpEnumNextBINS(bpe, 1)) return e; ^ ( ) ../bplane/bpEnum.h:513:11: note: use '==' to turn this assignment into an equality comparison if(e=bpEnumNextBINS(bpe, 1)) return e; ^

../bplane/bpEnum.h:517:11: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if(e=bpEnumNextINBOX(bpe, 0)) return e; ~^~~~~~~~ ../bplane/bpEnum.h:517:11: note: place parentheses around the assignment to silence this warning if(e=bpEnumNextINBOX(bpe, 0)) return e; ^ ( ) ../bplane/bpEnum.h:517:11: note: use '==' to turn this assignment into an equality comparison if(e=bpEnumNextINBOX(bpe, 0)) return e; ^

../bplane/bpEnum.h:521:11: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if(e=bpEnumNextINBOX(bpe, 1)) return e; ~^~~~~~~~ ../bplane/bpEnum.h:521:11: note: place parentheses around the assignment to silence this warning if(e=bpEnumNextINBOX(bpe, 1)) return e; ^ ( ) ../bplane/bpEnum.h:521:11: note: use '==' to turn this assignment into an equality comparison if(e=bpEnumNextINBOX(bpe, 1)) return e; ^

../bplane/bpEnum.h:525:11: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if(e=bpEnumNextHASH(bpe)) return e; ~^~~~~~~~ ../bplane/bpEnum.h:525:11: note: place parentheses around the assignment to silence this warning if(e=bpEnumNextHASH(bpe)) return e; ^ ( ) ../bplane/bpEnum.h:525:11: note: use '==' to turn this assignment into an equality comparison if(e=bpEnumNextHASH(bpe)) return e; ^

DRCmain.c:160:5: warning: passing arguments to 'DBPaintPlane0' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] DBPaintPlane(plane, rect, DBStdPaintTbl(DRCErrorType, ^ ../database/database.h:776:48: note: expanded from macro 'DBPaintPlane'

define DBPaintPlane(a, b, c, d) DBPaintPlane0(a, b, c, d, PAINT_NORMAL)

                                           ^

DRCmain.c:150:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] drcPaintError(celldef, rect, cptr, plane) ^ In file included from DRCmain.c:39: ../drc/drc.h:246:13: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition [-Wdeprecated-non-prototype] extern void drcPaintError(); ^ DRCmain.c:209:22: warning: passing arguments to 'CIFGetScale' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] oscale = CIFGetScale(100); / 100 = microns to centimicrons / ^ DRCmain.c:211:28: warning: passing arguments to 'CIFGetOutputScale' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] oscale = CIFGetOutputScale(1000); / 1000 for conversion to um / ^ DRCmain.c:185:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] drcSubstitute (cptr) ^ DRCmain.c:274:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] drcPrintError (celldef, rect, cptr, scx) ^ In file included from DRCmain.c:39: ../drc/drc.h:247:13: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition [-Wdeprecated-non-prototype] extern void drcPrintError(); ^ DRCmain.c:532:15: warning: passing arguments to 'drcWhyFunc' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] drcWhyFunc(&scx, (pointertype)dolist); ^ DRCmain.c:542:20: warning: passing arguments to 'DBReComputeBbox' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] DBReComputeBbox(DRCdef); ^ DRCmain.c:544:19: warning: passing arguments to 'DBWAreaChanged' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] DBWAreaChanged(DRCdef, &box, DBW_ALLWINDOWS, &DBAllButSpaceBits); ^ DRCmain.c:475:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] DRCWhy(dolist, use, area, findonly) ^ In file included from DRCmain.c:39: ../drc/drc.h:282:13: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition [-Wdeprecated-non-prototype] extern bool DRCWhy(); ^ DRCmain.c:650:24: warning: passing arguments to 'DRCInteractionCheck' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] DRCInteractionCheck(def, &scx->scx_area, &scx->scx_area, ^ DRCmain.c:641:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] drcWhyFunc(scx, cdarg) ^ DRCmain.c:699:23: warning: passing arguments to 'DBCellReadArea' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (DBCellReadArea(use, area, TRUE)) ^ DRCmain.c:710:24: warning: passing arguments to 'drcCheckFunc' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] (void) drcCheckFunc(&scx, (ClientData) NULL); ^ DRCmain.c:690:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] DRCCheck(use, area) ^ In file included from DRCmain.c:39: ../drc/drc.h:284:13: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition [-Wdeprecated-non-prototype] extern void DRCCheck(); ^ DRCmain.c:735:5: warning: passing arguments to 'DBPaintPlane0' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] DBPaintPlane(def->cd_planes[PL_DRC_CHECK], &cellArea, ^ ../database/database.h:776:48: note: expanded from macro 'DBPaintPlane'

define DBPaintPlane(a, b, c, d) DBPaintPlane0(a, b, c, d, PAINT_NORMAL)

                                           ^

DRCmain.c:739:17: warning: passing arguments to 'DRCCheckThis' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] DRCCheckThis(def, TT_CHECKPAINT, (Rect ) NULL); ^ DRCmain.c:742:24: warning: passing arguments to 'DBCellSrArea' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] (void) DBCellSrArea(scx, drcCheckFunc, (ClientData) NULL); ^ DRCmain.c:715:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] drcCheckFunc(scx, cdarg) ^ DRCmain.c:804:24: warning: passing arguments to 'drcCountFunc' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] (void) drcCountFunc(&scx, &dupTable); ^ DRCmain.c:825:13: warning: passing arguments to 'HashKill' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] HashKill(&dupTable); ^ DRCmain.c:772:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] DRCCount(use, area, recurse) ^ In file included from DRCmain.c:39: ../drc/drc.h:285:22: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition [-Wdeprecated-non-prototype] extern DRCCountList DRCCount(); ^ DRCmain.c:858:25: warning: passing arguments to 'DBSrPaintArea' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] (void) DBSrPaintArea((Tile ) NULL, def->cd_planes[PL_DRC_ERROR], ^ DRCmain.c:872:17: warning: passing arguments to 'DBCellSrArea' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] DBCellSrArea(scx, drcCountFunc, (ClientData)dupTable); ^ DRCmain.c:835:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] drcCountFunc(scx, dupTable) ^ DRCmain.c:882:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] drcCountFunc2(tile, countptr) ^ DRCmain.c:922:13: error: use of undeclared identifier 'DRC_NOT_RUNNING' DRCStatus = DRC_NOT_RUNNING; ^ DRCmain.c:984:25: warning: passing arguments to 'drcFindFunc' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] result = drcFindFunc(&scx, &finddata); ^ DRCmain.c:986:13: warning: passing arguments to 'HashKill' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] HashKill(&defTable); ^ DRCmain.c:957:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] DRCFind(use, area, rect, indx) ^ In file included from DRCmain.c:39: ../drc/drc.h:286:13: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition [-Wdeprecated-non-prototype] extern int DRCFind(); ^ DRCmain.c:1015:22: warning: passing arguments to 'DBCellRead' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] (void) DBCellRead(def, TRUE, TRUE, NULL); ^ DRCmain.c:1017:22: warning: passing arguments to 'DBSrPaintArea' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] if (DBSrPaintArea((Tile ) NULL, def->cd_planes[PL_DRC_ERROR], ^ DRCmain.c:1002:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] drcFindFunc(scx, finddata) ^ DRCmain.c:1031:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] drcFindFunc2(tile, finddata) ^ 44 warnings and 1 error generated. make[2]: [DRCmain.o] Error 1 make[1]: [modules] Error 1 make: *** [standard] Error 2 sujata@Sujatas-MacBook-Air magic %

RTimothyEdwards commented 8 months ago

@sujatad15 : I just fixed the immediate cause of the error, which is a missing #Ifdef, but a fundamental problem here is that you are compiling without Tcl/Tk support. Please see the compile/install instructions for Mac OS. Once you have installed an X11-compatible version of Tcl/Tk, be sure to run make clean before you re-run configure.

sujatad15 commented 8 months ago

thank you sir. but again I'm facing error when build magic

Last login: Mon Oct 23 23:22:49 on ttys000 sujata@Sujatas-MacBook-Air ~ % cd magic cd: no such file or directory: magic sujata@Sujatas-MacBook-Air ~ % cd ocd sujata@Sujatas-MacBook-Air ocd % cd magic sujata@Sujatas-MacBook-Air magic % magic dyld[24677]: Library not loaded: /usr/local/opt2/tcl-tk/lib:/opt/X11/lib/libtk8.6.dylib Referenced from: <308D996D-E7BB-3DD1-974B-7EE95B25C163> /usr/local/opt2/tcl-tk/bin/wish8.6 Reason: tried: '/usr/local/opt2/tcl-tk/lib:/opt/X11/lib/libtk8.6.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt2/tcl-tk/lib:/opt/X11/lib/libtk8.6.dylib' (no such file), '/usr/local/opt2/tcl-tk/lib:/opt/X11/lib/libtk8.6.dylib' (no such file) zsh: abort magic sujata@Sujatas-MacBook-Air magic %

Screenshot 2023-10-23 at 11 47 11 PM

please help me sir to solve this problem

RTimothyEdwards commented 8 months ago

Did you do the make clean as I suggested above? If that doesn't solve the problem, then take a look at the full instructions in https://github.com/RTimothyEdwards/magic/blob/master/INSTALL_MacOS.md

sujatad15 commented 8 months ago

yes I did sir when I do make again getting these 3 errors

Screenshot 2023-10-24 at 8 31 20 AM
sujatad15 commented 8 months ago

yes sir i did make clean. and im fallowing your steps only but when i repeat steps i.e make step getting these 3 errors.

On Mon, Oct 23, 2023 at 11:58 PM R. Timothy Edwards < @.***> wrote:

Did you do the make clean as I suggested above? If that doesn't solve the problem, then take a look at the full instructions in https://github.com/RTimothyEdwards/magic/blob/master/INSTALL_MacOS.md

— Reply to this email directly, view it on GitHub https://github.com/RTimothyEdwards/magic/issues/270#issuecomment-1775775425, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDG46Y3NWPKBE4N7LPFIXHTYA2ZMDAVCNFSM6AAAAAA55KD5NWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZVG43TKNBSGU . You are receiving this because you were mentioned.Message ID: @.***>

RTimothyEdwards commented 8 months ago

The errors indicate that "readline" is being compiled (apparently the readline code is missing some includes) which means that magic is not being compiled to Tcl/Tk, so the Tcl/Tk include files are not being found. What was the output of "configure"?

sujatad15 commented 8 months ago

when i do ./configure im getting like this.

On Tue, Oct 24, 2023 at 7:09 PM R. Timothy Edwards @.***> wrote:

The errors indicate that "readline" is being compiled (apparently the readline code is missing some includes) which means that magic is not being compiled to Tcl/Tk, so the Tcl/Tk include files are not being found. What was the output of "configure"?

— Reply to this email directly, view it on GitHub https://github.com/RTimothyEdwards/magic/issues/270#issuecomment-1777225914, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDG46Y5OFOAMX2UNRBSYTL3YA7AIXAVCNFSM6AAAAAA55KD5NWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZXGIZDKOJRGQ . You are receiving this because you were mentioned.Message ID: @.***>