Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 659880 - dev-lang/squirrel-3.1 : [QA] One or more CMake variables were not used by the project:
Summary: dev-lang/squirrel-3.1 : [QA] One or more CMake variables were not used by the...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal QA (vote)
Assignee: Sergei Trofimovich (RETIRED)
URL: https://github.com/albertodemichelis/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-02 17:40 UTC by Toralf Förster
Modified: 2020-07-05 18:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2018-07-02 17:40:23 UTC
QA: other
One or more CMake variables were not used by the project:
  DISABLE_STATIC
  LONG_OUTPUT_NAMES

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_libressl_20180623-161904

  -------------------------------------------------------------------
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2018-07-02 19:08:20 UTC
> One or more CMake variables were not used by the project:
>   DISABLE_STATIC
>   LONG_OUTPUT_NAMES

I think this is a very misleading warning. Both variables are used in CMakeLists (via add_subdirectory) and and affect installation.

- DISABLE_STATIC adds static library installation.
- LONG_OUTPUT_NAMES changes file names when package is installed.

+kde@ (cmake maintainer) to check if ift's an intended behaviour of 'add_subdirectory()'

+dev-portage@ (portage maintanier) to evaluate if it's ok to have QA check with such false positive (if it's indeed a false positive)

Thanks!
Comment 2 Andreas Sturmlechner gentoo-dev 2018-07-03 11:36:44 UTC
I see those variables used as ifdefs inside CMakeLists.txt, but nowhere defined as option variable.
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2018-07-03 19:12:07 UTC
(In reply to Andreas Sturmlechner from comment #2)
> I see those variables used as ifdefs inside CMakeLists.txt, but nowhere
> defined as option variable.

Oh, that makes sense. Can cmake's warning message be fixed or extended to hint at expected way of declaring the available options?
Comment 4 Andreas Sturmlechner gentoo-dev 2018-07-03 19:55:21 UTC
Everything is possible; the question is if upstream cmake is going to hear you. This is really trivial though, in root CMakeLists.txt, usually somewhere below include macros:

option(DISABLE_STATIC "Disable static library installation" ON)
option(LONG_OUTPUT_NAMES "Long output names(?)" ON)
Comment 5 Larry the Git Cow gentoo-dev 2018-07-03 21:51:59 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ccc69bc760de2a0cba00f6123349dc4f380b4abb

commit ccc69bc760de2a0cba00f6123349dc4f380b4abb
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2018-07-03 21:51:16 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-07-03 21:51:53 +0000

    dev-lang/squirrel: declare used CMake variables, bug #659880
    
    portage's QA check complains:
    > One or more CMake variables were not used by the project:
    >  DISABLE_STATIC
    >  LONG_OUTPUT_NAMES
    
    The warning is misleading. Variables are used but not declared
    as 'options()'s. This change tweaks the declaration.
    
    Reported-by: Toralf Förster
    Closes: https://bugs.gentoo.org/659880
    Package-Manager: Portage-2.3.41, Repoman-2.3.9

 dev-lang/squirrel/files/squirrel-3.1-declare-options.patch | 10 ++++++++++
 dev-lang/squirrel/squirrel-3.1.ebuild                      |  6 +++++-
 2 files changed, 15 insertions(+), 1 deletion(-)
Comment 6 Andreas Sturmlechner gentoo-dev 2018-07-03 21:55:41 UTC
This message is coming from CMake:

> CMake Warning:
>   Manually-specified variables were not used by the project:
>
>     DISABLE_STATIC
>     LONG_OUTPUT_NAMES
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2018-07-03 22:04:17 UTC
Proposed change to squirrel upstream as:
    https://github.com/albertodemichelis/squirrel/pull/143
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2018-07-03 22:20:03 UTC
(In reply to Andreas Sturmlechner from comment #6)
> This message is coming from CMake:
> 
> > CMake Warning:
> >   Manually-specified variables were not used by the project:
> >
> >     DISABLE_STATIC
> >     LONG_OUTPUT_NAMES

While it comes from cmake it's portage's decision to convert it to eqawarn:
    https://gitweb.gentoo.org/proj/portage.git/tree/bin/install-qa-check.d/90cmake-warnings#n12
Comment 9 Rolf Eike Beer archtester 2018-07-04 17:04:55 UTC
It is a CMake issue (https://gitlab.kitware.com/cmake/cmake/issues/18152), triggered by unusual use of these variables in squirrel (https://github.com/albertodemichelis/squirrel/pull/144). Keeping this as a QA issue is a good idea IMHO.
Comment 10 Sergei Trofimovich (RETIRED) gentoo-dev 2018-07-04 18:46:17 UTC
Eike noticed i've messed up STATIC_LIBS handling. Reopening until it's fixed.
Comment 11 Larry the Git Cow gentoo-dev 2018-07-04 21:12:54 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91f2886698abf49373ce68c5a9bbd655cfa8b5c1

commit 91f2886698abf49373ce68c5a9bbd655cfa8b5c1
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2018-07-04 21:10:12 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-07-04 21:12:45 +0000

    Revert "dev-lang/squirrel: declare used CMake variables, bug #659880"
    
    This reverts commit ccc69bc760de2a0cba00f6123349dc4f380b4abb.
    Eike noticed i've messed up STATIC_LIBS variable handling
    and static libs are not installed at all.
    
    Bug: https://bugs.gentoo.org/659880

 dev-lang/squirrel/files/squirrel-3.1-declare-options.patch | 10 ----------
 dev-lang/squirrel/squirrel-3.1.ebuild                      |  6 +-----
 2 files changed, 1 insertion(+), 15 deletions(-)
Comment 12 Larry the Git Cow gentoo-dev 2020-07-05 18:11:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89641f00c8624e7b6d8a4d444a447b05ba166ce5

commit 89641f00c8624e7b6d8a4d444a447b05ba166ce5
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-07-05 18:11:26 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-07-05 18:11:26 +0000

    dev-lang/squirrel: grab 3.1_p20200612 release snapshot
    
    Reported-by: Toralf Förster
    Closes: https://bugs.gentoo.org/659880
    Package-Manager: Portage-2.3.103, Repoman-2.3.23
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 dev-lang/squirrel/Manifest                      |  1 +
 dev-lang/squirrel/squirrel-3.1_p20200612.ebuild | 42 +++++++++++++++++++++++++
 2 files changed, 43 insertions(+)