Standalone backup agents for Linux, Mac, AIX & Solaris workloads on-premises or in the public cloud
Post Reply
lukistellar
Lurker
Posts: 1
Liked: never
Joined: Apr 29, 2020 8:12 pm
Contact:

kernel 5.6.7: veeamsnap compile errors

Post by lukistellar »

Hi all,

Since i upgraded to Fedora 32 the other day, the dkms compile of the veeamsnap kernel module doesn't work any more.
Error:

Code: Select all

# dkms build veeamsnap/4.0.0.1961

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j8 KERNELRELEASE=5.6.7-300.fc32.x86_64 -C /lib/modules/5.6.7-300.fc32.x86_64/build M=/var/lib/dkms/veeamsnap/4.0.0.1961/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.6.7-300.fc32.x86_64 (x86_64)
Consult /var/lib/dkms/veeamsnap/4.0.0.1961/build/make.log for more information.
I already opened a support case (04149503) but maybe someone with programming experience could tell me a quick fix, since it looks like a problem with includes (error: unknown type name ‘time_t’).

Here is the content of "make.log":

Code: Select all

DKMS make.log for veeamsnap-4.0.0.1961 for kernel 5.6.7-300.fc32.x86_64 (x86_64)
Do 30. Apr 12:46:05 CEST 2020
make: Entering directory '/usr/src/kernels/5.6.7-300.fc32.x86_64'
  AR      /var/lib/dkms/veeamsnap/4.0.0.1961/build/built-in.a
  CC [M]  /var/lib/dkms/veeamsnap/4.0.0.1961/build/log.o
  CC [M]  /var/lib/dkms/veeamsnap/4.0.0.1961/build/mem_alloc.o
  CC [M]  /var/lib/dkms/veeamsnap/4.0.0.1961/build/sparse_bitmap.o
  CC [M]  /var/lib/dkms/veeamsnap/4.0.0.1961/build/container.o
  CC [M]  /var/lib/dkms/veeamsnap/4.0.0.1961/build/container_spinlocking.o
  CC [M]  /var/lib/dkms/veeamsnap/4.0.0.1961/build/queue_spinlocking.o
  CC [M]  /var/lib/dkms/veeamsnap/4.0.0.1961/build/bitmap_sync.o
  CC [M]  /var/lib/dkms/veeamsnap/4.0.0.1961/build/page_array.o
In file included from /var/lib/dkms/veeamsnap/4.0.0.1961/build/stdafx.h:39,
                 from /var/lib/dkms/veeamsnap/4.0.0.1961/build/queue_spinlocking.c:1:
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.h:25:80: error: unknown type name ‘time_t’
   25 | void log_s_sec(const char* section, const unsigned level, const char* s, const time_t totalsecs);
      |                                                                                ^~~~~~
In file included from /var/lib/dkms/veeamsnap/4.0.0.1961/build/stdafx.h:39,
                 from /var/lib/dkms/veeamsnap/4.0.0.1961/build/mem_alloc.c:1:
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.h:25:80: error: unknown type name ‘time_t’
   25 | void log_s_sec(const char* section, const unsigned level, const char* s, const time_t totalsecs);
      |                                                                                ^~~~~~
In file included from /var/lib/dkms/veeamsnap/4.0.0.1961/build/stdafx.h:39,
                 from /var/lib/dkms/veeamsnap/4.0.0.1961/build/log.c:1:
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.h:25:80: error: unknown type name ‘time_t’
   25 | void log_s_sec(const char* section, const unsigned level, const char* s, const time_t totalsecs);
      |                                                                                ^~~~~~
In file included from /var/lib/dkms/veeamsnap/4.0.0.1961/build/stdafx.h:39,
                 from /var/lib/dkms/veeamsnap/4.0.0.1961/build/container_spinlocking.c:1:
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.h:25:80: error: unknown type name ‘time_t’
   25 | void log_s_sec(const char* section, const unsigned level, const char* s, const time_t totalsecs);
      |                                                                                ^~~~~~
