Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ircddbgateway fails to compile with --without-gui #110

Open
anemitz opened this issue Nov 10, 2016 · 10 comments
Open

ircddbgateway fails to compile with --without-gui #110

anemitz opened this issue Nov 10, 2016 · 10 comments

Comments

@anemitz
Copy link

anemitz commented Nov 10, 2016

pi@raspberrypi:~/OpenDV/ircDDBGateway $ ./configure --without-gui 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
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 gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking whether to enable maintainer-specific portions of Makefiles... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking for wx-config... no
configure: error: 
		wxWidgets must be installed on your system.

		Please check that wx-config is in path, the directory
		where wxWidgets libraries are installed (returned by
		'wx-config --libs' or 'wx-config --static --libs' command)
		is in LD_LIBRARY_PATH or equivalent variable and
		wxWidgets version is 3.0.0 or above.
@anemitz anemitz changed the title ircddbgateway fails to configure with flag --without-gui ircddbgateway fails to compile without wx even if --without-gui is configured Nov 10, 2016
@anemitz
Copy link
Author

anemitz commented Nov 10, 2016

Looking into this a bit more I don't see how this flag would have ever worked. Can anyone confirm this?

@mcdermj
Copy link
Contributor

mcdermj commented Nov 10, 2016

Is wxWidgets installed? The program still requires wxwidgets-base to function because there are threading, string handling and other functions that it uses.

@anemitz
Copy link
Author

anemitz commented Nov 10, 2016

@mcdermj Got it. Compiling now with just libwxbase3.0-dev wx3.0-headers installed and the --without-gui flag. Fingers crossed.

Trying to get a raspberry pi + dvmega running as a hotspot and some of these tutorials are a challenge to get through if you don't want to run a gui / someone else's images.

@anemitz
Copy link
Author

anemitz commented Nov 10, 2016

wx/textctrl.h is only included in wx/wx.h if wxUSE_GUI is set:

https://github.com/wxWidgets/wxWidgets/blob/master/include/wx/wx.h#L81

Looks like an issue since we have a dependency on wxTextCtrl:

