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

Build fails compiling Hunspell Plugins #21

Closed
artmg opened this issue Dec 1, 2016 · 3 comments
Closed

Build fails compiling Hunspell Plugins #21

artmg opened this issue Dec 1, 2016 · 3 comments

Comments

@artmg
Copy link
Owner

artmg commented Dec 1, 2016

Builds across all target Ubuntu versions failing. Example Build log:

In file included from ./gui/nbrowserwindow.h:61:0,
                 from gui/ntabwidget.h:23,
                 from nixnote.h:35,
                 from main.cpp:22:
./plugins/hunspell/hunspellplugin.h:31:23: error: ‘IID’ has not been declared
     Q_PLUGIN_METADATA(IID "org.nixnote.NixNote2.HunspellInterface/2.0");
                       ^~~
./plugins/hunspell/hunspellplugin.h:31:27: error: expected ‘,’ or ‘...’ before string constant
     Q_PLUGIN_METADATA(IID "org.nixnote.NixNote2.HunspellInterface/2.0");
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./plugins/hunspell/hunspellplugin.h:31:71: error: ISO C++ forbids declaration of ‘Q_PLUGIN_METADATA’ with no type [-fpermissive]
     Q_PLUGIN_METADATA(IID "org.nixnote.NixNote2.HunspellInterface/2.0");
                                                                       ^
Makefile.Release:3162: recipe for target 'release/main.o' failed
make[3]: *** [release/main.o] Error 1

dh_auto_build: make -j1 returned exit code 2
@artmg
Copy link
Owner Author

artmg commented Dec 1, 2016

These are very close symptoms to baumgarr issue 219.

Recommended solution "Try compiling against Qt5"

@artmg
Copy link
Owner Author

artmg commented Dec 1, 2016

it appears that qmake is the key to choosing QT version. debian/build currently calls qmake, see extract from logs on current options passed:

 debian/rules build
dh build 
   dh_testdir
   dh_update_autotools_config
   dh_auto_configure
	qmake -makefile -nocache "QMAKE_CFLAGS_RELEASE=-g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" "QMAKE_CFLAGS_DEBUG=-g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" "QMAKE_CXXFLAGS_RELEASE=-g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" "QMAKE_CXXFLAGS_DEBUG=-g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" "QMAKE_LFLAGS_RELEASE=-Wl,-Bsymbolic-functions -Wl,-z,relro" "QMAKE_LFLAGS_DEBUG=-Wl,-Bsymbolic-functions -Wl,-z,relro" QMAKE_STRIP=: PREFIX=/usr
   debian/rules override_dh_auto_build

Numerous possible ways to specify qmake uses QT5 (e.g. switches, env-vars, run version-explicit binary, etc)

As well as changing the way debian/rules calls the dh_auto_build, be also aware that some dependencies in debian/control might refer to explicit qt versions.

@artmg
Copy link
Owner Author

artmg commented Dec 2, 2016

rules option to select qt5 and control files updated - builds now execute successfully

@artmg artmg closed this as completed Dec 2, 2016
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

1 participant