JuliaGraphics / jlqml

C++ component of the QML.jl package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fatal error with running 'make' in the `jlqml-build` directory

mantzaris opened this issue · comments

I am getting a very similar error, when running make, within the 'jlqml-build' folder:

make
[  7%] Automatic moc for target jlqml
[  7%] Built target jlqml_automoc
[ 14%] Building CXX object CMakeFiles/jlqml.dir/application_manager.cpp.o
In file included from /home/xel/repos/jlqml/application_manager.cpp:1:0:
/home/***/repos/jlqml/application_manager.hpp:6:33: fatal error: QQmlApplicationEngine: No such file or directory
 #include <QQmlApplicationEngine>
                                 ^
compilation terminated.
CMakeFiles/jlqml.dir/build.make:62: recipe for target 'CMakeFiles/jlqml.dir/application_manager.cpp.o' failed
make[2]: *** [CMakeFiles/jlqml.dir/application_manager.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/jlqml.dir/all' failed
make[1]: *** [CMakeFiles/jlqml.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

The output from the previous step was

repos/jlqml-build$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/path/to/cxxwrap ../jlqml
CMake Warning at CMakeLists.txt:10 (find_package):
  By not providing "FindQt5Quick.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Quick",
  but CMake did not find one.

  Could not find a package configuration file provided by "Qt5Quick" with any
  of the following names:

    Qt5QuickConfig.cmake
    qt5quick-config.cmake

  Add the installation prefix of "Qt5Quick" to CMAKE_PREFIX_PATH or set
  "Qt5Quick_DIR" to a directory containing one of the above files.  If
  "Qt5Quick" provides a separate development package or SDK, be sure it has
  been installed.


CMake Warning at CMakeLists.txt:12 (find_package):
  By not providing "FindQt5Svg.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Svg", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5Svg" with any
  of the following names:

    Qt5SvgConfig.cmake
    qt5svg-config.cmake

  Add the installation prefix of "Qt5Svg" to CMAKE_PREFIX_PATH or set
  "Qt5Svg_DIR" to a directory containing one of the above files.  If "Qt5Svg"
  provides a separate development package or SDK, be sure it has been
  installed.


CMake Warning at CMakeLists.txt:14 (find_package):
  By not providing "FindJlCxx.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "JlCxx", but
  CMake did not find one.

  Could not find a package configuration file provided by "JlCxx" with any of
  the following names:

    JlCxxConfig.cmake
    jlcxx-config.cmake

  Add the installation prefix of "JlCxx" to CMAKE_PREFIX_PATH or set
  "JlCxx_DIR" to a directory containing one of the above files.  If "JlCxx"
  provides a separate development package or SDK, be sure it has been
  installed.


CMake Warning (dev) at CMakeLists.txt:18 (get_target_property):
  Policy CMP0045 is not set: Error on non-existent target in
  get_target_property.  Run "cmake --help-policy CMP0045" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  get_target_property() called with non-existent target
  "JlCxx::cxxwrap_julia".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found JlCxx at 
-- Configuring done
CMake Warning (dev) at CMakeLists.txt:58 (add_library):
  Policy CMP0028 is not set: Double colon in target name means ALIAS or
  IMPORTED target.  Run "cmake --help-policy CMP0028" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  Target "jlqml" links to target "Qt5::Quick" but the target was not found.
  Perhaps a find_package() call is missing for an IMPORTED target, or an
  ALIAS target is missing?
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:58 (add_library):
  Policy CMP0028 is not set: Double colon in target name means ALIAS or
  IMPORTED target.  Run "cmake --help-policy CMP0028" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  Target "jlqml" links to target "Qt5::Svg" but the target was not found.
  Perhaps a find_package() call is missing for an IMPORTED target, or an
  ALIAS target is missing?
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:58 (add_library):
  Policy CMP0028 is not set: Double colon in target name means ALIAS or
  IMPORTED target.  Run "cmake --help-policy CMP0028" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  Target "jlqml" links to target "JlCxx::cxxwrap_julia" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/***/repos/jlqml-build

upon attempting to build QML

(v1.1) pkg> build QML
  Building CxxWrap ─────────→ `~/.julia/packages/CxxWrap/sarOk/deps/build.log`
  Building FreeType ────────→ `~/.julia/packages/FreeType/2dE5w/deps/build.log`
  Building Conda ───────────→ `~/.julia/packages/Conda/CpuvI/deps/build.log`
  Building FFTW ────────────→ `~/.julia/packages/FFTW/p7sLQ/deps/build.log`
  Building ImageMagick ─────→ `~/.julia/packages/ImageMagick/J74FC/deps/build.log`
  Building SpecialFunctions → `~/.julia/packages/SpecialFunctions/fvheQ/deps/build.log`
  Building Homebrew ────────→ `~/.julia/packages/Homebrew/s09IX/deps/build.log`
  Building CMake ───────────→ `~/.julia/packages/CMake/ZGawK/deps/build.log`
  Building GLFW ────────────→ `~/.julia/packages/GLFW/69NQ7/deps/build.log`
  Building GLMakie ─────────→ `~/.julia/packages/GLMakie/nDrlO/deps/build.log`
  Building QML ─────────────→ `~/.julia/packages/QML/LP1vb/deps/build.log`
┌ Error: Error building `QML`: 
│ [ Info: Directory /home/xxx/.julia/packages/QML/LP1vb/deps/usr/lib does not exist!
│ ERROR: LoadError: LibraryProduct(nothing, ["libjlqml"], :libjlqml, "Prefix(/home/xxx/.julia/packages/QML/LP1vb/deps/usr)") is not satisfied, cannot generate deps.jl!
│ Stacktrace:
│  [1] error(::String) at ./error.jl:33
│  [2] #write_deps_file#152(::Bool, ::Function, ::String, ::Array{Product,1}) at /home/xxx/.julia/packages/BinaryProvider/TcAwt/src/Products.jl:414
│  [3] write_deps_file(::String, ::Array{Product,1}) at /home/xxx/.julia/packages/BinaryProvider/TcAwt/src/Products.jl:395
│  [4] top-level scope at none:0
│  [5] include at ./boot.jl:326 [inlined]
│  [6] include_relative(::Module, ::String) at ./loading.jl:1038
│  [7] include(::Module, ::String) at ./sysimg.jl:29
│  [8] include(::String) at ./client.jl:403
│  [9] top-level scope at none:0
│ in expression starting at /home/xxx/.julia/packages/QML/LP1vb/deps/build.jl:14
└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

(v1.1) pkg> 

It looks like the Qt5 development packages are not found, maybe you need to install those using your distribution's package manager? Also, the second error is related to JlCxx not being found, for that you should set CMAKE_PREFIX_PATH to contain the libcxxwrap-julia installation folder (typically in the deps folder of the CxxWrap package).

I have tried to install every Qt5 dev package I can find from various website listings. Is there one you can see which is printed that I should include? I have looked for the 'libcxxwrap-julia' installation folder:

~/.julia/packages$ find . -print |grep "libcxxwrap-julia"
./CxxWrap/sarOk/deps/usr/downloads/libcxxwrap-julia-1.0.v0.5.3.x86_64-linux-gnu-gcc7-cxx11.tar.gz.sha256
./CxxWrap/sarOk/deps/usr/downloads/libcxxwrap-julia-1.0.v0.5.3.x86_64-linux-gnu-gcc7-cxx11.tar.gz
./CxxWrap/sarOk/deps/usr/logs/libcxxwrap-julia-1.0.log
./CxxWrap/sarOk/deps/usr/manifests/libcxxwrap-julia-1.0.v0.5.3.x86_64-linux-gnu-gcc7-cxx11.list

and I have added this directory to the statement cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/path/to/cxxwrap ../jlqml and the same warnings are generated.

Is there a specific error message that I should be addressing?

On macos this works:

cmake -DCMAKE_PREFIX_PATH="~/tmp/clean_julia_depot/packages/CxxWrap/sarOk/deps/usr;/usr/local/opt/qt" ~/src/julia/jlqml

So for libcxxwrap-julia, you should add the deps/usr dir from the CxxWrap package. For Qt, it depends, what distro are you using? I know e.g. Ubuntu has split up Qt and QML into many packages.

So for libcxxwrap-julia, you should add the deps/usr dir from the CxxWrap package. For Qt, it depends, what distro are you using? I know e.g. Ubuntu has split up Qt and QML into many packages.

I am on Debian Stretch (9) and substituting those paths with the 'equivalent' paths on my system does not change the error messages reported.

For the packages, this used to be in the old build.jl, maybe this still works on Debian?

apt-get install cmake cmake-data qtdeclarative5-dev qtdeclarative5-qtquick2-plugin qtdeclarative5-dialogs-plugin qtdeclarative5-controls-plugin qtdeclarative5-quicklayouts-plugin qtdeclarative5-window-plugin qmlscene qt5-default)`

apt-get install cmake cmake-data qtdeclarative5-dev qtdeclarative5-qtquick2-plugin qtdeclarative5-dialogs-plugin qtdeclarative5-controls-plugin qtdeclarative5-quicklayouts-plugin qtdeclarative5-window-plugin qmlscene qt5-default

I wish this worked but the same errors are produced.

/repos/jlqml-build$ make
[  7%] Automatic moc for target jlqml
[  7%] Built target jlqml_automoc
[ 14%] Building CXX object CMakeFiles/jlqml.dir/application_manager.cpp.o
In file included from /home/xel/repos/jlqml/application_manager.cpp:1:0:
/home/xel/repos/jlqml/application_manager.hpp:6:33: fatal error: QQmlApplicationEngine: No such file or directory
 #include <QQmlApplicationEngine>
                                 ^
compilation terminated.
CMakeFiles/jlqml.dir/build.make:62: recipe for target 'CMakeFiles/jlqml.dir/application_manager.cpp.o' failed
make[2]: *** [CMakeFiles/jlqml.dir/application_manager.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/jlqml.dir/all' failed
make[1]: *** [CMakeFiles/jlqml.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Did the apt-get command work? Some package names may be different. Also, can you show the output of the cmake command again, to check that at least the JlCxx error went away?

Did the apt-get command work? Some package names may be different. Also, can you show the output of the cmake command again, to check that at least the JlCxx error went away?

/repos/jlqml-build$ sudo apt-get install cmake cmake-data qtdeclarative5-dev qtdeclarative5-qtquick2-plugin qtdeclarative5-dialogs-plugin qtdeclarative5-controls-plugin qtdeclarative5-quicklayouts-plugin qtdeclarative5-window-plugin qmlscene qt5-default
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package qtdeclarative5-qtquick2-plugin is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package qtdeclarative5-controls-plugin is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package qtdeclarative5-dialogs-plugin is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package qtdeclarative5-window-plugin is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package qtdeclarative5-quicklayouts-plugin is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'qtdeclarative5-qtquick2-plugin' has no installation candidate
E: Package 'qtdeclarative5-dialogs-plugin' has no installation candidate
E: Package 'qtdeclarative5-controls-plugin' has no installation candidate
E: Package 'qtdeclarative5-quicklayouts-plugin' has no installation candidate
E: Package 'qtdeclarative5-window-plugin' has no installation candidate

Sorry, forgot to reply to this, it is definitely a problem with the dependency installation. I assume you figured it out in the mean time, so I'm closing this.