In file included from /var/lib/dkms/veeamsnap/4.0.0.1961/build/stdafx.h:39,
                 from /var/lib/dkms/veeamsnap/4.0.0.1961/build/page_array.c:1:
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.h:25:80: error: unknown type name ‘time_t’
   25 | void log_s_sec(const char* section, const unsigned level, const char* s, const time_t totalsecs);
      |                                                                                ^~~~~~
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.c:43:21: error: field ‘m_time’ has incomplete type
   43 |     struct timespec m_time;
      |                     ^~~~~~
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.c:68:21: error: field ‘m_modify_time’ has incomplete type
   68 |     struct timespec m_modify_time;
      |                     ^~~~~~~~~~~~~
In file included from /var/lib/dkms/veeamsnap/4.0.0.1961/build/stdafx.h:39,
                 from /var/lib/dkms/veeamsnap/4.0.0.1961/build/sparse_bitmap.c:1:
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.h:25:80: error: unknown type name ‘time_t’
   25 | void log_s_sec(const char* section, const unsigned level, const char* s, const time_t totalsecs);
      |                                                                                ^~~~~~
In file included from /var/lib/dkms/veeamsnap/4.0.0.1961/build/stdafx.h:39,
                 from /var/lib/dkms/veeamsnap/4.0.0.1961/build/container.c:1:
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.h:25:80: error: unknown type name ‘time_t’
   25 | void log_s_sec(const char* section, const unsigned level, const char* s, const time_t totalsecs);
      |                                                                                ^~~~~~
make[1]: *** [scripts/Makefile.build:268: /var/lib/dkms/veeamsnap/4.0.0.1961/build/mem_alloc.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [scripts/Makefile.build:268: /var/lib/dkms/veeamsnap/4.0.0.1961/build/queue_spinlocking.o] Error 1
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.c: In function ‘_logging_filename_create’:
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.c:187:9: error: implicit declaration of function ‘getnstimeofday’ [-Werror=implicit-function-declaration]
  187 |         getnstimeofday(&logging->m_modify_time);
      |         ^~~~~~~~~~~~~~
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.c: In function ‘_logging_check_renew’:
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.c:224:21: error: storage size of ‘_time’ isn’t known
  224 |     struct timespec _time;
      |                     ^~~~~
make[1]: *** [scripts/Makefile.build:268: /var/lib/dkms/veeamsnap/4.0.0.1961/build/container_spinlocking.o] Error 1
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.c:224:21: warning: unused variable ‘_time’ [-Wunused-variable]
In file included from /var/lib/dkms/veeamsnap/4.0.0.1961/build/stdafx.h:39,
                 from /var/lib/dkms/veeamsnap/4.0.0.1961/build/bitmap_sync.c:1:
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.h:25:80: error: unknown type name ‘time_t’
   25 | void log_s_sec(const char* section, const unsigned level, const char* s, const time_t totalsecs);
      |                                                                                ^~~~~~
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.c: In function ‘logging_init’:
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.c:454:49: error: invalid application of ‘sizeof’ to incomplete type ‘struct timespec’
  454 |     memset( &logging->m_modify_time, 0, sizeof( struct timespec ) );
      |                                                 ^~~~~~
make[1]: *** [scripts/Makefile.build:268: /var/lib/dkms/veeamsnap/4.0.0.1961/build/page_array.o] Error 1
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.c: At top level:
/var/lib/dkms/veeamsnap/4.0.0.1961/build/log.c:692:80: error: unknown type name ‘time_t’
  692 | void log_s_sec(const char* section, const unsigned level, const char* s, const time_t totalsecs)
      |                                                                                ^~~~~~
make[1]: *** [scripts/Makefile.build:268: /var/lib/dkms/veeamsnap/4.0.0.1961/build/container.o] Error 1
make[1]: *** [scripts/Makefile.build:268: /var/lib/dkms/veeamsnap/4.0.0.1961/build/sparse_bitmap.o] Error 1
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:268: /var/lib/dkms/veeamsnap/4.0.0.1961/build/bitmap_sync.o] Error 1
make[1]: *** [scripts/Makefile.build:268: /var/lib/dkms/veeamsnap/4.0.0.1961/build/log.o] Error 1
make: *** [Makefile:1683: /var/lib/dkms/veeamsnap/4.0.0.1961/build] Error 2
make: Leaving directory '/usr/src/kernels/5.6.7-300.fc32.x86_64'
Thank you in advance.
Best regards, Luki
ThongSong7
Lurker
Posts: 1
Liked: never
Joined: May 01, 2020 6:58 am
Full Name: Thong Song III
Contact:

