Zineddine Haboussi
03/14/2024, 2:06 AMMitch Bailey
03/14/2024, 2:22 AMlibs.tech/combined
to libs.tech/ngspice
?Christoph Maier
03/14/2024, 1:04 PMZineddine Haboussi
03/14/2024, 4:08 PMMitch Bailey
03/14/2024, 4:12 PMq
.Zineddine Haboussi
03/14/2024, 4:14 PMZineddine Haboussi
03/14/2024, 4:18 PMMitch Bailey
03/14/2024, 4:26 PM.spiceinit
file. I donβt have much experience with circuit simulation.Zineddine Haboussi
03/14/2024, 4:28 PMStefan Schippers
03/14/2024, 5:36 PMxschemrc
the SKYWATER_MODELS
variable to point to the old models:
set SKYWATER_MODELS ${PDK_ROOT}/${PDK}/libs.tech/ngspice
# set SKYWATER_MODELS ${PDK_ROOT}/${PDK}/libs.tech/combined
Christoph Maier
03/14/2024, 11:58 PM${PDK_ROOT}
and the sequence in which xschem tries to fill them?
(The problem is not that documentation doesn't exist, but that there are too many versions of documentation)
Last time (2021) I tried to use xschem with ngspice in earnest, I ended up setting lots of model paths manually, when the root cause was a misconfiguration of the top level configuration variables.Christoph Maier
03/15/2024, 12:13 AMBGR_SKY130_final.sch
?
Dumping the error report into a discussion forum makes the confusion worse.Stefan Schippers
03/15/2024, 12:23 AMxschemrc
that your xschem loads on startup
Xschem does not have special env vars hardcoded. The only variables that xschem uses are HOME
, PWD
, DISPLAY
,
sky130 defines some environment variables: PDK_ROOT
and PDK
.
PDK_ROOT
is the root directory of the pdk, like /usr/local/share/pdk
,
PDK
is the process variant, like sky130B
so the full path of the pdk is $PDK_ROOT/$PDK
The sky130 xschemrc
reads these variables if they do exists and copies them to TCL variables of the same name.
This way from xschem scripts the variables can be accessed as $PDK_ROOT
instead of $env(PDK_ROOT)
Moreover in cases where env vars PDK_ROOT
and/or PDK
are not set the xschemrc tries to look in some common spaces like $HOME/share
, /usr/share
, /`usr/local/share`
to set the TCL variable PDK_ROOT
anyway.
Once again, all this logic is not xschem work, its all in the process specific xschemrc
.
TCL variables that the sky130 xschemrc defines are:
PDK_ROOT
PDK
SKYWATER_MODELS
, set to ${PDK_ROOT}/${PDK}/libs.tech/combined
(new models) or ${PDK_ROOT}/${PDK}/libs.ref/sky130_fd_sc_hd/spice
(old binned models).
SKYWATER_STDCELLS
, set to ${PDK_ROOT}/${PDK}/libs.ref/sky130_fd_sc_hd/spice
, the base directory for the standard cells spice netlists, like sky130_fd_sc_hd.spice
TCL variables that xschem uses (not dependent on a specific technology)
XSCHEM_LIBRARY_PATH
: a colon-separated list of paths to search for symbols and schematics.
`XSCHEM_SHAREDIR`: the installation root of xschem support files (usually /usr/local/share/xschem
, this is used to look up the base devices/
library that all designs use, so $XSCHEM_SHAREDIR/xschem_library
or $XSCHEM_SHAREDIR/xschem_library/devices
should certainly be one of the paths listed in XSCHEM_LIBRARY_PATH
.
For more info on the XSCHEM_LIBRARY_PATH
setup see this.
The purpose of the above variables is to avoid having absolute paths in testbenches, that will make them unportable.Christoph Maier
03/15/2024, 12:36 AMStefan Schippers
03/15/2024, 12:45 AMStefan Schippers
03/15/2024, 12:51 AMChristoph Maier
03/15/2024, 2:15 AMtop.sch
, I still get
l_s_d(): Symbol not found: devices/intuitive_interface_cheatsheet.sym
but the 1um/80um transistors in my toy constant gm reference circuit don't work any more, max. length is now 20um.
Where do I find these sort of design constraints
(layout? simulation model artefact??)
and who owns these issues?Stefan Schippers
03/15/2024, 10:19 AMChristoph Maier
03/15/2024, 11:46 AMdraw.c: In function 'draw_image':
draw.c:3990:11: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
3990 | fread(filedata, filesize, 1, fd);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
draw.c:4023:9: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
4023 | fread(header, size, 1, fd);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
main.c: In function 'main':
main.c:140:5: warning: ignoring return value of 'freopen', declared with attribute warn_unused_result [-Wunused-result]
140 | freopen("/dev/null", "w", stdout);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:141:5: warning: ignoring return value of 'freopen', declared with attribute warn_unused_result [-Wunused-result]
141 | freopen("/dev/null", "w", stderr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
save.c: In function 'filter_data':
save.c:79:3: warning: ignoring return value of 'pipe', declared with attribute warn_unused_result [-Wunused-result]
79 | pipe(p1);
| ^~~~~~~~
save.c:80:3: warning: ignoring return value of 'pipe', declared with attribute warn_unused_result [-Wunused-result]
80 | pipe(p2);
| ^~~~~~~~
save.c:107:5: warning: ignoring return value of 'dup', declared with attribute warn_unused_result [-Wunused-result]
107 | dup(p1[0]);
| ^~~~~~~~~~
save.c:110:5: warning: ignoring return value of 'dup', declared with attribute warn_unused_result [-Wunused-result]
110 | dup(p2[1]);
| ^~~~~~~~~~
save.c: In function 'base64_from_file':
save.c:779:7: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
779 | fread(s, len, 1, fd);
| ^~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: draw.o: in function `draw_image':
draw.c:(.text+0x9676): undefined reference to `cairo_image_surface_create_from_jpeg_mem'
/usr/bin/ld: draw.c:(.text+0x9eaa): undefined reference to `cairo_image_surface_create_from_jpeg_mem'
/usr/bin/ld: draw.c:(.text+0xa116): undefined reference to `cairo_image_surface_create_from_jpeg'
/usr/bin/ld: draw.c:(.text+0xa2af): undefined reference to `cairo_image_surface_write_to_jpeg_mem'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:18: xschem] Error 1
make: *** [Makefile:2: all] Error 2
I recommend you try to either clearly document the dependency that caused this crash, or eliminate that "feature" from the code base entirely if it is not absolutely mission critical for analog design.Stefan Schippers
03/15/2024, 11:59 AMChristoph Maier
03/15/2024, 12:26 PM./configure 1>xschem.config.log 2>xschem.config.err
make: Nothing to be done for 'all'.
--- Detecting host
Looking for a shell... /bin/sh -c
Looking for a shell escape character... found: '\'
Detecting temp dir... validated /home/cmaier/EDA/xschem/scconfig/
Checking for system type... OK (name: Linux; class: UNIX)
--- Detecting target (same as host)
Checking for cc (target)... OK ('gcc', ' -pipe', '')
Checking for -fpic... OK (-fPIC)
Checking for popen(3)... OK ('#define _XOPEN_SOURCE\n', '' and '')
Checking for dup2(2)... OK ('', '' and '')
Checking for flex... Found.
Checking for bison... Found.
Checking for XOpenDisplay... OK ('', '' and '-lX11')
Checking for tk... 8.6... OK ('', '-I/usr/include/tcl8.6' and '-ltcl8.6')
OK ('', '-I/usr/include/tcl8.6 ' and '-ltcl8.6 -ltk8.6')
Checking for awk... OK (awk)
Checking for xpm... OK ('', '' and '-lX11 -lXpm')
Checking for cairo... OK ('', '-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16' and '-lcairo')
Checking for libjpeg... not found
Checking for stdint.h... OK ('', '' and '')
Testing size of type unsigned char... OK, size 1 byte
Testing size of type unsigned short int... OK, size 2 bytes
Testing size of type unsigned int... OK, size 4 bytes
Testing size of type unsigned long int... OK, size 8 bytes
Testing size of type unsigned long long int... OK, size 8 bytes
Testing size of type signed char... OK, size 1 byte
Testing size of type signed short int... OK, size 2 bytes
Testing size of type signed int... OK, size 4 bytes
Testing size of type signed long int... OK, size 8 bytes
Testing size of type signed long long int... OK, size 8 bytes
Testing size of type uint8_t... OK, size 1 byte
Testing size of type uint16_t... OK, size 2 bytes
Testing size of type uint32_t... OK, size 4 bytes
Testing size of type uint64_t... OK, size 8 bytes
Testing size of type int8_t... OK, size 1 byte
Testing size of type int16_t... OK, size 2 bytes
Testing size of type int32_t... OK, size 4 bytes
Testing size of type int64_t... OK, size 8 bytes
Testing size of type float... OK, size 4 bytes
Testing size of type double... OK, size 8 bytes
Testing size of type long double... OK, size 16 bytes
Found best fit 1 bytes wide uint: unsigned char
Found best fit 1 bytes wide sint: signed char
Found best fit 2 bytes wide uint: unsigned short int
Found best fit 2 bytes wide sint: signed short int
Found best fit 4 bytes wide uint: unsigned int
Found best fit 4 bytes wide sint: signed int
Found best fit 8 bytes wide uint: unsigned long int
Found best fit 8 bytes wide sint: signed long int
Found best fit 4 bytes wide float: float
Found best fit 8 bytes wide float: double
Found best fit 16 bytes wide float: long double
Checking for cairo... OK ('', '-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16' and '-lcairo')
Checking for cairo-xcb... OK ('#include <cairo-xcb.h>\n', '-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16' and '-lcairo')
Checking for xcb... OK ('', '' and '-lX11 -lxcb')
Checking for xgetxcbconnection... OK ('', '' and '-lX11 -lX11-xcb')
Checking for xcb_render... OK ('', '' and '-lX11 -lxcb-render')
--- Detecting runtime (same as host)
--- Generating build and config files
config.h: ok
Makefile.conf: ok
doc/manpages/xschem.1: ok
src/Makefile: ok
=====================
Configuration summary
=====================
Compilation:
CC: gcc
debug: no
profiling: no
Paths:
prefix: /usr/local
user-conf-dir: ~/.xschem
user-lib-path: ~/.xschem/xschem_library
sys-lib-path: /usr/local/share/xschem/xschem_library/devices
Libs & features:
tcl: -ltcl8.6
tk: -ltcl8.6 -ltk8.6
cairo: yes
libjpeg: no
xcb: yes
Configuration complete, ready to compile.
make clean 1>xschem.make_clean.log 2>xschem.make_clean.err
cd src && make clean
make[1]: Entering directory '/home/cmaier/EDA/xschem/src'
rm -rf rawtovcd xschem *.o expandlabel.[ch] parselabel.c
make[1]: Leaving directory '/home/cmaier/EDA/xschem/src'
cd xschem_library && make clean
make[1]: Entering directory '/home/cmaier/EDA/xschem/xschem_library'
make[1]: Nothing to be done for 'clean'.
make[1]: Leaving directory '/home/cmaier/EDA/xschem/xschem_library'
cd doc && make clean
make[1]: Entering directory '/home/cmaier/EDA/xschem/doc'
make[1]: Nothing to be done for 'clean'.
make[1]: Leaving directory '/home/cmaier/EDA/xschem/doc'
cd src/utile && make clean
make[1]: Entering directory '/home/cmaier/EDA/xschem/src/utile'
make[1]: Nothing to be done for 'clean'.
make[1]: Leaving directory '/home/cmaier/EDA/xschem/src/utile'
Christoph Maier
03/15/2024, 12:27 PMmake 1>xschem.make.log 2>xschem.make.err
xschem.make.log
cd src && make
make[1]: Entering directory '/home/cmaier/EDA/xschem/src'
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o icon.o icon.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o callback.o callback.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o actions.o actions.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o move.o move.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o check.o check.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o clip.o clip.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o draw.o draw.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o globals.o globals.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o main.o main.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o netlist.o netlist.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o hash_iterator.o hash_iterator.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o findnet.o findnet.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o scheduler.o scheduler.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o store.o store.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o xinit.o xinit.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o select.o select.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o font.o font.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o editprop.o editprop.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o save.o save.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o paste.o paste.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o token.o token.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o psprint.o psprint.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o node_hash.o node_hash.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o hilight.o hilight.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o options.o options.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o vhdl_netlist.o vhdl_netlist.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o svgdraw.o svgdraw.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o spice_netlist.o spice_netlist.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o tedax_netlist.o tedax_netlist.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o verilog_netlist.o verilog_netlist.c
bison -d -o expandlabel.c expandlabel.y
flex -l -oparselabel.c parselabel.l
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o parselabel.o parselabel.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o expandlabel.o expandlabel.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o in_memory_undo.o in_memory_undo.c
gcc -c -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6 -o cairo_jpg.o cairo_jpg.c
gcc -o xschem icon.o callback.o actions.o move.o check.o clip.o draw.o globals.o main.o netlist.o hash_iterator.o findnet.o scheduler.o store.o xinit.o select.o font.o editprop.o save.o paste.o token.o psprint.o node_hash.o hilight.o options.o vhdl_netlist.o svgdraw.o spice_netlist.o tedax_netlist.o verilog_netlist.o parselabel.o expandlabel.o in_memory_undo.o cairo_jpg.o -lm -lcairo -lX11 -lxcb -lxcb-render -lX11-xcb -lXpm -ltcl8.6 -ltk8.6
make[1]: Leaving directory '/home/cmaier/EDA/xschem/src'
Christoph Maier
03/15/2024, 12:27 PMdraw.c: In function 'draw_image':
draw.c:3990:11: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
3990 | fread(filedata, filesize, 1, fd);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
draw.c:4023:9: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
4023 | fread(header, size, 1, fd);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
main.c: In function 'main':
main.c:140:5: warning: ignoring return value of 'freopen', declared with attribute warn_unused_result [-Wunused-result]
140 | freopen("/dev/null", "w", stdout);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:141:5: warning: ignoring return value of 'freopen', declared with attribute warn_unused_result [-Wunused-result]
141 | freopen("/dev/null", "w", stderr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
save.c: In function 'filter_data':
save.c:79:3: warning: ignoring return value of 'pipe', declared with attribute warn_unused_result [-Wunused-result]
79 | pipe(p1);
| ^~~~~~~~
save.c:80:3: warning: ignoring return value of 'pipe', declared with attribute warn_unused_result [-Wunused-result]
80 | pipe(p2);
| ^~~~~~~~
save.c:107:5: warning: ignoring return value of 'dup', declared with attribute warn_unused_result [-Wunused-result]
107 | dup(p1[0]);
| ^~~~~~~~~~
save.c:110:5: warning: ignoring return value of 'dup', declared with attribute warn_unused_result [-Wunused-result]
110 | dup(p2[1]);
| ^~~~~~~~~~
save.c: In function 'base64_from_file':
save.c:779:7: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
779 | fread(s, len, 1, fd);
| ^~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: draw.o: in function `draw_image':
draw.c:(.text+0x9676): undefined reference to `cairo_image_surface_create_from_jpeg_mem'
/usr/bin/ld: draw.c:(.text+0x9eaa): undefined reference to `cairo_image_surface_create_from_jpeg_mem'
/usr/bin/ld: draw.c:(.text+0xa116): undefined reference to `cairo_image_surface_create_from_jpeg'
/usr/bin/ld: draw.c:(.text+0xa2af): undefined reference to `cairo_image_surface_write_to_jpeg_mem'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:18: xschem] Error 1
make: *** [Makefile:2: all] Error 2
Christoph Maier
03/15/2024, 12:37 PMStefan Schippers
03/15/2024, 1:05 PMlibjpeg-dev
on your system (dependencies are listed here). I have added checks to disable all jpeg code in this case (it is used for example to export/render jpg images and to generate pdf output with graphs) Can you please test again?
Also if you get more warnings about unused glibc function results please forward to me, I will fix these. On my system even setting compiler option -Wunused-result
will not show these warnings. This happens because starting from some versions some libc libraries mark functions as 'you must check the return value'.
Thank you.Christoph Maier
03/15/2024, 1:31 PMsudo apt-get libjpeg-dev
changed the output of `configure`:
configure log
make: Nothing to be done for 'all'.
--- Detecting host
Looking for a shell... /bin/sh -c
Looking for a shell escape character... found: '\'
Detecting temp dir... validated /home/cmaier/EDA/xschem/scconfig/
Checking for system type... OK (name: Linux; class: UNIX)
--- Detecting target (same as host)
Checking for cc (target)... OK ('gcc', ' -pipe', '')
Checking for -fpic... OK (-fPIC)
Checking for popen(3)... OK ('#define _XOPEN_SOURCE\n', '' and '')
Checking for dup2(2)... OK ('', '' and '')
Checking for flex... Found.
Checking for bison... Found.
Checking for XOpenDisplay... OK ('', '' and '-lX11')
Checking for tk... 8.6... OK ('', '-I/usr/include/tcl8.6' and '-ltcl8.6')
OK ('', '-I/usr/include/tcl8.6 ' and '-ltcl8.6 -ltk8.6')
Checking for awk... OK (awk)
Checking for xpm... OK ('', '' and '-lX11 -lXpm')
Checking for cairo... OK ('', '-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16' and '-lcairo')
Checking for libjpeg... OK ('', '' and '-L/build/libjpeg-turbo-Iy19nI/libjpeg-turbo-2.0.3/obj-x86_64-linux-gnu/lib/x86_64-linux-gnu -ljpeg')
Checking for stdint.h... OK ('', '' and '')
Testing size of type unsigned char... OK, size 1 byte
Testing size of type unsigned short int... OK, size 2 bytes
Testing size of type unsigned int... OK, size 4 bytes
Testing size of type unsigned long int... OK, size 8 bytes
Testing size of type unsigned long long int... OK, size 8 bytes
Testing size of type signed char... OK, size 1 byte
Testing size of type signed short int... OK, size 2 bytes
Testing size of type signed int... OK, size 4 bytes
Testing size of type signed long int... OK, size 8 bytes
Testing size of type signed long long int... OK, size 8 bytes
Testing size of type uint8_t... OK, size 1 byte
Testing size of type uint16_t... OK, size 2 bytes
Testing size of type uint32_t... OK, size 4 bytes
Testing size of type uint64_t... OK, size 8 bytes
Testing size of type int8_t... OK, size 1 byte
Testing size of type int16_t... OK, size 2 bytes
Testing size of type int32_t... OK, size 4 bytes
Testing size of type int64_t... OK, size 8 bytes
Testing size of type float... OK, size 4 bytes
Testing size of type double... OK, size 8 bytes
Testing size of type long double... OK, size 16 bytes
Found best fit 1 bytes wide uint: unsigned char
Found best fit 1 bytes wide sint: signed char
Found best fit 2 bytes wide uint: unsigned short int
Found best fit 2 bytes wide sint: signed short int
Found best fit 4 bytes wide uint: unsigned int
Found best fit 4 bytes wide sint: signed int
Found best fit 8 bytes wide uint: unsigned long int
Found best fit 8 bytes wide sint: signed long int
Found best fit 4 bytes wide float: float
Found best fit 8 bytes wide float: double
Found best fit 16 bytes wide float: long double
Checking for cairo... OK ('', '-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16' and '-lcairo')
Checking for cairo-xcb... OK ('#include <cairo-xcb.h>\n', '-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16' and '-lcairo')
Checking for xcb... OK ('', '' and '-lX11 -lxcb')
Checking for xgetxcbconnection... OK ('', '' and '-lX11 -lX11-xcb')
Checking for xcb_render... OK ('', '' and '-lX11 -lxcb-render')
--- Detecting runtime (same as host)
--- Generating build and config files
config.h: ok
Makefile.conf: ok
doc/manpages/xschem.1: ok
src/Makefile: ok
=====================
Configuration summary
=====================
Compilation:
CC: gcc
debug: no
profiling: no
Paths:
prefix: /usr/local
user-conf-dir: ~/.xschem
user-lib-path: ~/.xschem/xschem_library
sys-lib-path: /usr/local/share/xschem/xschem_library/devices
Libs & features:
tcl: -ltcl8.6
tk: -ltcl8.6 -ltk8.6
cairo: yes
libjpeg: yes
xcb: yes
Configuration complete, ready to compile.
but didn't avoid the crash.
Now I'll pull in your latest changes,
lather,
rinse,
and repeat.Christoph Maier
03/15/2024, 1:47 PMStefan Schippers
03/15/2024, 1:52 PMChristoph Maier
03/15/2024, 1:56 PMStefan Schippers
03/15/2024, 2:05 PMChristoph Maier
03/15/2024, 2:06 PMLinen is a search-engine friendly community platform. We offer integrations with existing Slack/Discord communities and make those conversations Google-searchable.
Powered by