GUICommon/RestrictedTextCtrl.h
24:class CRestrictedTextCtrl : public wxTextCtrl {

Which causes this compile error:

g++ -DPACKAGE_NAME=\"ircddbgateway\" -DPACKAGE_TARNAME=\"ircddbgateway\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"ircddbgateway\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DDATA_DIR=\"/usr/local/share/opendv\" -DLOG_DIR=\"/usr/local/var/log/opendv\" -DCONF_DIR=\"/usr/local/etc/opendv\" -I.  -ICommon -I/usr/lib/arm-linux-gnueabihf/wx/include/base-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL   -g -O2  -MT GUICommon/libGUICommon_a-AddressTextCtrl.o -MD -MP -MF GUICommon/.deps/libGUICommon_a-AddressTextCtrl.Tpo -c -o GUICommon/libGUICommon_a-AddressTextCtrl.o `test -f 'GUICommon/AddressTextCtrl.cpp' || echo './'`GUICommon/AddressTextCtrl.cpp
In file included from GUICommon/AddressTextCtrl.h:24:0,
                 from GUICommon/AddressTextCtrl.cpp:19:
GUICommon/RestrictedTextCtrl.h:24:47: error: expected class-name before ‘{’ token
 class CRestrictedTextCtrl : public wxTextCtrl {
                                               ^
GUICommon/RestrictedTextCtrl.h:26:77: error: ‘wxPoint’ does not name a type
  CRestrictedTextCtrl(wxWindow* parent, int id, const wxString& value, const wxPoint& pos, const wxSize& size, long style, const wxString& wantedChars);
                                                                             ^
GUICommon/RestrictedTextCtrl.h:26:97: error: ‘wxSize’ does not name a type
  CRestrictedTextCtrl(wxWindow* parent, int id, const wxString& value, const wxPoint& pos, const wxSize& size, long style, const wxString& wantedChars);
                                                                                                 ^
In file included from GUICommon/AddressTextCtrl.cpp:19:0:
GUICommon/AddressTextCtrl.h:31:74: error: ‘wxPoint’ does not name a type
  CAddressTextCtrl(wxWindow* parent, int id, const wxString& value, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0L);
                                                                          ^
GUICommon/AddressTextCtrl.h:31:114: error: ‘wxSize’ does not name a type
  CAddressTextCtrl(wxWindow* parent, int id, const wxString& value, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0L);
                                                                                                                  ^
GUICommon/AddressTextCtrl.h:31:89: error: ‘wxDefaultPosition’ was not declared in this scope
  CAddressTextCtrl(wxWindow* parent, int id, const wxString& value, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0L);
                                                                                         ^
In file included from GUICommon/AddressTextCtrl.cpp:19:0:
GUICommon/AddressTextCtrl.h:31:129: error: ‘wxDefaultSize’ was not declared in this scope
  CAddressTextCtrl(wxWindow* parent, int id, const wxString& value, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0L);
                                                                                                                                 ^
GUICommon/AddressTextCtrl.cpp:21:91: error: ‘wxPoint’ does not name a type
 CAddressTextCtrl::CAddressTextCtrl(wxWindow* parent, int id, const wxString& value, const wxPoint& pos, const wxSize& size, long style) :
                                                                                           ^
GUICommon/AddressTextCtrl.cpp:21:111: error: ‘wxSize’ does not name a type
 CAddressTextCtrl::CAddressTextCtrl(wxWindow* parent, int id, const wxString& value, const wxPoint& pos, const wxSize& size, long style) :
                                                                                                               ^
Makefile:2764: recipe for target 'GUICommon/libGUICommon_a-AddressTextCtrl.o' failed
make: *** [GUICommon/libGUICommon_a-AddressTextCtrl.o] Error 1

@anemitz anemitz changed the title ircddbgateway fails to compile without wx even if --without-gui is configured ircddbgateway fails to compile with --without-gui Nov 10, 2016
@anemitz
Copy link
Author

anemitz commented Nov 10, 2016

Even with libwxgtk3.0-dev installed I still hit this with --without-gui:

pi@raspberrypi:~/OpenDV/ircDDBGateway $ dpkg -s libwxgtk3.0-dev
Package: libwxgtk3.0-dev
Status: install ok installed
Priority: optional
Section: libdevel
Installed-Size: 197
Maintainer: wxWidgets Maintainers <[email protected]>
Architecture: armhf
Source: wxwidgets3.0
Version: 3.0.2-1
Depends: wx-common, wx3.0-headers (= 3.0.2-1), libwxgtk3.0-0 (= 3.0.2-1), libwxbase3.0-dev (= 3.0.2-1), libgl1-mesa-dev | libgl-dev, xlibmesa-glu-dev | libglu-dev
Suggests: wx3.0-doc, gettext
Description: wxWidgets Cross-platform C++ GUI toolkit (GTK+ development)
 wxWidgets (formerly known as wxWindows) is a class library for C++ providing
 GUI components and other facilities on several popular platforms (and some
 unpopular ones as well).
 .
 This package provides files needed to compile wxWidgets programs.  If you
 want to compile apps using the (optional) glcanvas library you will need
 to have Mesa or OpenGL installed too.
 .
 This package also provides the wx-config script.
Homepage: http://www.wxwidgets.org/
pi@raspberrypi:~/OpenDV/ircDDBGateway $ make clean
test -z "texttransmit voicetransmit aprstransmit remotecontrold " || rm -f texttransmit voicetransmit aprstransmit remotecontrold 
test -z "libCommon.a libircDDB.a libGUICommon.a" || rm -f libCommon.a libircDDB.a libGUICommon.a
test -z "ircddbgatewayd starnetserverd aprstransmitd timercontrold timeserverd" || rm -f ircddbgatewayd starnetserverd aprstransmitd timercontrold timeserverd
rm -f *.o
rm -f APRSTransmit/*.o
rm -f Common/*.o
rm -f GUICommon/*.o
rm -f RemoteControl/*.o
rm -f StarNetServer/*.o
rm -f TextTransmit/*.o
rm -f TimeServer/*.o
rm -f TimerControl/*.o
rm -f VoiceTransmit/*.o
rm -f ircDDB/*.o
rm -f ircDDBGateway/*.o
rm -f ircDDBGatewayConfig/*.o
pi@raspberrypi:~/OpenDV/ircDDBGateway $ ./configure --without-gui
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
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 gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking whether to enable maintainer-specific portions of Makefiles... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
pi@raspberrypi:~/OpenDV/ircDDBGateway $ make
g++ -DPACKAGE_NAME=\"ircddbgateway\" -DPACKAGE_TARNAME=\"ircddbgateway\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"ircddbgateway\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DDATA_DIR=\"/usr/local/share/opendv\" -DLOG_DIR=\"/usr/local/var/log/opendv\" -DCONF_DIR=\"/usr/local/etc/opendv\" -I.  -ICommon -IircDDB    -g -O2 -MT Common/libCommon_a-AMBEData.o -MD -MP -MF Common/.deps/libCommon_a-AMBEData.Tpo -c -o Common/libCommon_a-AMBEData.o `test -f 'Common/AMBEData.cpp' || echo './'`Common/AMBEData.cpp
In file included from Common/AMBEData.h:22:0,
                 from Common/AMBEData.cpp:19:
Common/HeaderData.h:22:19: fatal error: wx/wx.h: No such file or directory
 #include <wx/wx.h>
                   ^
compilation terminated.
Makefile:1854: recipe for target 'Common/libCommon_a-AMBEData.o' failed
make: *** [Common/libCommon_a-AMBEData.o] Error 1

without the --without-gui flag installation works fine.

@mcdermj
Copy link
Contributor

mcdermj commented Nov 13, 2016

This is really a dupe of #108 it seems. I committed some code to my repo at:

https://github.com/mcdermj/OpenDV/tree/nogui-build

Try that out and see if it works for you. I'll do a pull request on it if it seems to be okay.

If you're just looking for Raspberry Pi packages, I build them on my Jenkins CI server on every commit and they show up in our Compass Linux repository at http://archive.compasslinux.org. They should be fully usable if you want to just download the individual .debs and install them individually.

@sh123
Copy link

sh123 commented Jan 16, 2018

Trying to build for system without X11 (and wxWidgets), console only Raspberry with --without-gui. Fails on looking for wxWidgets.

Also tried link from @mcdermj and it fails as well.

Why wxWidgets is needed for console only version?

checking for wx-config... no

configure: error: 
                wxWidgets must be installed on your system.

                Please check that wx-config is in path, the directory
                where wxWidgets libraries are installed (returned by
                'wx-config --libs' or 'wx-config --static --libs' command)
                is in LD_LIBRARY_PATH or equivalent variable and
                wxWidgets version is 3.0.0 or above.

@mcdermj
Copy link
Contributor

mcdermj commented Jan 16, 2018

wxWidgets is required even using --without-gui. The networking and threading libraries of wxWidgets are used in the code and are necessary.

@sh123
Copy link

sh123 commented Jan 18, 2018

@mcdermj, thank you, just did apt-get libwxbase3.0-dev, which is non-GUI package, and used your branch to compile without GUI. Original OpenDV did not compile, your branch compiled fine without GUI (Raspberry, Debian Wheezy).

@phl0
Copy link
Contributor

phl0 commented Jan 22, 2018

@mcdermj I tested your nongui-build branch as a patch against the current master. It now compiles cleanly on my Debian stretch lite on a RPi3. Can we have that as a PR against the upstream repo pls?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants