DevHeads.net

Empty debugsourcefiles.list when building out of source

Hello,

I'm trying to upgrade my OpenRCT 2 package [0] to fedora 27.

It looks like something changed regarding the generation of debug files because
I can't get it to build a .rpm anymore.

I get:

Processing files: OpenRCT2-debugsource-0.1.1-1.fc27.x86_64
error: Empty %files file /home/markand/rpmbuild/BUILD/OpenRCT2-0.1.1/debugsourcefiles.list

I guess this comes from the CMake invocation which is out of build as the
CMakeLists.txt in OpenRCT 2 requires building in a dedicated directory (they
forbid cmake . directly in source).

What should I do? you can see my specfile [1]

[0]: <a href="http://copr.fedorainfracloud.org/coprs/markand/OpenRCT2" title="http://copr.fedorainfracloud.org/coprs/markand/OpenRCT2">http://copr.fedorainfracloud.org/coprs/markand/OpenRCT2</a>
[1]: <a href="http://hg.markand.fr/rpms/file/tip/OpenRCT2/OpenRCT2.spec" title="http://hg.markand.fr/rpms/file/tip/OpenRCT2/OpenRCT2.spec">http://hg.markand.fr/rpms/file/tip/OpenRCT2/OpenRCT2.spec</a>

Regards,

Comments

Re: Empty debugsourcefiles.list when building out of source

By Nico Kadel-Garcia at 01/11/2018 - 06:22

On Thu, Jan 11, 2018 at 5:13 AM, David Demelier < ... at malikania dot fr> wrote:
What RPM are you building from?

Re: Empty debugsourcefiles.list when building out of source

By David Demelier at 01/11/2018 - 06:39

On Thu, Jan 11, 2018 at 05:22:05AM -0500, Nico Kadel-Garcia wrote:
I do rpmbuild -ba OpenRCT2.spec

Re: Empty debugsourcefiles.list when building out of source

By Nico Kadel-Garcia at 01/11/2018 - 12:12

On Thu, Jan 11, 2018 at 5:39 AM, David Demelier < ... at malikania dot fr> wrote:
I should have said "SRPM". What you have mentioned there is a .spec
file, and I've no idea where you got it or even which release of
OpenRCT2 you are working with. Could you specify where the relevant
SRPM is, or where you got that .spec file?

Re: Empty debugsourcefiles.list when building out of source

By Patrick Monnerat at 01/11/2018 - 06:21

On 01/11/2018 11:13 AM, David Demelier wrote:
export CFLAGS="${RPM_OPT_FLAGS}"
export CXXFLAGS="${RPM_OPT_FLAGS}"

This did the trick.

Obviously the problem depends on a compiler flag, but I can't tell you
which.

Re: Empty debugsourcefiles.list when building out of source

By Mark Wielaard at 01/11/2018 - 06:48

On Thu, 2018-01-11 at 11:21 +0100, Patrick Monnerat wrote:
It means -g was missing. -g tells gcc to generate debuginfo. If there
isn't any debuginfo at all, then it is impossible to generate a sources
list.

Cheers,

Mark

Re: Empty debugsourcefiles.list when building out of source

By David Demelier at 01/11/2018 - 06:45

On Thu, Jan 11, 2018 at 11:21:56AM +0100, Patrick Monnerat wrote:
Is there a place where you see that we must use this variable?

Anyway, it worked, I changed the CMake invocation to:

cmake ... \
-DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \
-DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \

It built fine, thanks!

Re: Empty debugsourcefiles.list when building out of source

By Patrick Monnerat at 01/11/2018 - 06:55

On 01/11/2018 11:45 AM, David Demelier wrote:

Re: Empty debugsourcefiles.list when building out of source

By Andrea Musuruane at 01/11/2018 - 06:50

On Thu, Jan 11, 2018 at 11:45 AM, David Demelier < ... at malikania dot fr>
wrote:

Actually you should use the %cmake macro:
<a href="https://fedoraproject.org/wiki/Packaging:Cmake" title="https://fedoraproject.org/wiki/Packaging:Cmake">https://fedoraproject.org/wiki/Packaging:Cmake</a>

Try to expand it to see how it works:
rpm --eval %cmake

Bye,

Andrea

Re: Empty debugsourcefiles.list when building out of source

By David Demelier at 01/11/2018 - 07:00

On Thu, Jan 11, 2018 at 11:50:50AM +0100, Andrea Musuruane wrote:
Thanks, this is indeed the correct solution.