Yuan Mei
04/08/2023, 3:11 AMStefan Schippers
04/08/2023, 5:06 PMYuan Mei
04/08/2023, 5:29 PMStefan Schippers
04/09/2023, 8:24 AMYuan Mei
04/09/2023, 8:41 AMmagic
, gtkwave
, gnuplot
etc.Stefan Schippers
04/09/2023, 8:45 AMxterm -d 3 -l log
when xschem opens just quit xschem. Then read the log
file and find this line. What depth is reported from xschem?
Tcl_AppInit(): screen depth: 24
Yuan Mei
04/09/2023, 8:48 AMTcl_AppInit(): drawing window ID=0x6000bc
Tcl_AppInit(): top window ID=0x6000b6
Tcl_AppInit(): done tkinit()
Tcl_AppInit(): screen depth: 24
Tcl_AppInit(): done step b of xinit()
Tcl_AppInit(): done step c of xinit()
build_colors(): dim=0, dim_bg=0
init_color_array(): color:#000000
As expected.Stefan Schippers
04/09/2023, 9:11 AMmagic
is working can you see if magic
and xschem
are using the same graphic libraries (specifically tcl/tk)?
I think on macOS you need to use otool -L /path/to/xschem
and otool -L /path/to/magic
,-L Display the names and version numbers of the shared libraries that the object file uses.
Yuan Mei
04/09/2023, 9:25 AM$ otool -L /opt/OpenICEDA/lib/magic/tcl/magicexec
/opt/OpenICEDA/lib/magic/tcl/magicexec:
/opt/local/lib/libtk8.6.dylib (compatibility version 8.6.0, current version 8.6.13)
/opt/local/lib/libtcl8.6.dylib (compatibility version 8.6.0, current version 8.6.13)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.13)
/opt/local/lib/libX11.6.dylib (compatibility version 11.0.0, current version 11.0.0)
/opt/local/lib/libGL.1.dylib (compatibility version 4.0.0, current version 4.0.0)
/opt/local/lib/libGLU.1.dylib (compatibility version 5.0.0, current version 5.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
/opt/local/lib/libcairo.2.dylib (compatibility version 11709.0.0, current version 11709.0.0)
/opt/local/lib/libfontconfig.1.dylib (compatibility version 14.0.0, current version 14.0.0)
/opt/local/lib/libfreetype.6.dylib (compatibility version 25.0.0, current version 25.3.0)
$ otool -L /opt/OpenICEDA/bin/xschem
/opt/OpenICEDA/bin/xschem:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
/opt/local/lib/libjpeg.8.dylib (compatibility version 8.0.0, current version 8.2.2)
/opt/local/lib/libcairo.2.dylib (compatibility version 11709.0.0, current version 11709.0.0)
/opt/local/lib/libX11.6.dylib (compatibility version 11.0.0, current version 11.0.0)
/opt/local/lib/libxcb.1.dylib (compatibility version 3.0.0, current version 3.0.0)
/opt/local/lib/libxcb-render.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/opt/local/lib/libX11-xcb.1.dylib (compatibility version 2.0.0, current version 2.0.0)
/opt/local/lib/libXpm.4.dylib (compatibility version 16.0.0, current version 16.0.0)
/opt/local/lib/libtcl8.6.dylib (compatibility version 8.6.0, current version 8.6.13)
/opt/local/lib/libtk8.6.dylib (compatibility version 8.6.0, current version 8.6.13)
Stefan Schippers
04/09/2023, 9:29 AMView->No XCopyArea drawing model
selected?Yuan Mei
04/09/2023, 9:31 AMStefan Schippers
04/09/2023, 9:33 AMYuan Mei
04/09/2023, 9:44 AMStefan Schippers
04/09/2023, 10:02 AMYuan Mei
04/09/2023, 10:04 AMStefan Schippers
04/09/2023, 10:05 AMYuan Mei
04/09/2023, 10:10 AMStefan Schippers
04/09/2023, 10:14 AMconfig.h
in xschem top directory, commenting out the HAS_CAIRO
definition and rebuild xschem? (with [sudo] make install
)
/* #define HAS_CAIRO 1 */
Note: comment out, do not set to 0Yuan Mei
04/09/2023, 10:20 AMStefan Schippers
04/09/2023, 10:27 AM/opt/local/lib/libcairo.2.dylib
that xschem uses for antialiased text and image rendering.
Building xschem without Cairo
makes xschem use its own internal vector font, this is how it uses to work on older machines (SunOS, Solaris, Irix) that do not have these 'modern' libs. Unfortunately without Cairo you will see only a grey rectangle border in place of images, but everything works, including graphs.
You should investigate the problem of the cairo library, may be an update/rebuild is necessary...Yuan Mei
04/09/2023, 10:34 AMmacports
https://ports.macports.org/port/cairo/. It is the latest... I'll try debugging that another time. But compiling without cairo at least gives me an immediately usable xschem. Thanks!Stefan Schippers
04/09/2023, 10:48 AMmagic -d CAIRO
and see if everything works there. -d CAIRO
tells magic to use the cairo,
You can also check if
otool -L /opt/OpenICEDA/lib/magic/tcl/tclmagic.so
shows the same cairo lib as xschem does.Yuan Mei
04/09/2023, 11:01 AMtclmagic.so
links to the same /opt/local/lib/libcairo.2.dylib
but magic -d CAIRO
gives me segmentation error.Stefan Schippers
04/09/2023, 11:11 AMYuan Mei
04/09/2023, 11:21 AMlibcairo.2.dylib
is the clear culprit here.Stefan Schippers
04/09/2023, 11:32 AMTim Edwards
04/09/2023, 2:22 PMStefan Schippers
04/09/2023, 2:40 PMYuan Mei
04/09/2023, 9:06 PMmagicexec
when launched with -d CAIRO
lldb -- ./tcltk/magicexec -- -d CAIRO
(lldb) target create "./tcltk/magicexec"
Current executable set to '/opt/OpenICEDA/src/magic/tcltk/magicexec' (arm64).
(lldb) settings set -- target.run-args "--" "-d" "CAIRO"
(lldb) run
Process 50623 launched: '/opt/OpenICEDA/src/magic/tcltk/magicexec' (arm64)
Use openwrapper to create a new GUI-based layout window
Use closewrapper to remove a new GUI-based layout window
Magic 8.3 revision 388 - Compiled on Mon Mar 27 21:48:15 PDT 2023.
Starting magic under Tcl interpreter
Using the terminal as the console.
Processing system .magicrc file
New windows will not have a title caption.
New windows will not have scroll bars.
New windows will not have a border.
Process 50623 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x2c)
frame #0: 0x0000000102b2e438 tclmagic.dylib`DBPaintPlane0(plane=0x0000600000c0c330, area=error: summary string parsing error, resultTbl="\U00000003\U00000001\U00000002\U00000003\U00000005\U00000005\U00000006\a\b\t\n\v\f\r\U0000000e\U0000000f\U00000010\U00000011\U00000012\U00000013\U00000014\U00000015\U00000016\U00000017\U00000018\U00000019\U0000001a\U0000001b\U0000001c\U0000001d\U0000001e\U0000001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\U0000007f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff\U00000004\U00000001\U00000002\U00000005\U00000004\U00000005\U00000006\a\b\t\n\v\f\r\U0000000e\U0000000f\U00000010\U00000011\U00000012\U00000013\U00000014\U00000015\U00000016\U00000017\U00000018\U00000019\U0000001a\U0000001b\U0000001c\U0000001d\U0000001e\U0000001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\U0000007f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff\U00000005\U00000001\U00000002\U00000005\U00000005\U00000005\U00000006\a\b\t\n\v\f\r\U0000000e\U0000000f\U00000010\U00000011\U00000012\U00000013\U00000014\U00000015\U00000016\U00000017\U00000018\U00000019\U0000001a\U0000001b\U0000001c\U0000001d\U0000001e\U0000001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\U0000007f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", undo=0x0000000000000000, method='\0') at DBpaint.c:277:5
274 start.p_x = area->r_xbot;
275 start.p_y = area->r_ytop - 1;
276 tile = plane->pl_hint;
-> 277 GOTOPOINT(tile, &start);
278
279 /* Each iteration visits another tile on the LHS of the search area */
280 while (TOP(tile) > area->r_ybot)
Target 0: (magicexec) stopped.
(lldb)
Tim Edwards
04/10/2023, 12:59 PMGOTOPOINT
means that the corner-stitched tile database got corrupted, which would have happened some unknown time earlier. Running valgrind
on magicexec
might (or might not) catch the problem when it occurs.