[Rpm-maint] [rpm-software-management/rpm] Could not build rpm from master branch with cmake - No package 'libmagic' found (Issue #2452)

Ralf Habacker notifications at github.com
Fri Mar 24 10:31:11 UTC 2023


I'm trying to build rpm from master branch on openSUSE 15.4 and got a build failure:

```` 
cd ~
git clone https://github.com/rpm-software-management/rpm.git
$ cmake -S rpm -B rpm-build
-- The C compiler identification is GNU 7.5.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
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11")  
-- Found BZip2: /usr/lib64/libbz2.so (found version "1.0.8") 
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Performing Test Iconv_IS_BUILT_IN
-- Performing Test Iconv_IS_BUILT_IN - Success
-- Found Iconv: built in to C library  
-- Checking for module 'lua>=5.2'
--   Found lua, version 5.3.6
-- Checking for module 'popt'
--   Found popt, version 1.16
-- Checking for module 'libmagic'
--   No package 'libmagic' found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:607 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPkgConfig.cmake:829 (_pkg_check_modules_internal)
  CMakeLists.txt:138 (pkg_check_modules)
``` 

The problem is that there is no pkgconfig support for `libmagic` provided by the associated `file-devel` package:
```
$ rpm -q -l file-devel
/usr/include/magic.h
/usr/lib64/libmagic.so
/usr/share/doc/packages/file-devel
/usr/share/doc/packages/file-devel/AUTHORS
/usr/share/doc/packages/file-devel/ChangeLog
/usr/share/doc/packages/file-devel/NEWS
/usr/share/doc/packages/file-devel/README
/usr/share/licenses/file-devel
/usr/share/licenses/file-devel/COPYING
/usr/share/man/man3/libmagic.3.gz
```


-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2452
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/2452 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230324/b56ea6db/attachment-0001.html>


More information about the Rpm-maint mailing list