Hello i'm beginner I'm having this error when simulating in ngspice any help
z
Hello i'm beginner I'm having this error when simulating in ngspice any help
m
@Zineddine Haboussi Maybe change
libs.tech/combined
to
libs.tech/ngspice
?
c
I'm having a very similar problem at this very moment, trying to get xschem and ngspice play nice with each other after reinstallation. Last time, I just patched path specifications in a shotgun way; this time, I'm trying to find the actual settings that point xschem in the wrong directions when looking for files, because the "patch things until it #worksforme" gives me A LOT of problems as I try to resuscitate my schematics from 2021. This will probably cost me a week of time until I have just found and verified (with software engineers too busy with adding patches for solving the root cause of undocumented configuration options) the exact configuration settings that cause (and auto-generate) many more of these errors.
😬 2
z
@Mitch Bailey yes i want to do that, but how can i change the path ?
m
Can you edit the code in xschem? Select the code block and press
q
.
z
ok wait i will try
@Mitch Bailey it works thank you, just a question should i everytime mentioning the library paths in xschem code when i use the sky130 ?
πŸ‘ 1
m
@Zineddine Haboussi for cell that you want to simulate, maybe yes. You might be able to specify something in the
.spiceinit
file. I don’t have much experience with circuit simulation.
πŸ‘ 1
z
@Mitch Bailey ok no problem thank you for your help
s
the "combined/" models are the new version of open_pdks ngspice models for sky130. If combined directory does not exist you should redefine in
xschemrc
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
πŸ‘ 1
c
@Stefan Schippers, where would I find the most concise and authoritative list of environment variables like
${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.
Where do I report a bug to
BGR_SKY130_final.sch
? Dumping the error report into a discussion forum makes the confusion worse.
s
The best place to look at is the
xschemrc
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.
c
Understood, thanks. Where would I find this useful information of yours again if I try to reactivate old schematics after 3 years and forgetting all the nitty-gritty details how to configure the tools properly? (Dealing with this very problem right now)
s
For sky130 process files setup, xschem and ngspice look here.
c
Thanks, things are starting to fall into place. In
top.sch
, I still get
Copy code
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?
s
for the missing intuitive_interface_cheatsheet.sym this is just informative doc. Updating xschem will bring in the missing symbol (and related schematic). For the device geometry limits I don't know who owns these, I think these contraints come from the foundry. @Tim Edwards could be more precise on this, since a lot of work to adapt these models to work on ngspice (instead of Spectre / Hspice) has been done by him.
c
@Stefan Schippers, unsurprisingly, reinstalling and recompiling xschem breaks the tool chain.
Copy code
draw.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.
s
What are the steps you did ? after pulling or cloning the repo you need to do ./configure , followed by make and [sudo] make install
c
Here are the steps I did. It would help if I did not have to sift through log files like this (and clutter discussion forums to useless SNR levels) every time a software engineer adds an "improvement".
./configure 1>xschem.config.log 2>xschem.config.err
Copy code
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
Copy code
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'
make 1>xschem.make.log 2>xschem.make.err
xschem.make.log
Copy code
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'
xschem.make.err
Copy code
draw.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
"Nearly everything that matters is a side effect." β€” Meredith L. Patterson
s
The problem was missing
libjpeg-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.
c
Just FYI:
sudo apt-get libjpeg-dev
changed the output of `configure`: configure log
Copy code
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.
Ok, after pulling in the latest changes, #worksforme. Thanks!
s
Thank you. If you get warnings from the compiler during make please send them to me. Some compiler warnings do not show up on other systems (like mine) but are easily fixed.
c
As a practical matter, how can we keep these extensive log files (which I'm a German's German enough to bother keeping them in the first place) out of the discussion group, where they just clutter up everything even more than is already the case? This needs to go to a dedicated place, adressed primarily at the actual developer[s].
s
as long as they are in a subject thread and not in the main channel I don't see big problems. Otherwise send directly to me as a DM
c
The problem is that you don't find the log files any more if you look at them again after 3 years … or get cancelled from the discord for sowing too much discord in the corporate forum. #HailEris