View Issue Details

IDProjectCategoryView StatusLast Update
0001170bareos-core[All Projects] Generalpublic2020-04-14 13:11
ReportertuxmasterAssigned Toarogge 
Status closedResolutionfixed 
Platformx86_64OSFedoraOS Version31
Product Version19.2.4~rc1 
Fixed in Version 
Summary0001170: Build fails on Fedora 31
DescriptionThe build fails with:
In file included from /builddir/build/BUILD/bareos-Release-19.2.4/core/src/ndmp/ndmjob_args.c:37:
/builddir/build/BUILD/bareos-Release-19.2.4/core/src/lib/version.h:41:55: error: unknown type name 'size_t'
   41 | void (*FormatCopyrightWithFsfAndPlanets)(char* out, size_t len, int FsfYear);
      | ^~~~~~
/builddir/build/BUILD/bareos-Release-19.2.4/core/src/lib/version.h:1:1: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
  +++ |+#include <stddef.h>
    1 | /*
/builddir/build/BUILD/bareos-Release-19.2.4/core/src/lib/version.h:42:43: error: unknown type name 'FILE'
   42 | void (*PrintCopyrightWithFsfAndPlanets)(FILE* fh, int FsfYear);
      | ^~~~
/builddir/build/BUILD/bareos-Release-19.2.4/core/src/lib/version.h:1:1: note: 'FILE' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?
  +++ |+#include <stdio.h>
    1 | /*
/builddir/build/BUILD/bareos-Release-19.2.4/core/src/lib/version.h:43:38: error: unknown type name 'size_t'
   43 | void (*FormatCopyright)(char* out, size_t len, int StartYear);
      | ^~~~~~
/builddir/build/BUILD/bareos-Release-19.2.4/core/src/lib/version.h:43:38: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
/builddir/build/BUILD/bareos-Release-19.2.4/core/src/lib/version.h:44:26: error: unknown type name 'FILE'
   44 | void (*PrintCopyright)(FILE* fh, int StartYear);
      | ^~~~
/builddir/build/BUILD/bareos-Release-19.2.4/core/src/lib/version.h:44:26: note: 'FILE' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?
/builddir/build/BUILD/bareos-Release-19.2.4/core/src/lib/version.h:45:1: warning: no semicolon at end of struct or union
   45 | };
      | ^
make[2]: *** [core/src/ndmp/CMakeFiles/ndmjob.dir/build.make:66: core/src/ndmp/CMakeFiles/ndmjob.dir/ndmjob_args.c.o] Error 1
make[2]: Leaving directory '/builddir/build/BUILD/bareos-Release-19.2.4/my-build'
make[1]: *** [CMakeFiles/Makefile2:1979: core/src/ndmp/CMakeFiles/ndmjob.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Additional InformationI have attached the build log.
TagsNo tags attached.
bareos-master: impactyes
bareos-master: actionfixed
bareos-19.2: impactyes
bareos-19.2: actionfixed
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action




2020-02-01 12:19


build.log (374,221 bytes)


2020-02-03 15:51

developer   ~0003726

That's weird. We're building on a real F31, too and we don't run into that problem.

As you're easily able to reproduce this, maybe you can provide a PR to patch this? Looks like just two includes and a semicolon are missing.


2020-02-26 17:01

developer   ~0003862

Closing due to no feedback from reporter. Please reopen if you have additional info.


2020-02-26 17:06

reporter   ~0003863

Yes I can reproduce it on every build.
In which line do you mean, that an "," is missing?
Then I will patch it and try it again.


2020-02-26 17:27

developer   ~0003864

in core/src/lib/version.h there are probably two includes missing:
#include <stddef.h>
#include <stdio.h>

Also in that same file there is a semicolon missing after the closing brace of the struct.

I still wonder why this fails when you build it. Our builds on Fedora 31 work just fine.


2020-02-26 17:53

reporter   ~0003865

I have patched the version file.
Now I get another error:
/builddir/build/BUILD/bareos-Release-19.2.6/my-build/core/src/ndmp/./src/ndmp/ndmjob_args.c:709: undefined reference to `kBareosVersionStrings'
collect2: error: ld returned 1 exit status

I use the mock tool for building, which creates an clean build environment. Which is the recommend way to build packages for the RedHat family.
I have attached my path, and all build logs, so you can reproduce it.

bareos-version.patch (627 bytes)
diff -Nuar bareos-Release-19.2.6/core/src/lib/version.h
---	2020-02-26 17:40:22.239573418 +0100
+++ bareos-Release-19.2.6/core/src/lib/version.h	2020-02-26 17:42:13.826920561 +0100
@@ -24,6 +24,9 @@
+#include <stddef.h>
+#include <stdio.h>
 #ifdef __cplusplus
 extern "C" {
@@ -47,7 +50,7 @@
 extern const struct BareosVersionStrings kBareosVersionStrings;
 #ifdef __cplusplus
 /* If this is set stdout will not be closed on startup */
