0

I am trying to compile the following github package

    https://github.com/openalpr/plate_tagger

Which makes use of qt. The output of cmake is as follows,

CMAKE o/p

    -- The C compiler identification is GNU 4.8.4
    -- The CXX compiler identification is GNU 4.8.4
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/tonystark124/plate_tagger-master/build

When I try make, I am met with the following error :

MAKE o/p

  Scanning dependencies of target openalpr_tagger_automoc
  [  1%] Automoc for target openalpr_tagger
  Generating moc_about.cpp
  Generating moc_directoryloader.cpp
  Generating moc_dot.cpp
  Generating moc_imageview.cpp
  Generating moc_imageviewerbase.cpp
  Generating moc_imageviewerobserver.cpp
  Generating moc_imageviewerplateselector.cpp
  Generating moc_mainwindow.cpp
  Generating moc_options.cpp
  Generating moc_plateselector.cpp
  Generating moc_QProgressIndicator.cpp
  Generating moc_squeezedlabel.cpp
  Generating moc_threadedimageloader.cpp
  [  1%] Built target openalpr_tagger_automoc
  Scanning dependencies of target openalpr_tagger
  [  3%] Building CXX object CMakeFiles/openalpr_tagger.dir/about.cpp.o
  /home/tonystark124/plate_tagger-master/about.cpp:4:22: fatal error: 
  ui_about.h: No such file or directory
  #include "ui_about.h"
                  ^
  compilation terminated.
  make[2]: *** [CMakeFiles/openalpr_tagger.dir/about.cpp.o] Error 1
  make[1]: *** [CMakeFiles/openalpr_tagger.dir/all] Error 2
  make: *** [all] Error 2

Based on comments and suggestions, I tried to locate moc and uic associated with qt5, and I got the following output.

MOC

    which moc
    /usr/bin/moc

    moc -v
    moc 5.2.1

UIC

    which uic
    /usr/bin/uic

    uic -v
    uic 5.2.1

I raised an issue in the git, as no one else seems to have met this obstacle. Upon further search, I am inclined to conclude that am missing some installation/part of qt5. Link1 and Link2 suggest that this is to do with the qt5 and cmake too, but am not able to pinpoint the actual issue.

How do I solve this issue?

UPDATE

This is the output obtained by another person in their system. I have shown the o/p of their cmake and make, compared to mine.

CMAKE o/p

    -- The C compiler identification is GNU 7.2.1
    -- The CXX compiler identification is GNU 7.2.1
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Configuring done
    -- Generating done
    -- Build files have been written to: ~/plate_tagger-master/build

MAKE o/p

    Scanning dependencies of target openalpr_tagger_autogen
    [  1%] Automatic MOC and UIC for target openalpr_tagger
    Generating MOC source EWIEGA46WW/moc_about.cpp
    Generating MOC source EWIEGA46WW/moc_directoryloader.cpp
    Generating MOC source EWIEGA46WW/moc_dot.cpp
    Generating MOC source EWIEGA46WW/moc_imageview.cpp
    Generating MOC source EWIEGA46WW/moc_imageviewerbase.cpp
    Generating MOC source EWIEGA46WW/moc_imageviewerobserver.cpp
    Generating MOC source EWIEGA46WW/moc_imageviewerplateselector.cpp
    Generating MOC source EWIEGA46WW/moc_mainwindow.cpp
    Generating MOC source EWIEGA46WW/moc_options.cpp
    Generating MOC source EWIEGA46WW/moc_plateselector.cpp
    Generating MOC source 53XSUZAO35/moc_QProgressIndicator.cpp
    Generating MOC source EWIEGA46WW/moc_squeezedlabel.cpp
    Generating MOC source EWIEGA46WW/moc_threadedimageloader.cpp
    Generating MOC compilation mocs_compilation.cpp
    Generating UIC header include/ui_about.h
    Generating UIC header include/ui_directoryloader.h
    Generating UIC header include/ui_imageview.h
    Generating UIC header include/ui_mainwindow.h
    Generating UIC header include/ui_options.h
    Generating UIC header include/ui_plateselector.h
    [  1%] Built target openalpr_tagger_autogen
    Scanning dependencies of target openalpr_tagger
Lakshmi Narayanan
  • 5,220
  • 13
  • 50
  • 92
  • 1
    Do you have `moc` and `uic` installed? – arrowd Oct 27 '17 at 05:52
  • installed moc by running sudo apt-get install moc, but something tells me that is not it. Found uic in system at uic-qt4, but am using qt5, qt5 is required by this package. @arrowd – Lakshmi Narayanan Oct 27 '17 at 06:14
  • @arrowd this is the result of moc in my ubuntu locate moc- /usr/bin/moc-qt4 /usr/share/man/man1/moc-qt4.1.gz /usr/share/man/man1/moc-qt5.1.gz – Lakshmi Narayanan Oct 27 '17 at 06:25
  • "sudo apt-get install moc" This is not the `moc` of Qt, which can be found in `qtbase5-dev-tools` along with `uic` for Qt5, at least in Ubuntu 16.04. BTW it's unclear whether your question is about Qt4 or Qt5, or both, and why. – Murphy Oct 27 '17 at 14:00
  • @Murphy, I did check the installation of qtbase5-dev-tools and it is present. the output of my make has been updated in my question. It looks like MOC is generated, but the UIC headers are not – Lakshmi Narayanan Oct 27 '17 at 14:42
  • @Murphy that was added by the question automatically. I had qt4 and installed qt5 to compile this package. I have also included some other information, which I believe can help in providing further insight. Please let me know if that helps. – Lakshmi Narayanan Oct 27 '17 at 14:43

1 Answers1

-1

I do not understand why,but qmake did the trick, instead of cmake

Lakshmi Narayanan
  • 5,220
  • 13
  • 50
  • 92