Issues in the compilation and building Ubuntu 23.10

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
Raphy
Experienced Solver
Experienced Solver
Posts: 62
Joined: Fri Jan 05, 2024 12:15 pm

Issues in the compilation and building Ubuntu 23.10

Post by Raphy »

I remove wxWidgets folder and tried to configure, compile and build it from scratch again, but I'm getting


git cloned wxWidgets folder and sub-directories:

Code: Select all

raphy@raohy:~$ git clone --recurse-submodules https://github.com/wxWidgets/wxWidgets.git
Cloning into 'wxWidgets'...
remote: Enumerating objects: 891693, done.
remote: Counting objects: 100% (1252/1252), done.
remote: Compressing objects: 100% (617/617), done.
remote: Total 891693 (delta 704), reused 1062 (delta 624), pack-reused 890441
Receiving objects: 100% (891693/891693), 395.75 MiB | 35.31 MiB/s, done.
Resolving deltas: 100% (739408/739408), done.
Submodule '3rdparty/catch' (https://github.com/wxWidgets/Catch.git) registered for path '3rdparty/catch'
Submodule '3rdparty/nanosvg' (https://github.com/wxWidgets/nanosvg) registered for path '3rdparty/nanosvg'
Submodule '3rdparty/pcre' (https://github.com/wxWidgets/pcre) registered for path '3rdparty/pcre'
Submodule 'src/expat' (https://github.com/wxWidgets/libexpat.git) registered for path 'src/expat'
Submodule 'src/jpeg' (https://github.com/wxWidgets/libjpeg-turbo.git) registered for path 'src/jpeg'
Submodule 'src/png' (https://github.com/wxWidgets/libpng.git) registered for path 'src/png'
Submodule 'src/stc/lexilla' (https://github.com/wxWidgets/lexilla.git) registered for path 'src/stc/lexilla'
Submodule 'src/stc/scintilla' (https://github.com/wxWidgets/scintilla.git) registered for path 'src/stc/scintilla'
Submodule 'src/tiff' (https://github.com/wxWidgets/libtiff.git) registered for path 'src/tiff'
Submodule 'src/zlib' (https://github.com/wxWidgets/zlib.git) registered for path 'src/zlib'
Cloning into '/home/raphy/wxWidgets/3rdparty/catch'...
remote: Enumerating objects: 25189, done.        
remote: Counting objects: 100% (2169/2169), done.        
remote: Compressing objects: 100% (189/189), done.        
remote: Total 25189 (delta 2050), reused 1980 (delta 1980), pack-reused 23020        
Receiving objects: 100% (25189/25189), 15.85 MiB | 24.89 MiB/s, done.
Resolving deltas: 100% (17515/17515), done.
Cloning into '/home/raphy/wxWidgets/3rdparty/nanosvg'...
remote: Enumerating objects: 503, done.        
remote: Counting objects: 100% (196/196), done.        
remote: Compressing objects: 100% (25/25), done.        
remote: Total 503 (delta 181), reused 171 (delta 171), pack-reused 307        
Receiving objects: 100% (503/503), 706.83 KiB | 7.52 MiB/s, done.
Resolving deltas: 100% (245/245), done.
Cloning into '/home/raphy/wxWidgets/3rdparty/pcre'...
remote: Enumerating objects: 12349, done.        
remote: Counting objects: 100% (6635/6635), done.        
remote: Compressing objects: 100% (213/213), done.        
remote: Total 12349 (delta 6464), reused 6425 (delta 6422), pack-reused 5714        
Receiving objects: 100% (12349/12349), 6.33 MiB | 19.81 MiB/s, done.
Resolving deltas: 100% (10590/10590), done.
Cloning into '/home/raphy/wxWidgets/src/expat'...
remote: Enumerating objects: 18686, done.        
remote: Counting objects: 100% (3101/3101), done.        
remote: Compressing objects: 100% (95/95), done.        
remote: Total 18686 (delta 3040), reused 3006 (delta 3006), pack-reused 15585        
Receiving objects: 100% (18686/18686), 15.05 MiB | 25.48 MiB/s, done.
Resolving deltas: 100% (14056/14056), done.
Cloning into '/home/raphy/wxWidgets/src/jpeg'...
remote: Enumerating objects: 12347, done.        
remote: Total 12347 (delta 0), reused 0 (delta 0), pack-reused 12347        
Receiving objects: 100% (12347/12347), 11.65 MiB | 20.05 MiB/s, done.
Resolving deltas: 100% (8926/8926), done.
Cloning into '/home/raphy/wxWidgets/src/png'...
remote: Enumerating objects: 106958, done.        
remote: Counting objects: 100% (18176/18176), done.        
remote: Compressing objects: 100% (110/110), done.        
remote: Total 106958 (delta 18123), reused 18066 (delta 18066), pack-reused 88782        
Receiving objects: 100% (106958/106958), 38.02 MiB | 32.07 MiB/s, done.
Resolving deltas: 100% (96929/96929), done.
Cloning into '/home/raphy/wxWidgets/src/stc/lexilla'...
remote: Enumerating objects: 46526, done.        
remote: Counting objects: 100% (3776/3776), done.        
remote: Compressing objects: 100% (1326/1326), done.        
remote: Total 46526 (delta 2485), reused 3498 (delta 2377), pack-reused 42750        
Receiving objects: 100% (46526/46526), 8.37 MiB | 21.52 MiB/s, done.
Resolving deltas: 100% (36342/36342), done.
Cloning into '/home/raphy/wxWidgets/src/stc/scintilla'...
remote: Enumerating objects: 48746, done.        
remote: Counting objects: 100% (3362/3362), done.        
remote: Compressing objects: 100% (790/790), done.        
remote: Total 48746 (delta 2554), reused 3293 (delta 2526), pack-reused 45384        
Receiving objects: 100% (48746/48746), 14.91 MiB | 22.92 MiB/s, done.
Resolving deltas: 100% (38628/38628), done.
Cloning into '/home/raphy/wxWidgets/src/tiff'...
remote: Enumerating objects: 37872, done.        
remote: Counting objects: 100% (525/525), done.        
remote: Compressing objects: 100% (207/207), done.        
remote: Total 37872 (delta 334), reused 427 (delta 316), pack-reused 37347        
Receiving objects: 100% (37872/37872), 13.67 MiB | 23.97 MiB/s, done.
Resolving deltas: 100% (29330/29330), done.
Cloning into '/home/raphy/wxWidgets/src/zlib'...
remote: Enumerating objects: 5728, done.        
remote: Counting objects: 100% (2061/2061), done.        
remote: Compressing objects: 100% (145/145), done.        
remote: Total 5728 (delta 1953), reused 1916 (delta 1916), pack-reused 3667        
Receiving objects: 100% (5728/5728), 3.79 MiB | 19.29 MiB/s, done.
Resolving deltas: 100% (4071/4071), done.
Submodule path '3rdparty/catch': checked out '18bf9ebaefbefb3018528138a85322cff5aba93e'
remote: Enumerating objects: 135, done.
remote: Counting objects: 100% (97/97), done.
remote: Compressing objects: 100% (59/59), done.
remote: Total 135 (delta 54), reused 60 (delta 38), pack-reused 38
Receiving objects: 100% (135/135), 74.34 KiB | 2.40 MiB/s, done.
Resolving deltas: 100% (60/60), completed with 5 local objects.
From https://github.com/wxWidgets/nanosvg
 * branch            93ce879dc4c04a3ef1758428ec80083c38610b1f -> FETCH_HEAD
Submodule path '3rdparty/nanosvg': checked out '93ce879dc4c04a3ef1758428ec80083c38610b1f'
Submodule path '3rdparty/pcre': checked out 'cff292bef3c1abd31671741a153436918ad8eed2'
Submodule path 'src/expat': checked out '23b7f47ef6043929b648de53ac04024c4ac7afcb'
Submodule path 'src/jpeg': checked out '852493611506076fd9ad931d35bf1c3cc5b5a9c3'
Submodule path 'src/png': checked out 'd675c669c8250b7da55747c81a5bd01504449e6e'
Submodule path 'src/stc/lexilla': checked out 'e1fc0520777932a6c2d5d82eca4911ee264e7b8d'
Submodule path 'src/stc/scintilla': checked out '0b90f31ced23241054e8088abb50babe9a44ae67'
Submodule path 'src/tiff': checked out '227d3d489f5a336b5a7c22666562e88f2cd94a2a'
Submodule path 'src/zlib': checked out 'a6c8900ecb9da7ac0d2a67467258fd4c1814b780'

Following the indications for the installation with gtk: https://github.com/wxWidgets/wxWidgets/ ... install.md

Code: Select all

raphy@raohy:~/wxWidgets$ mkdir buildgtk
raphy@raohy:~/wxWidgets$ 

raphy@raohy:~/wxWidgets$ cd buildgtk/
raphy@raohy:~/wxWidgets/buildgtk$ 


raphy@raohy:~/wxWidgets/buildgtk$ ../configure --with-gtk --enable-debug --enable-webview 
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for toolkit... gtk
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether we are using the Intel C compiler... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc needs -traditional... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether we are using the Intel C++ compiler... no
checking whether we are using the Sun C++ compiler... no
checking whether g++ supports C++11 features by default... yes
checking for ar... ar
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for langinfo.h... yes
checking for wchar.h... yes
checking for sys/select.h... yes
checking for cxxabi.h... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking size of short... 2
checking size of void *... 8
checking size of int... 4
checking size of long... 8
checking size of size_t... 8
checking size of long long... 8
checking size of wchar_t... 4
checking for va_copy... yes
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking if large file support is available... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking whether byte ordering is bigendian... no
checking for __sync_xxx_and_fetch builtins... yes
checking for libraries directories... /usr/lib/x86_64-linux-gnu /usr/lib
checking for cos... no
checking for floor... no
checking if floating point functions link without -lm... no
checking for sin... yes
checking for ceil... yes
checking if floating point functions link with -lm... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBPCRE... yes
checking for zlib.h >= 1.1.4... yes
checking for zlib.h... (cached) yes
checking for deflate in -lz... yes
checking for png.h > 0.90... yes
checking for png.h... (cached) yes
checking for png_sig_cmp in -lpng... yes
checking for jpeglib.h... yes
checking for jpeg_read_header in -ljpeg... yes
checking for jbg_dec_init in -ljbig... yes
checking for LIBTIFF... yes
checking for expat.h... yes
checking if expat.h is valid C++ header... yes
checking for XML_ParserCreate in -lexpat... yes
checking for LIBCURL... yes
checking for GTK... configure: error: Package requirements (gtk+-3.0) were not met:

Package dependency requirement 'gobject-2.0 >= 2.62' could not be satisfied.
Package 'gobject-2.0' has version '2.8.6', required version is '>= 2.62'
Package dependency requirement 'gobject-2.0 >= 2.62' could not be satisfied.
Package 'gobject-2.0' has version '2.8.6', required version is '>= 2.62'
Package dependency requirement 'gobject-2.0 >= 2.56.0' could not be satisfied.
Package 'gobject-2.0' has version '2.8.6', required version is '>= 2.56.0'
Package dependency requirement 'glib-2.0 >= 2.14' could not be satisfied.
Package 'glib-2.0' has version '2.8.6', required version is '>= 2.14'
Package dependency requirement 'glib-2.0 >= 2.67.4' could not be satisfied.
Package 'glib-2.0' has version '2.8.6', required version is '>= 2.67.4'
Package dependency requirement 'glib-2.0 >= 2.14' could not be satisfied.
Package 'glib-2.0' has version '2.8.6', required version is '>= 2.14'
Package dependency requirement 'gobject-2.0 >= 2.56.0' could not be satisfied.
Package 'gobject-2.0' has version '2.8.6', required version is '>= 2.56.0'

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GTK_CFLAGS
and GTK_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

raphy@raohy:~/wxWidgets/buildgtk$ 
`make` phase: `no target specified`:

Code: Select all

raphy@raohy:~/wxWidgets/buildgtk$ make
make: *** No targets specified and no makefile found.  Stop.
raphy@raohy:~/wxWidgets/buildgtk$ make ..
make: Nothing to be done for '..'.
with `cmake` : `Could NOT find GTK3 (missing: GTK3_INCLUDE_DIRS GTK3_LIBRARIES)`

Code: Select all

raphy@raohy:~/wxWidgets$ cmake -B builddir
CMake Error at /usr/local/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find GTK3 (missing: GTK3_INCLUDE_DIRS GTK3_LIBRARIES)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  build/cmake/modules/FindGTK3.cmake:51 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  build/cmake/toolkit.cmake:81 (find_package)
  build/cmake/main.cmake:15 (include)
  CMakeLists.txt:100 (include)


-- Configuring incomplete, errors occurred!
But libgtk-3-dev already installed:

Code: Select all

raphy@raohy:~/wxWidgets$ sudo apt-get install build-essential libgtk-3-dev
[sudo] password for raphy: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
build-essential is already the newest version (12.10ubuntu1).
libgtk-3-dev is already the newest version (3.24.38-5ubuntu1).
O.S.: Ubuntu 23.10

What am I missing? How to correctly proceed with the compilation and the installation?
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Issues in the compilation and building Ubuntu 23.10

Post by DavidHart »

Hi,

Two suggestions:

1) Different distros seem to install gtk to different places. The following is a workaround from this link.

Code: Select all

Building some of the samples provided by the wx3.2-examples package may fail because of failure to detect GTK+ files. If so, try this compilation line:
LDFLAGS=$(pkg-config --libs gtk+-3.0) CXXFLAGS=$(pkg-config --cflags gtk+-3.0) make -j$(nproc)
2) If that fails, look in <build-dir>/config.status and/or config.log just before the relevant error message; if that fails, look in the configure script itself.

Regards,

David
Raphy
Experienced Solver
Experienced Solver
Posts: 62
Joined: Fri Jan 05, 2024 12:15 pm

Re: Issues in the compilation and building Ubuntu 23.10

Post by Raphy »

Hi David!

I discovered it was an issue related to my previous CMake installation
Post Reply