I have installed Cygwin at my Win11 system. Afterwards I downloaded the source code of GTKWave (gtkwave-gtk3-3.3.114). When I try to compile GTKWave by calling the commands "configure" and then "make", both commands give an error message:
configure: No system libbz2 headers could be found.
make: fatal error: bzlib.h: No such file or directory
I checked the Cygwin installation and in my opinion all needed packages are installed. I looked for the file bzlib.h and found it in C:\cygwin64\usr\include, so it does exist but is not found. After copying bzlib.h into the folder C:\cygwin64\home\matth\gtkwave-gtk3-3.3.114\src\helpers the error message changed to:
make: C:/cygwin64/home/matth/gtkwave-gtk3-3.3.114/src/helpers/lxt_write.c:463:(.text+0x1fe): undefined reference to BZ2_bzwrite
What am I doing wrong?
Edit: I now tried to install gtkwave-3.3.124. Again I have problems. The error message is:
cocoa_misc.h:16:10: fatal error: gtk/gtk.h: No such file or directory
16 | #include <gtk/gtk.h>
But I have installed all GTK-Packages. What is missing?
You can use https://cygwin.com/packages/ search to find the needed development packages:
https://cygwin.com/cgi-bin2/package-grep.cgi?grep=bzlib.h
https://cygwin.com/cgi-bin2/package-grep.cgi?grep=gtk%2Fgtk.h
so you need to install
libbz2-devel-1.0.8-2 - libbz2-devel: BZip file de/compressor
and
libgtk3-devel-3.24.51-1 - libgtk3-devel: GTK+ X11 GUI toolkit (development)
I was able to build gtkwave-gtk3-3.3.114 on my system with
$ tar -xf gtkwave-gtk3-3.114.tar.gz
$ cd gtkwave-gtk3-3.3.114
$ autoupdate
$ ./autogen.sh
$ mkdir ../build
$ cd ../build
$ ../gtkwave-gtk3-3.3.114/configure
$ make
looking at the 'config.log' , I see 'configure' searchs the following programs and relative package:
/usr/bin/gawk : gawk-5.3.2-1
/usr/bin/update-mime-database : shared-mime-info-2.4-1
/usr/bin/update-desktop-database : desktop-file-utils-0.28-1
/usr/lib/tclConfig.sh : tcl-devel-8.6.12-1
/usr/lib/tkConfig.sh : tcl-tk-devel-8.6.12-1
/usr/bin/g++ : gcc-g++-13.4.0-1
/usr/bin/gcc : gcc-core-13.4.0-1
/usr/bin/flex : flex-2.6.4-2
/usr/bin/ranlib : binutils-2.45-1
/usr/bin/gedit : gedit-3.22.1-1
/usr/bin/gperf : gperf-3.1-1
/usr/bin/pkg-config : pkg-config-2.5.1-1
/usr/bin/install : coreutils-9.6-1
/usr/bin/mkdir : coreutils-9.6-1
/usr/bin/update-mime-database : shared-mime-info-2.4-1
/usr/bin/update-desktop-database : desktop-file-utils-0.28-1
/usr/bin/pkg-config : pkg-config-2.5.1-1
/usr/bin/grep : grep-3.12-1
I do not know why, but it built with GTK2 instead of GTK3
configure:4811: checking if gtk2 or gtk3 should be used
configure:4838: result: gtk2
and used the following development libraries
GTK_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lpango-1.0 -lgio-2.0 -lcairo -lfontconfig -lharfbuzz -lfreetype -lgobject-2.0 -lglib-2.0
GTK_UNIX_PRINT_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lpango-1.0 -lgio-2.0 -lcairo -lfontconfig -lharfbuzz -lfreetype -lgobject-2.0 -lglib-2.0
so you need the relative packages
-lgtk-x11-2.0 : libgtk2.0-devel
-lharfbuzz : libharfbuzz-devel
....
that you can identify using with `cygcheck-p <filename>`
for -lgtk-x11-2.0 you need to look for file libgtk-x11-2.0.dll.a
$ cygcheck -p libgtk-x11-2.0.dll.a
Found 3 matches for libgtk-x11-2.0.dll.a
libgtk2.0-devel-2.24.31-1 - libgtk2.0-devel: GTK+ X11 GUI toolkit (development)
libgtk2.0-devel-2.24.32-1 - libgtk2.0-devel: GTK+ X11 GUI toolkit (development)
libgtk2.0-devel-2.24.33-1 - libgtk2.0-devel: GTK+ X11 GUI toolkit (development)