Misleading error messages

Bug #1719968 reported by Aleix Pol
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Undecided
Cris Dywan

Bug Description

My snapcraft.yaml is wrong and misses a dependency. cmake complains and returns!=0.

snapcraft will show 2 massive python tracebacks of when it realised that it's not right. It's not very relevant information to the snapcraft user.

-- Performing Test HAVE_WNO_MISSING_FIELD_INITIALIZERS - Success
-- Performing Test HAVE_WERROR_UNDEFINED_BOOL_CONVERSION
-- Performing Test HAVE_WERROR_UNDEFINED_BOOL_CONVERSION - Failed
-- Performing Test HAVE_WERROR_TAUTOLOGICAL_UNDEFINED_COMPARE
-- Performing Test HAVE_WERROR_TAUTOLOGICAL_UNDEFINED_COMPARE - Failed
CMake Warning at kdevplatform/CMakeLists.txt:20 (find_package):
  Could not find a package configuration file provided by "Grantlee5" with
  any of the following names:

    Grantlee5Config.cmake
    grantlee5-config.cmake

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

-- Could NOT find Boost
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for malloc_trim
-- Looking for malloc_trim - found
-- Performing Test HAVE_MSG_NOSIGNAL
-- Performing Test HAVE_MSG_NOSIGNAL - Success
CMake Error at kdevplatform/template/filters/CMakeLists.txt:2 (grantlee_adjust_plugin_name):
  Unknown CMake command "grantlee_adjust_plugin_name".

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/root/build_kdevelop/parts/kdevelop/src/kdevplatform/language/Boost_INCLUDE_DIR
   used as include directory in directory /root/build_kdevelop/parts/kdevelop/src/kdevplatform/language

-- Configuring incomplete, errors occurred!
See also "/root/build_kdevelop/parts/kdevelop/build/CMakeFiles/CMakeOutput.log".
See also "/root/build_kdevelop/parts/kdevelop/build/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "/usr/bin/snapcraft", line 9, in <module>
    load_entry_point('snapcraft==2.34', 'console_scripts', 'snapcraft')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 542, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2569, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2229, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2235, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3/dist-packages/snapcraft/cli/__main__.py", line 19, in <module>
    run(prog_name='snapcraft')
  File "/usr/lib/python3/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/snapcraft/cli/lifecycle.py", line 132, in snap
    project_options, directory=directory, output=output)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle.py", line 349, in snap
    execute('prime', project_options)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle.py", line 130, in execute
    _Executor(config, project_options).run(step, part_names)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle.py", line 225, in run
    self._run_step(step, part, part_names)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle.py", line 262, in _run_step
    getattr(part, step)()
  File "/usr/lib/python3/dist-packages/snapcraft/internal/pluginhandler/__init__.py", line 330, in build
    self.plugin.build()
  File "/usr/lib/python3/dist-packages/snapcraft/plugins/cmake.py", line 80, in build
    self.options.configflags, env=env)
  File "/usr/lib/python3/dist-packages/snapcraft/_baseplugin.py", line 202, in run
    return common.run(cmd, cwd=cwd, **kwargs)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/common.py", line 63, in run
    subprocess.check_call(['/bin/sh', f.name] + cmd, **kwargs)
  File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/bin/sh', '/tmp/tmpqguxexuf', 'cmake', '/root/build_kdevelop/parts/kdevelop/src', '-DCMAKE_INSTALL_PREFIX=', '-DKDE_INSTALL_USE_QT_SYS_PATHS=ON', '-DCMAKE_INSTALL_PREFIX=/usr', '-DCMAKE_BUILD_TYPE=Release', '-DENABLE_TESTING=OFF', '-DBUILD_TESTING=OFF', '-DKDE_SKIP_TEST_SETTINGS=ON']' returned non-zero exit status 1
Stopping local:snapcraft-kindly-crisp-vervet
Traceback (most recent call last):
  File "/home/apol/devel/playground/snapcraft/bin/snapcraft", line 36, in <module>
    obj=dict(project=snapcraft.ProjectOptions()))
  File "/usr/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/apol/devel/playground/snapcraft/snapcraft/cli/lifecycle.py", line 193, in cleanbuild
    lifecycle.cleanbuild(project_options, remote)
  File "/home/apol/devel/playground/snapcraft/snapcraft/internal/lifecycle.py", line 338, in cleanbuild
    metadata=config.get_metadata(), remote=remote).execute()
  File "/home/apol/devel/playground/snapcraft/snapcraft/internal/lxd.py", line 167, in execute
    raise e
  File "/home/apol/devel/playground/snapcraft/snapcraft/internal/lxd.py", line 161, in execute
    self._container_run(command, cwd=self._project_folder)
  File "/home/apol/devel/playground/snapcraft/snapcraft/internal/lxd.py", line 114, in _container_run
    **kwargs)
  File "/usr/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['lxc', 'exec', 'local:snapcraft-kindly-crisp-vervet', '--', 'sh', '-c', 'cd /root/build_kdevelop; snapcraft snap --output kdevelop_5.2_amd64.snap']' returned non-zero exit status 1.

Revision history for this message
Cris Dywan (kalikiana) wrote :
Changed in snapcraft:
assignee: nobody → Christian Dywan (kalikiana)
status: New → In Progress
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

This was released with the raven work.

Changed in snapcraft:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.