Re: kernel 5.6.7: veeamsnap compile errors

Post by ThongSong7 »

I just updated to F32 also: 5.6.7-300.fc32.x86_64

The fix is at:
https://github.com/mike2307/veeamsnap/t ... el-5.6-fix

It has to do with our kernel apparently and the time_t thing, I thank this developer (mike2307) and in the true nature of opensource sharing the solution with everyone. Replacing the 4 modified files, build and install - backups work 100% :)
cloggy
Enthusiast
Posts: 40
Liked: 2 times
Joined: Nov 08, 2015 12:22 am
Full Name: Dick Hoogendoorn
Contact:

Re: kernel 5.6.7: veeamsnap compile errors

Post by cloggy »

Apologies for this (maybe?) stupid question. I downloaded the zip file from github and did a 'make all && make load' and it solved the problem with this kernel version. But, after a reboot of the system I have to issue the 'make load' command again from the directory where I performed the 'make all' command. Is there a way that the new veaamsnap module is automatically loaded after a reboot?

Thanks (and don't smile..)
cloggy
Enthusiast
Posts: 40
Liked: 2 times
Joined: Nov 08, 2015 12:22 am
Full Name: Dick Hoogendoorn
Contact:

Re: kernel 5.6.7: veeamsnap compile errors

Post by cloggy »

No need to answer. Went back to kernel 5.4.36 and it is running OK again. Will stay with this kernel till there is a future solution where Veeamsnap supports higher kernel versions.
rokko74
Novice
Posts: 9
Liked: 4 times
Joined: Sep 12, 2017 7:24 pm
Full Name: Roberto
Contact:

Re: kernel 5.6.7: veeamsnap compile errors

Post by rokko74 »

I did a quick search and it seems 'time_t' is no more used and replaced by 'time64_t'. Same thing for 'getnstimeofday' (replaced by 'ktime_get').

I will wait for veeam officially supporting new kernels features, but meanwhile this worked for me on Fedora 31 Workstation kernel 5.6.8-200.fc31.x86_64 and on Fedora 32 Workstation kernel 5.6.8-300.fc32.x86_64

Code: Select all

# dnf -y reinstall veeam veeamsnap
# sed -i 's/time\.h/time64\.h/g' /usr/src/veeamsnap-4.0.0.1961/stdafx.h
# sed -i 's/time\.h/time64\.h/g' /usr/src/veeamsnap-4.0.0.1961/log.c
# sed -i 's/time\.h/time64\.h/g' /usr/src/veeamsnap-4.0.0.1961/log.h
# sed -i 's/timespec/timespec64/g' /usr/src/veeamsnap-4.0.0.1961/log.c
# sed -i 's/time_t/time64_t/g' /usr/src/veeamsnap-4.0.0.1961/log.c
# sed -i 's/time_t/time64_t/g' /usr/src/veeamsnap-4.0.0.1961/log.h
# sed -i 's/getnstimeofday/ktime_get\(\)\;\/\//g' /usr/src/veeamsnap-4.0.0.1961/log.c
# sed -i 's/timespec/timespec64/g' /usr/src/veeamsnap-4.0.0.1961/cbt_storage.c
# sed -i 's/timespec/timespec64/g' /usr/src/veeamsnap-4.0.0.1961/cbt_storage.h
# sed -i 's/getnstimeofday/ktime_get\(\)\;\/\//g' /usr/src/veeamsnap-4.0.0.1961/cbt_storage.c
# dkms install -m veeamsnap -v $(rpm -q veeam --queryformat "%{VERSION}")
OBVIOUSLY take it with no warranties and don't use in production environments!
PTide
Product Manager
Posts: 6428
Liked: 729 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: kernel 5.6.7: veeamsnap compile errors

Post by PTide »

Hi,

@lukistellar,

As it is mentioned in system requirements, Fedora is supported up to kernel 5.4.14.
That is, I am afraid that the best thing support can do is to log your inquiry and pass it to development and QA teams eventually.

Anyway, thank you for your research, it is very appreciated.

Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests