Bug 431311 - Discount (required version >= 2) can not be found
Summary: Discount (required version >= 2) can not be found
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 20.12.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-08 14:41 UTC by Tomasz Paweł Gajc
Modified: 2021-01-24 11:51 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Build Log (104.03 KB, text/plain)
2021-01-08 14:41 UTC, Tomasz Paweł Gajc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Paweł Gajc 2021-01-08 14:41:41 UTC
Created attachment 134660 [details]
Build Log

SUMMARY
I'm building Okular-20.12.1 with enabled Discount support. Unfortunately cmake cannot it find.

STEPS TO REPRODUCE
1. install discount-2.2.7
2. run okular build
3. 

OBSERVED RESULT
-- The following OPTIONAL packages have not been found:
 * Discount (required version >= 2)

EXPECTED RESULT
Discount is found and Okular is build with libmarkdown support

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: OpenMandriva Cooker 4.2 RC
(available in About System)
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Build logs with tracing enabled here https://abf.openmandriva.org/build_lists/932120
Comment 1 Yuri Chornoivan 2021-01-08 14:56:39 UTC
Hi,

It looks like the library has been built despite the CMake warning (same here under Mageia 7).

Can you check it?

Thanks in advance for your answer.
Comment 2 Nate Graham 2021-01-08 21:40:35 UTC
Did you make sure to install the dev library too?
Comment 3 Tomasz Paweł Gajc 2021-01-08 21:59:11 UTC
Yes libmarkdown-devel is installed in buildroot, you can notice that on logs I did attach.

-- Found discount: /usr/lib64/libmarkdown.so

Seems like okularGenerator_md.so is linked to libmarkdown.so.2(), so came is somehow broken with its false positive tests.
Comment 4 Bug Janitor Service 2021-01-08 23:22:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/359
Comment 5 Albert Astals Cid 2021-01-24 11:51:50 UTC
Git commit 084631d11eddadb0802f0adbcd4a56c18ea68efc by Albert Astals Cid.
Committed on 24/01/2021 at 11:16.
Pushed by aacid into branch 'master'.

Use more standard cmake functionality to search for discount

Instead of rolling our own, that's harder to understand and buggy anyway

M  +3    -3    autotests/CMakeLists.txt
M  +6    -27   cmake/modules/FindDiscount.cmake
M  +3    -3    generators/CMakeLists.txt
M  +1    -1    generators/markdown/CMakeLists.txt

https://invent.kde.org/graphics/okular/commit/084631d11eddadb0802f0adbcd4a56c18ea68efc