LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-15-2024, 01:25 PM   #1
Barcoboy
Member
 
Registered: May 2010
Distribution: Slackware
Posts: 58

Rep: Reputation: Disabled
Slackware64-Current can't compile blksnap kernel module


Greetings.

I am trying to get the free Veeam Linux Backup client running on my Slackware64-Current server like I have successfully got it running in Slackware64-15.0. Having trouble compiling the Veeam blksnap kernel module (https://github.com/veeam/blksnap). I did have it running with kernel 6.6 using the "VAL-6.0" branch, but now that I've upgraded to kernel 6.9, it won't compile anymore, giving the following:

Code:
# ./mk.sh build
Making ...
make: Entering directory '/usr/src/linux-6.9'
grep: warning: stray \ before #
grep: warning: stray \ before #
  CC [M]  /usr/src/blksnap/module/bdevfilter.o
  CC [M]  /usr/src/blksnap/module/log.o
  CC [M]  /usr/src/blksnap/module/big_buffer.o
  CC [M]  /usr/src/blksnap/module/cbt_map.o
/usr/src/blksnap/module/log.c:246:5: warning: no previous prototype for ‘log_processor’ [-Wmissing-prototypes]
  246 | int log_processor(void *data)
      |     ^~~~~~~~~~~~~
  CC [M]  /usr/src/blksnap/module/chunk.o
  CC [M]  /usr/src/blksnap/module/ctrl.o
  CC [M]  /usr/src/blksnap/module/diff_io.o
  CC [M]  /usr/src/blksnap/module/diff_area.o
/usr/src/blksnap/module/ctrl.c:438:5: warning: no previous prototype for ‘ioctl_mod’ [-Wmissing-prototypes]
  438 | int ioctl_mod(unsigned long arg)
      |     ^~~~~~~~~
/usr/src/blksnap/module/ctrl.c:448:5: warning: no previous prototype for ‘ioctl_setlog’ [-Wmissing-prototypes]
  448 | int ioctl_setlog(unsigned long arg)
      |     ^~~~~~~~~~~~
/usr/src/blksnap/module/diff_io.c:45:6: warning: no previous prototype for ‘diff_io_endio’ [-Wmissing-prototypes]
   45 | void diff_io_endio(struct bio *bio)
      |      ^~~~~~~~~~~~~
  CC [M]  /usr/src/blksnap/module/diff_buffer.o
/usr/src/blksnap/module/diff_area.c: In function ‘diff_area_free’:
/usr/src/blksnap/module/diff_area.c:128:17: error: implicit declaration of function ‘blkdev_put’; did you mean ‘bdev_fput’? [-Wimplicit-function-declaration]
  128 |                 blkdev_put(diff_area->orig_bdev, NULL);
      |                 ^~~~~~~~~~
      |                 bdev_fput
/usr/src/blksnap/module/diff_area.c: In function ‘diff_area_new’:
/usr/src/blksnap/module/diff_area.c:283:16: error: implicit declaration of function ‘blkdev_get_by_dev’; did you mean ‘blkdev_get_no_open’? [-Wimplicit-function-declaration]
  283 |         bdev = blkdev_get_by_dev(dev_id, FMODE_READ | FMODE_WRITE, NULL, NULL);
      |                ^~~~~~~~~~~~~~~~~
      |                blkdev_get_no_open
/usr/src/blksnap/module/diff_area.c:283:14: error: assignment to ‘struct block_device *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  283 |         bdev = blkdev_get_by_dev(dev_id, FMODE_READ | FMODE_WRITE, NULL, NULL);
      |              ^
make[2]: *** [scripts/Makefile.build:244: /usr/src/blksnap/module/diff_area.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/usr/src/linux-6.9/Makefile:1919: /usr/src/blksnap/module] Error 2
make: *** [Makefile:240: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-6.9'
So I tried cloning and compiling the master branch, but the pre-compile checks fail with the following:

Code:
# cmake .
-- The C compiler identification is GNU 14.1.0
-- The CXX compiler identification is GNU 14.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/lib64/cmake/Boost-1.85.0/BoostConfig.cmake:141 (find_package):
  Found package configuration file:

    /usr/lib64/cmake/boost_filesystem-1.85.0/boost_filesystem-config.cmake

  but it set boost_filesystem_FOUND to FALSE so package "boost_filesystem" is
  considered to be NOT FOUND.  Reason given by package:

  No suitable build variant has been found.

  The following variants have been tried and rejected:

  * libboost_filesystem.so.1.85.0 (shared, Boost_USE_STATIC_LIBS=ON)

Call Stack (most recent call first):
  /usr/lib64/cmake/Boost-1.85.0/BoostConfig.cmake:262 (boost_find_component)
  /usr/share/cmake-3.29/Modules/FindBoost.cmake:594 (find_package)
  lib/blksnap/CMakeLists.txt:26 (FIND_PACKAGE)
I believe the newer cmake compile branches are the way things are moving and that the previous branches which do not use the Boost library will be abandoned.

Anybody have any ideas?
 
Old 05-15-2024, 04:14 PM   #2
lonestar_italy
Member
 
Registered: Nov 2010
Location: Italy
Distribution: Slackware64-current
Posts: 175

Rep: Reputation: 70
https://github.com/veeam/blksnap/com...13a157d7f6a3f5
 
Old 05-15-2024, 06:49 PM   #3
Barcoboy
Member
 
Registered: May 2010
Distribution: Slackware
Posts: 58

Original Poster
Rep: Reputation: Disabled
Thanks lonestar_italy. I see now that the master branch is for upstream kernel integration, where the branch I was using with kernel 6.6 and on my Slackware64-15.0 servers with kernel 5.15 is for the standalone module. The main README.md says about the standalone module that "it is recommended to use the latest branch, as it is likely to support the latest version of the Linux kernel and implement fixes and improvements", but that is where I am running into compiling problems due to Boost (with branch "VAL-6.1.2").
 
Old 05-16-2024, 05:31 AM   #4
lonestar_italy
Member
 
Registered: Nov 2010
Location: Italy
Distribution: Slackware64-current
Posts: 175

Rep: Reputation: 70
The master branch appears to require static libraries for boost, stdc++ and openssl, while Slackware only has shared libraries for boost.

I don't know if the sources could be easily patched to use shared libraries instead of static, or if there's some specific reason for this choice.

I think at the moment it's better to still use 6.6.x kernels on machines where you need to use blksnap, and wait for further news.

Last edited by lonestar_italy; 05-16-2024 at 05:32 AM.
 
Old 05-16-2024, 08:50 AM   #5
Barcoboy
Member
 
Registered: May 2010
Distribution: Slackware
Posts: 58

Original Poster
Rep: Reputation: Disabled
I was able to re-compile Boost to link it statically by changing the lines "link=shared" to "link=static" in the boost.Slackbuild script ("runtime-link=shared" has to stay shared, as the Boost compile checks don't like it set to static), and it now passes the previous tests, but a new problem.

Code:
# cmake .
-- Found Boost: /usr/lib64/cmake/Boost-1.85.0/BoostConfig.cmake (found version "1.85.0") found components: filesystem
-- Found Boost: /usr/lib64/cmake/Boost-1.85.0/BoostConfig.cmake (found version "1.85.0") found components: program_options filesystem
CMake Error at /usr/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY) (found
  version "3.3.0")
Call Stack (most recent call first):
  /usr/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.29/Modules/FindOpenSSL.cmake:686 (find_package_handle_standard_args)
  tests/cpp/CMakeLists.txt:18 (find_package)


-- Configuring incomplete, errors occurred!
Guess I will go back to kernel 6.6 or continue to use my Arkeia system to backup this server for now. :-)
 
Old 05-16-2024, 10:58 AM   #6
lonestar_italy
Member
 
Registered: Nov 2010
Location: Italy
Distribution: Slackware64-current
Posts: 175

Rep: Reputation: 70
it will complete the configuration if you also add -DOPENSSL_CRYPTO_LIBRARY=/usr/lib64/ to the cmake call, but later the compilation will fail. At least it did for me.

Last edited by lonestar_italy; 05-16-2024 at 10:59 AM.
 
Old 05-16-2024, 11:41 AM   #7
Barcoboy
Member
 
Registered: May 2010
Distribution: Slackware
Posts: 58

Original Poster
Rep: Reputation: Disabled
Yeah, the same thing happened to me.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackware64-current v.s. Slackware64-live-current for installing onto main PC? naarter Slackware 21 06-16-2023 05:11 AM
[SOLVED] Can't compile fglrx kernel module for kernel 3.2.13 in -current TobiSGD Slackware 24 06-24-2012 12:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration