cannot build wxWidgets from source. errors at make. gtk linux.

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
kau-92
In need of some credit
In need of some credit
Posts: 3
Joined: Fri Jan 15, 2021 5:15 pm

cannot build wxWidgets from source. errors at make. gtk linux.

Post by kau-92 »

wxwidgets version (attempting to build from source) : wxWidgets-3.1.4
platform : Linux 5.9.0-4-amd64 , Debian
To install a gtk-build, I've tried the commands make and gmake.
I know I have the compilers GCC and g++.


The errors happen at the issue of command 'make' , after command 'configure'.

--------------------------------------

Hello,

I am trying to build wxwidgets from source, gtk build for debian. I would like to have options to use SDL with it (and
OpenGl if possible).

I've made the gtk_build directory and managed to get past configure command seemingly with no problem.

but assuming i've used configue with default setting and with the sdl library option,
I get a long error when I try to run make. (I've also used gmake, same type of error).


-------------------------------------

so with the command : ../configure --with-gtk=3 --with-sdl
and the the command : make

I get some text spooling and an error at end.
this is the last part of that text spool:

/home/kau/docs/data/apps/app_setups/wxwidgets (C++ GUI framework)/wxWidgets-3.1.4 - Development Release/build_gtk/bk-deps g++ -c -o gldll_glcmn.o -I/home/kaushan/docs/data/apps/app_setups/wxwidgets (C++ GUI framework)/wxWidgets-3.1.4 - Development Release/build_gtk/src/tiff/libtiff -I../src/tiff/libtiff -I../src/jpeg -I../src/regex -D_FILE_OFFSET_BITS=64 -I/home/kaushan/docs/data/apps/app_setups/wxwidgets (C++ GUI framework)/wxWidgets-3.1.4 - Development Release/build_gtk/lib/wx/include/gtk3-unicode-3.1 -I../include -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -D__WXGTK__ -DWXBUILDING -DWXUSINGDLL -DWXMAKINGDLL_GL -fPIC -DPIC -pthread -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wno-deprecated-declarations -O2 -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gtk-3.0/unix-print -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -fvisibility=hidden -fvisibility-inlines-hidden ../src/common/glcmn.cpp
/bin/sh: 1: Syntax error: word unexpected (expecting ")")
make: *** [Makefile:36713: gldll_glcmn.o] Error 2

I've looked and seen 'gldll_glcmn.o' is something in the makefile.

-------------------------------------




For OpenGl, in the package manager under libgl1-mesa-dev (installed) it says : 'trasitional dummy package'.
I don't know if it's something to do with the OpenGl,

but I enter command : ../configure --with-gtk=3 --with-sdl --without-opengl
and I run command : make

I get this at the end of the text spool:

/home/kau/docs/data/apps/app_setups/wxwidgets (C++ GUI framework)/wxWidgets-3.1.4 - Development Release/build_gtk/bk-deps g++ -c -o stcdll_stc.o -I/home/kaushan/docs/data/apps/app_setups/wxwidgets (C++ GUI framework)/wxWidgets-3.1.4 - Development Release/build_gtk/src/tiff/libtiff -I../src/tiff/libtiff -I../src/jpeg -I../src/regex -D_FILE_OFFSET_BITS=64 -I/home/kaushan/docs/data/apps/app_setups/wxwidgets (C++ GUI framework)/wxWidgets-3.1.4 - Development Release/build_gtk/lib/wx/include/gtk3-unicode-3.1 -I../include -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -D__WXGTK__ -DWXBUILDING -I../src/stc/scintilla/include -I../src/stc/scintilla/lexlib -I../src/stc/scintilla/src -D__WX__ -DSCI_LEXER -DNO_CXX11_REGEX -DLINK_LEXERS -DWXUSINGDLL -DWXMAKINGDLL_STC -fPIC -DPIC -pthread -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wno-deprecated-declarations -O2 -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gtk-3.0/unix-print -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -D_REENTRANT -I/usr/include/SDL2 -fvisibility=hidden -fvisibility-inlines-hidden ../src/stc/stc.cpp
/bin/sh: 1: Syntax error: word unexpected (expecting ")")
make: *** [Makefile:36686: stcdll_stc.o] Error 2

I notice that now the error is at [Makefile:36686: stcdll_stc.o] not [Makefile:36713: gldll_glcmn.o] as previously (does that mean there
was a problem with OpenGL?), but can't understand what this new one is about (or even the previous).


I've changed some of the settings and tested, and believe its not the --with-sdl setting (I tried with both with and without - same error).


---------------------

On the make file :

line 36685: stcdll_stc.o: $(srcdir)/src/stc/stc.cpp $(STCDLL_ODEP)
line 36686: $(CXXC) -c -o $@ $(STCDLL_CXXFLAGS) $(srcdir)/src/stc/stc.cpp

In the previous directory to the current (where make file is), there is a directory called 'src' and in it there is a directory
called 'stc'. There are some files in there, and the readme starts :
'This contrib is the wxStyledTextCtrl, which is a wrapper around the Scintilla edit control. (See www.scintilla.org)'

---------------------

I thought I'd ask if a person is familiar with this kind of error. I'm nearing the end of what I can do today.
Thanks for any help you could give.
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: cannot build wxWidgets from source. errors at make. gtk linux.

Post by DavidHart »

Hi,

Your path-to-wx contains spaces and (perhaps less of a concern) brackets. The first thing to try is to get rid of those; or, if you prefer, create a symlink without them that you can use as your build's pwd.

Regards,

David
kau-92
In need of some credit
In need of some credit
Posts: 3
Joined: Fri Jan 15, 2021 5:15 pm

Re: cannot build wxWidgets from source. errors at make. gtk linux.

Post by kau-92 »

thanks for reply,
I will check the the next coming day.

sorry for posting in the wrong section. #-o
kau-92
In need of some credit
In need of some credit
Posts: 3
Joined: Fri Jan 15, 2021 5:15 pm

Re: cannot build wxWidgets from source. errors at make. gtk linux.

Post by kau-92 »

Hey,

I changed
/home/kau/docs/data/apps/app_setups/wxwidgets (C++ GUI framework)/wxWidgets-3.1.4 - Development Release/build_gtk
to:
/home/kau/docs/data/apps/app_setups/wxwidgets_C++_GUI_framework/wxWidgets-3.1.4_dev_release/build_gtk/

make and the next commands were successful, I think it installed successfully.
Yes the path to the build folder was the problem.

Thanks.
Post Reply