bareos-version.patch (627 bytes)
build-2.log (388,034 bytes)
installed_pkgs.log (53,925 bytes)


2020-02-26 18:32

developer   ~0003867

What is your host system? What mock configuration are you using? The one shipped with mock or a different one? From which SPEC or src.rpm are you building?


2020-02-26 19:06

reporter   ~0003869

My Host system is an Fedora 31.lib
I using this the default fedora-31-x86_64 config to which I only add my repo which contains the needed libfastlz lib.
The used spec file have I added here.

bareos.spec (38,984 bytes)


2020-02-26 20:15

reporter   ~0003870

It looks like, ndmp is not linked again the bareos lib, which contains kBareosVersionStrings.
target_link_libraries(bareosndmp ${WRAP_LIBS} ${TIRPC_LIBRARIES})
target_link_libraries(ndmjob bareosndmp)
On both I can't see an link dependency to libbareos.

WRAP_LIBS is never filled with live.:
bareos-Release-19.2.6]$ grep -R WRAP_LIBS .
./core/src/ndmp/CMakeLists.txt:target_link_libraries(bareosndmp ${WRAP_LIBS} ${TIRPC_LIBRARIES})


2020-02-27 11:56

developer   ~0003874

The fastlz package is not required in 19.2 anymore (we integrated that into bareos core).
Could you check if building with the specfile from core/platforms/packaging/bareos.spec works? I'd like to find out if the problem is our buildsystem or the SPECfile. You can also grab the src.rpm from and throw that one at your mock installation. That's using the mentined specfile and has the sources prepared according to the SPEC, so you don't need to recompress or anything.

and btw. thank you for taking the time to improve Bareos!


2020-02-27 11:57

developer   ~0003875

And before it forget that: if it doesn't build for you it is clearly a bug. We just need to find out why it builds for us and not for you and whether we want to invest the time to fix it ourselves.


2020-02-28 10:28

reporter   ~0003879

Before I can test the spec file an patch was needed. (Which I have included)
After that, rpmbuild -bs will thrown warning, but an srpm file was created:
rpmbuild -bs bareos-Release-19.2.6/core/platforms/packaging/bareos.spec
Warnung: extra tokens at the end of %endif directive in line 1190: %endif # not client_only

Warnung: extra tokens at the end of %endif directive in line 1372: %endif # client_only

Warnung: extra tokens at the end of %endif directive in line 1431: %endif # python_plugins

And the build fails also with:

/usr/bin/ld: CMakeFiles/ndmjob.dir/ndmjob_args.c.o: in function `ndmjob_version_info':
/builddir/build/BUILD/bareos-Release-19.2.6/my-build/core/src/ndmp/./src/ndmp/ndmjob_args.c:709: undefined reference to `kBareosVersionStrings'
collect2: error: ld returned 1 exit status
make[2]: *** [core/src/ndmp/CMakeFiles/ndmjob.dir/build.make:194: core/src/ndmp/ndmjob] Error 1
make[2]: Leaving directory '/builddir/build/BUILD/bareos-Release-19.2.6/my-build'
make[1]: *** [CMakeFiles/Makefile2:1981: core/src/ndmp/CMakeFiles/ndmjob.dir/all] Error 2

