Canorus SVN build issues

Anonymous
2013-03-31
2013-05-06

  • Anonymous
    2013-03-31

    I am the package maintainer of canorus-svn  for the Arch User Repository (AUR) for Arch Linux. I maintain a bash script in the AUR that allows one to build an installable package, known as a PKGBUILD script 
    I built canorus from svn according the instructions in the README, and I encountered several errors that halted building. The first couple errors were solvable (I used a few sed replacements), and there were no errors up to and including the 'cmake' step, but I encountered another error during the 'make' step that I don't have the knowledge to fix .
    It's the 'trunk/src/ui/settingsdialog.h' file that's causing the issue (as is self-evident from above), and the most pertinent errors *seem* to be

    error: 'Ui' has not been declared
    error: 'virtual' outside class declaration
    

    among others, but I lack the C++ knowledge to figure out more than that. Obviously, the commands I issued are in the PKGBUILD link, and they were always executed from a clean build directory.

      https://aur.archlinux.org/packages/canorus-svn/
    https://github.com/luolimao/PKGBUILDs/blob/master/canorus-svn/PKGBUILD
    https://gist.github.com/luolimao/5278788/raw/8c41df7ed2271b6c2f9adfedc3e0e0180c24e24d/canorus+build+errors

     

  • Anonymous
    2013-03-31

    Hehe, forgot to actually ask a question. Anyway, how can I solve this issue?

     
  • Hi,

    First: Sorry for the late reply. Myself I was awefully loaded with work (and still am).

    For a start could you please state exactly the software components your compilation is based (mainly cmake version, qt version, swig version, python version, gcc version, glibc version).

    I use Ubuntu 12.04 that is now over a year old so there might be problems with more recents tools.

    Note that for the user interface many files are generated by Qt itself, so you'd need to carefully look upon which the file that failed to build depends on.

    At a first glance it looks like there is a problem with the Qt development files (here 4.8.1 is used). Also note that we currently do not support Qt5 (but gladly accept patches).

    I can add (temporary) support for later software packages as long as there is a Ubuntu repository (Often available as PPA, hosted on https://launchpad.net/) is available.

    I will now look at the errors in detail.

    Regards,

    Reinhard

     
  • So far I identified from the Logs: GCC 4.7.2, Qt 4.8.4, Ruby 2.0, Python 3.3.0

    I have no idea if python 3.x works at all, I still use version 2.7.3. Anything else ought to work.
    As you use a script for building I will try to get that working on my system in the evening (sorry, I forgot yesterday that I had a rehearsal soon after I wrote the previous message).

     
  • So far I have found no problems on my system with building. Did you try using VERBOSE=1 ? One problem is that the trunk/src directory seems not to be part of the include path.

    Building CXX object src/CMakeFiles/canorus.dir/canorus.cpp.o
    cd /path/to/canorus/trunk/src && /usr/bin/c++   -D__LINUX_ALSASEQ__ -DDEFAULT_DATA_DIR=\"/usr/share/canorus\" -DCANORUS_VERSION=\"0.7svn\" -DUSE_SWIG -DUSE_PYTHON -DQT_SVG_LIB -DQT_HELP_LIB -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQT_NO_DEBUG -O2 -I/path/to/canorus/trunk/src -I/path/to/canorus/trunk/src/zlib -I/usr/include/qt4 -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtHelp -I/usr/include/qt4/QtWebKit -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtCore -I/usr/include/python2.7    -o CMakeFiles/canorus.dir/canorus.cpp.o -c /path/to/canorus/trunk/src/canorus.cpp

    or

    Building CXX object src/CMakeFiles/canorus.dir/main.cpp.o
    cd /path/to/canorus/trunk/src && /usr/bin/c++   -D__LINUX_ALSASEQ__ -DDEFAULT_DATA_DIR=\"/usr/share/canorus\" -DCANORUS_VERSION=\"0.7svn\" -DUSE_SWIG -DUSE_PYTHON -DQT_SVG_LIB -DQT_HELP_LIB -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQT_NO_DEBUG -O2 -I/path/to/canorus/trunk/src -I/path/to/canorus/trunk/src/zlib -I/usr/include/qt4 -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtHelp -I/usr/include/qt4/QtWebKit -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtCore -I/usr/include/python2.7    -o CMakeFiles/canorus.dir/main.cpp.o -c /path/to/canorus/trunk/src/main.cpp

    Yes, the ui_ prefix is mandatory, actually by design from Qt4 itself.

    As you have a different version of Qt you might want to check the uic generated file itself. On my system Ui f.e. is defined as

    namespace Ui {
        class uiSettingsDialog: public Ui_uiSettingsDialog {};
    } // namespace Ui

    in the generated src/ui_settingsdialog.h.

    To help you further I'd need first and foremost a log file with activated VERBOSE=1. Maybe the generated files are put in the wrong directory or something different messed up (posting the ui_settingsdialog.h could be helpful too).

     
  • Hi,

    Thanks for the new log. As I suspected it is a path problem:

    cd /home/…/build/canorus-svn/src/canorus-svn/build/src && /usr/bin/c++   -DCANORUS_VERSION=\"0.7svn\" -DDEFAULT_DATA_DIR=\"/usr/share/canorus\" -DQT_CORE_LIB -DQT_GUI_LIB -DQT_HELP_LIB -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WEBKIT_LIB -DQT_XML_LIB -DUSE_PYTHON -DUSE_SWIG -D__LINUX_ALSASEQ__ -O2 -I/home/…/build/canorus-svn/src/canorus-svn/src -I/home/…/build/canorus-svn/src/canorus-svn/src/zlib -I/usr/include/qt4 -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtHelp -I/usr/include/qt4/QtWebKit -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtCore -I/usr/include/python3.3m    -o CMakeFiles/canorus.dir/main.cpp.o -c /home/…/build/canorus-svn/src/canorus-svn/src/main.cpp

    Look at "/build/canorus-svn/src/canorus-svn/src"

    The canorus-svn/src part is twice here, so it does not find the header file ui_settingsdialog.h.
    This does not happen on my compile, so now we have to find out where this happens.

    Unfortunately I found out that already at the start there seems to be something incorrect:

    • Build files have been written to: /home/…/build/canorus-svn/src/canorus-svn/build

    I've not seen an obvious path problem in the package script on github itself, though I suspect a problem with the build line(s)

    build()
    {
      cd $pkgname/
      install -d build/

    Regards

     
  • Limao Luo
    Limao Luo
    2013-05-03

    Regarding the canorus-svn/src/ appearing twice, that is expected; the top level is a packaging structure created by makepkg (the program that reads PKGBUILDs and builds a package from them) and the bottom level is the directory structure that I created in the PKGBUILD. Anyway, removing all the references to build/ didn't seem to help; I'll try to figure out how to add that dir to the source path later.

     
  • It's not a problem with the separate build directory. That should work perfectly fine.

    The only problem is that if you use such a directory all temporarily created header files could (should) be put there as well - and make sure that the compiler does find these headers in the new (or src) directory.

    I have often seen such a separation but the approach how the created source/header files are handled can create headache sometimes ;) (especially if the project did not foresee a separation and you have to make a lot of patches to Makefiles...)