#1 Please update spec file for motif-devel on rhel >=8
Closed by yanqiyu. Opened by loise.

Hi,

I've seen your geant4 build and would like to contribute a bit. The spec file only refers to fedora > 23 for motif-devel, otherwise lesstif. As CentOS 8 has motif, could you replace:

%if 0%{?fedora} > 23
Recommends: motif-devel
%else
Recommends: lesstif-devel
%endif

%if 0%{?fedora} > 23 || 0%{?rhel} >= 8
Recommends: motif-devel
%else
Recommends: lesstif-devel
%endif

Thank you :)


Metadata Update from @yanqiyu:
- Issue assigned to yanqiyu

Thanks, copr build 1563089 should fix this (I hope the build will succeed)
And I am trying to include EPEL version this time

Okay, done.
Now I am using motif-devel on EPEL 8 and made this available in
yanqiyu/geant4 for all active fedora releases and EPEL 8

I somewhat have another issue now...

when using cmake < 3.18 I have:
-- Build files have been written to: /builddir/build/BUILD/geant4.10.06.p02/x86_64-redhat-linux-gnu

when using cmake = 3.18.0 I have:
-- Build files have been written to: /builddir/build/BUILD/geant4.10.06.p02/x86_64-redhat-linux-gnu/x86_64-redhat-linux-gnu

so the Makefiles get generated into the wrong directory - there must be some oddity with that.

First I'm trying to see with which version the error seems to appear and then come back, but there seems to be something going wrong....

The motif-devel error is away though, so that's a plus :) and a "default" epel 8 build worked fine.

Next step for me is check build with qt 5.15 and regular centos 8 cmake

I think that is related to some change in %{cmake} macro in CMAKE 3.18.0 .

In this spec file, I am doing

mkdir -p %{_target_platform}
pushd %{_target_platform}
//Something
popd

But maybe, %{cmake} did the simliar thing? Personally I don't use CentOS/RHEL, so I can't check this.

Seems that I am right, in build log here, cmake is invoked with -B %{_target_platform}, but for a regular build, it is -B .

I don't know why they put such a breaking change here.

that is related to in source / out of source builds - all rpms get changed so that this works recently. However, that changes allowed to build packages still with newer cmake 3.18 under CentOS / RHEL as well.

I think the other macro use before has been to call cmake .. instead of cmake .

Have a look here for an example, mind the undefine in the first line
https://src.fedoraproject.org/rpms/kwin/c/198877033ee3315e3bd217cc30830bc17830fe2f?branch=master

The good news is, it compiles with Qt 5.15 though

Yes, but that change proposal, I would rather change my spec file when
those changes are done and backported to older fedora releases. (Including
using %cmake_install or %cmake_make)

And the current spec file is doing a out-of-source build, by creating a
folder, enter the folder, cmake ..

Closing as resolved, if any problem, be free to open another one or reopen this!

Metadata Update from @yanqiyu:
- Issue status updated to: Closed (was: Open)

Hi,

can you have a look at this one:
https://copr.fedorainfracloud.org/coprs/loise/geant4.1/build/1564881/

especially one of the specs. I managed to get it build with cmake 3.18 everywhere including epel8 so you might consider taking that over ?

https://download.copr.fedorainfracloud.org/results/loise/geant4.1/epel-8-x86_64/01564881-geant4/geant4.spec

Metadata Update from @loise:
- Issue status updated to: Open (was: Closed)

Seems that you are overriding cmake version in making by including a copr repo in build root. But I don't suggest that. Doing things like that will break things. (for example, someone grab this spec file and build on an older cmake and he will end up in FTBTS)

the change wiki provides some suggestions, but changes like this will break things now.

So, without overriding buildroot, I would make the change when cmake shipped with systemd are ready for this.

Seems that the backport is done, changed! Thanks for your advice!

Metadata Update from @yanqiyu:
- Issue status updated to: Closed (was: Open)

Metadata