spec.patch (697 bytes)
diff -Nuar bareos-Release-19.2.6/core/platforms/packaging/bareos.spec
---	2020-02-28 10:19:03.210099778 +0100
+++ bareos-Release-19.2.6/core/platforms/packaging/bareos.spec	2020-02-28 10:22:05.641794679 +0100
@@ -5,8 +5,8 @@
 Name: 		bareos
-Version: 	0.0.0
-Release: 	0
+Version: 	19.2.6
+Release: 	1
 Group: 		Productivity/Archiving/Backup
 License: 	AGPL-3.0
 BuildRoot: 	%{_tmppath}/%{name}-root
@@ -188,7 +188,7 @@
 BuildRequires: git-core
-Source0: %{name}-%{version}.tar.bz2
+Source0: %{name}-Release-%{version}.tar.gz
 BuildRequires: pam-devel
spec.patch (697 bytes)


2020-02-28 10:31

reporter   ~0003880

Her the build log of "our" spec file.

build-3.log (388,034 bytes)


2020-04-11 11:11

reporter   ~0003938

The kBareosVersionStrings error was result in an missing lib link. I have fixed it with:


2020-04-14 13:11

developer   ~0003939

Patches applied to master and 19.2 branches.
Thank you very much for your contribution!

Issue History

Date Modified Username Field Change
2020-02-01 12:19 tuxmaster New Issue
2020-02-01 12:19 tuxmaster File Added: build.log
2020-02-03 15:51 arogge Assigned To => arogge
2020-02-03 15:51 arogge Status new => feedback
2020-02-03 15:51 arogge Note Added: 0003726
2020-02-26 17:01 arogge Status feedback => resolved
2020-02-26 17:01 arogge Resolution open => unable to reproduce
2020-02-26 17:01 arogge Note Added: 0003862
2020-02-26 17:01 arogge Status resolved => closed
2020-02-26 17:06 tuxmaster Status closed => new
2020-02-26 17:06 tuxmaster Resolution unable to reproduce => reopened
2020-02-26 17:06 tuxmaster Note Added: 0003863
2020-02-26 17:27 arogge Note Added: 0003864
2020-02-26 17:27 arogge Status new => feedback
2020-02-26 17:53 tuxmaster File Added: bareos-version.patch
2020-02-26 17:53 tuxmaster File Added: build-2.log
2020-02-26 17:53 tuxmaster File Added: installed_pkgs.log
2020-02-26 17:53 tuxmaster Note Added: 0003865
2020-02-26 17:53 tuxmaster Status feedback => assigned
2020-02-26 18:32 arogge Status assigned => feedback
2020-02-26 18:32 arogge Note Added: 0003867
2020-02-26 19:06 tuxmaster File Added: bareos.spec
2020-02-26 19:06 tuxmaster Note Added: 0003869
2020-02-26 19:06 tuxmaster Status feedback => assigned
2020-02-26 20:15 tuxmaster Note Added: 0003870
2020-02-27 11:56 arogge Note Added: 0003874
2020-02-27 11:57 arogge Note Added: 0003875
2020-02-28 10:28 tuxmaster File Added: spec.patch
2020-02-28 10:28 tuxmaster Note Added: 0003879
2020-02-28 10:31 tuxmaster File Added: build-3.log
2020-02-28 10:31 tuxmaster Note Added: 0003880
2020-04-11 11:11 tuxmaster Note Added: 0003938
2020-04-14 13:11 arogge Status assigned => resolved
2020-04-14 13:11 arogge Resolution reopened => fixed
2020-04-14 13:11 arogge bareos-master: impact => yes
2020-04-14 13:11 arogge bareos-master: action => fixed
2020-04-14 13:11 arogge bareos-19.2: impact => yes
2020-04-14 13:11 arogge bareos-19.2: action => fixed
2020-04-14 13:11 arogge Note Added: 0003939
2020-04-14 13:11 arogge Status resolved => closed