LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-27-2017, 03:35 AM   #1
Tonystark
LQ Newbie
 
Registered: Jul 2013
Posts: 21

Rep: Reputation: Disabled
fatal error: ui_about.h: No such file or directory


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,

-- 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 :

[ 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"

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](http://lists.subsurface-divelog.org/...er/016390.html) and [Link2](https://stackoverflow.com/questions/...f-qt5-in-cmake) 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**

Have included my CMakeLists.txt

cmake_minimum_required(VERSION 2.8.11)

project(openalpr_tagger)

SET(VERSION_MAJOR 1)
SET(VERSION_MINOR 0)
SET(VERSION_PATCH 0)

SET (VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
add_definitions(-DVERSION_MAJOR=${VERSION_MAJOR})
add_definitions(-DVERSION_MINOR=${VERSION_MINOR})
add_definitions(-DVERSION_PATCH=${VERSION_PATCH})
add_definitions(-DVERSION_STRING="${VERSION}")


add_definitions(-DTARGET="openalpr_tagger")
add_definitions(-DTARGET_STRING="openalpr_tagger")
add_definitions(-DTARGET_UPPER_STRING="OPENALPR_TAGGER")
add_definitions(-DTARGET_HUMAN_STRING="openalpr_tagger")

ADD_DEFINITIONS(
-std=c++11
)


# Find the QtWidgets library
find_package(Qt5Widgets)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

# Tell CMake to create the helloworld executable
add_executable(openalpr_tagger
about.cpp
directoryloader.cpp
dot.cpp
imagefile.cpp
imageview.cpp
imageviewerbase.cpp
imageviewerobserver.cpp
imageviewerplateselector.cpp
main.cpp
mainwindow.cpp
options.cpp
platefile.cpp
plateselector.cpp
polygons.cpp
selection.cpp
settings.cpp
squeezedlabel.cpp
threadedimageloader.cpp
utils.cpp
qprogressindicator/QProgressIndicator.cpp

extra/yaml-cpp/src/nodeevents.cpp
extra/yaml-cpp/src/exceptions.cpp
extra/yaml-cpp/src/nodebuilder.cpp
extra/yaml-cpp/src/contrib/graphbuilder.cpp
extra/yaml-cpp/src/contrib/graphbuilderadapter.cpp
extra/yaml-cpp/src/exp.cpp
extra/yaml-cpp/src/binary.cpp
extra/yaml-cpp/src/null.cpp
extra/yaml-cpp/src/parser.cpp
extra/yaml-cpp/src/convert.cpp
extra/yaml-cpp/src/scantag.cpp
extra/yaml-cpp/src/singledocparser.cpp
extra/yaml-cpp/src/scanner.cpp
extra/yaml-cpp/src/directives.cpp
extra/yaml-cpp/src/emitterstate.cpp
extra/yaml-cpp/src/node_data.cpp
extra/yaml-cpp/src/scanscalar.cpp
extra/yaml-cpp/src/scantoken.cpp
extra/yaml-cpp/src/node.cpp
extra/yaml-cpp/src/regex_yaml.cpp
extra/yaml-cpp/src/emitfromevents.cpp
extra/yaml-cpp/src/emitterutils.cpp
extra/yaml-cpp/src/tag.cpp
extra/yaml-cpp/src/memory.cpp
extra/yaml-cpp/src/simplekey.cpp
extra/yaml-cpp/src/ostream_wrapper.cpp
extra/yaml-cpp/src/emit.cpp
extra/yaml-cpp/src/emitter.cpp
extra/yaml-cpp/src/stream.cpp
extra/yaml-cpp/src/parse.cpp

)

include_directories(
${CMAKE_SOURCE_DIR}/qprogressindicator
${CMAKE_SOURCE_DIR}/extra/yaml-cpp/include/
)

# Use the Widgets module from Qt 5.
target_link_libraries(openalpr_tagger Qt5::Widgets)
 
Old 10-27-2017, 08:38 AM   #2
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Looks like you are missing the "moc" (meta object compiler). It is in the package "qtbase5-dev-tools". https://packages.ubuntu.com/trusty/qtbase5-dev-tools
 
1 members found this post helpful.
Old 10-27-2017, 09:01 AM   #3
Tonystark
LQ Newbie
 
Registered: Jul 2013
Posts: 21

Original Poster
Rep: Reputation: Disabled
Smile Thanks for your reply

Thanks for your reply @norobro. I checked and the package was installed and at the newest version. when I tried

locate moc-

I get

/usr/bin/moc-qt4
/usr/share/man/man1/moc-qt4.1.gz
/usr/share/man/man1/moc-qt5.1.gz

I also tried

locate uic-

And I get

/usr/bin/uic-qt4

I tried installing atbase5-dev and qtbase5-private-dev. Am still facing the same error.
 
Old 10-27-2017, 09:14 AM   #4
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Something is wrong or missing from your build setup because make is not finding moc.

The package compiles on my Debian Sid box. Here is the first part of the output from make:
Code:
~/plate_tagger-master/build$ make
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
 
1 members found this post helpful.
Old 10-27-2017, 09:20 AM   #5
Tonystark
LQ Newbie
 
Registered: Jul 2013
Posts: 21

Original Poster
Rep: Reputation: Disabled
Output of cmake

Could you please show me the output of your cmake command? This is the output I get :

-- 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

and this is how my make looks

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

Last edited by Tonystark; 10-27-2017 at 09:22 AM. Reason: addition of make output
 
Old 10-27-2017, 09:28 AM   #6
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Here you go:
Code:
~/plate_tagger-master/build$ cmake ../
-- 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
 
Old 10-27-2017, 09:33 AM   #7
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
From your most recent output it looks like "moc" is invoked but not "uic" (user interface compiler). Both programs are in the qtbase5-dev-tools.
 
Old 10-27-2017, 09:38 AM   #8
Tonystark
LQ Newbie
 
Registered: Jul 2013
Posts: 21

Original Poster
Rep: Reputation: Disabled
true. Could you also please provide the output of "locate moc-" and "locate uic-"?
any idea what I could be missing?
 
Old 10-27-2017, 09:44 AM   #9
Tonystark
LQ Newbie
 
Registered: Jul 2013
Posts: 21

Original Poster
Rep: Reputation: Disabled
Are you using ubuntu 16.04? Could that be a reason?
 
Old 10-27-2017, 09:47 AM   #10
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Code:
$ which moc
/usr/bin/moc

$ which uic
/usr/bin/uic
EDIT: I'm running Debian Sid.

Last edited by norobro; 10-27-2017 at 09:49 AM. Reason: Added response
 
1 members found this post helpful.
Old 10-27-2017, 12:16 PM   #11
Tonystark
LQ Newbie
 
Registered: Jul 2013
Posts: 21

Original Poster
Rep: Reputation: Disabled
qmake did the trick

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


Reply

Tags
cmake, make, ubuntu 14.04



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] fatal error: X11/Xlib.h: No such file or directory joakim12 Linux From Scratch 12 07-22-2017 08:56 AM
dsr/linkcache . fatal error : list.h No such file or directory monasayed Linux - Newbie 15 10-12-2015 02:50 PM
[SOLVED] fatal error: asm/mach/dma.h: No such file or directory Rezo Linux - Kernel 5 11-21-2013 05:14 AM
fatal error: goo/gmem.h: No such file or directory; but file does exist!! lgoldma Linux - General 3 03-07-2013 04:00 PM
gcc fatal error :no such file or directory question NoobLion Programming 2 08-26-2011 12:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration