Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 771300 - sci-libs/opencascade-7.4.0-r4 : CMake Error Flow control statements are not properly nested
Summary: sci-libs/opencascade-7.4.0-r4 : CMake Error Flow control statements are not p...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernd
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-02-18 15:45 UTC by Helmut Jarausch
Modified: 2021-03-01 08:26 UTC (History)
3 users (show)

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


Attachments
emerge --info output (opencascade.info,22.38 KB, text/plain)
2021-02-23 16:46 UTC, Helmut Jarausch
Details
build log (opencascade-7.4.0-r4.build,5.51 KB, text/plain)
2021-02-23 16:47 UTC, Helmut Jarausch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2021-02-18 15:45:10 UTC
CMake fails with
CMake Error at adm/cmake/vtk.cmake:159 (endif):
  Flow control statements are not properly nested.
Call Stack (most recent call first):
  CMakeLists.txt:14 (include)
  CMakeLists.txt:525 (OCCT_INCLUDE_CMAKE_FILE)
Comment 1 Bernd 2021-02-18 19:07:44 UTC
Could please post a build log and emerge info?
Comment 2 Helmut Jarausch 2021-02-23 16:46:14 UTC
Created attachment 688155 [details]
emerge --info output
Comment 3 Helmut Jarausch 2021-02-23 16:47:05 UTC
Created attachment 688158 [details]
build log
Comment 4 Bernd 2021-02-23 18:17:44 UTC
Thanks Helmut. Do you by chance use vtk-9?
Comment 5 Helmut Jarausch 2021-02-24 17:14:01 UTC
(In reply to Bernd from comment #4)
> Thanks Helmut. Do you by chance use vtk-9?

No, I have 8.2.0-r1 installed here.
Comment 6 Helmut Jarausch 2021-02-24 17:15:27 UTC
But there are more packages with this problem, like dev-db/mariadb and dev-db/mariadb-connector-c

It might be connected to cmake-3.20.0_rc1 which is in use here.
Comment 7 Ionen Wolkens gentoo-dev 2021-02-24 17:24:23 UTC
(In reply to Helmut Jarausch from comment #6)
> It might be connected to cmake-3.20.0_rc1 which is in use here.
Most likely is.

I wouldn't worry about these too much given, like for the previous widespread cmake EXPORT issues, it may get fixed in cmake itself.

That version is also unkeyworded right now so it only affects the more adventurous.
Comment 8 Bernd 2021-02-24 17:40:16 UTC
(In reply to Ionen Wolkens from comment #7)
> (In reply to Helmut Jarausch from comment #6)
> > It might be connected to cmake-3.20.0_rc1 which is in use here.
> Most likely is.
> 
> I wouldn't worry about these too much given, like for the previous
> widespread cmake EXPORT issues, it may get fixed in cmake itself.
> 
> That version is also unkeyworded right now so it only affects the more
> adventurous.

Ok, thanks for the feedback. So I don't get into this right now. For me (using cmake 3.19.5) the build succeeded just 3 days ago, so I was wondering about this issue.

Feel free to ping me again on this bug, if the error persists for later rc releases or the final release of 3.20.
Comment 9 Ionen Wolkens gentoo-dev 2021-02-24 18:05:18 UTC
Well, I may have spoke too soon, this may be the package's problem after all.

asturm notably pointed out:
>yup, that opencascade cmake file is broken
>it's got one endif() too many before endforeach()
Comment 10 Bernd 2021-02-24 18:10:02 UTC
Ok, I'm gonna check it
Comment 11 Bernd 2021-02-24 18:36:18 UTC
asturm is correct. I wonder why this doesn't pop up with cmake-3.19...
Comment 12 Ionen Wolkens gentoo-dev 2021-02-24 18:50:00 UTC
(In reply to Bernd from comment #11)
> asturm is correct. I wonder why this doesn't pop up with cmake-3.19...
Much like with GCC upgrades, it's just more strict regarding things that shouldn't work.
https://gitlab.kitware.com/cmake/cmake/-/commit/12f6e37eb79ad66c30269a3f19dfc28a9cb834e2

Still not impossible that this could be reverted before final, but hard to call this a cmake bug.
Comment 13 Larry the Git Cow gentoo-dev 2021-03-01 08:26:07 UTC
The bug has been closed via the following commit(s):

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

commit a05456f36a8e1c4c3c37695f3e9a621fccb4e801
Author:     Bernd Waibel <waebbl-gentoo@posteo.net>
AuthorDate: 2021-02-24 21:07:32 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2021-03-01 08:25:54 +0000

    sci-libs/opencascade: fix flow control
    
    dev-util/cmake >= 3.20.0_rc1 has restricted flow control
    checks. This patch fixes an issue with these new version
    on unbalanced flow control statements.
    
    Closes: https://bugs.gentoo.org/771300
    Package-Manager: Portage-3.0.15, Repoman-3.0.2
    Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 ...pencascade-7.4.0-fix-flow-control-nesting.patch | 31 ++++++++++++++++++++++
 sci-libs/opencascade/opencascade-7.4.0-r4.ebuild   |  1 +
 2 files changed, 32 insertions(+)