Bug 2161688

Summary: neochat failing to build with cmark-0.30.2
Product: [Fedora] Fedora Reporter: Jens Petersen <petersen>
Component: neochatAssignee: marcdeop
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: kde-sig, marcdeop
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-17 19:01:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jens Petersen 2023-01-17 15:59:49 UTC
Description of problem:
I tried building rawhide neochat against cmark-0.30.2:
https://download.copr.fedorainfracloud.org/results/petersen/cmark/fedora-rawhide-x86_64/05239258-neochat/
and failed with:

:
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "3.0.7")  
CMake Error at /usr/lib64/cmake/cmark/cmark-targets.cmake:99 (message):
  The imported target "cmark::cmark_exe" references the file
     "/usr/bin/cmark"
  but this file does not exist.  Possible reasons include:
  * The file was deleted, renamed, or moved to another location.
  * An install or uninstall procedure did not complete successfully.
  * The installation package was faulty and contained
     "/usr/lib64/cmake/cmark/cmark-targets.cmake"
  but not all the files it references.
Call Stack (most recent call first):
  /usr/lib64/cmake/cmark/cmark-config.cmake:37 (include)
  cmake/Findcmark.cmake:10 (find_package)
  CMakeLists.txt:96 (find_package)
-- Configuring incomplete, errors occurred!
See also "/builddir/build/BUILD/neochat-22.11/redhat-linux-build/CMakeFiles/CMakeOutput.log".
error: Bad exit status from /var/tmp/rpm-tmp.jai9DA (%build)

Additional info:
If I add "BR: cmark" I then hit:

-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "3.0.7")  
CMake Error at /usr/lib64/cmake/cmark/cmark-targets.cmake:99 (message):
  The imported target "cmark::cmark_static" references the file
     "/usr/lib64/libcmark.a"
  but this file does not exist.  Possible reasons include:
  * The file was deleted, renamed, or moved to another location.
  * An install or uninstall procedure did not complete successfully.
  * The installation package was faulty and contained
     "/usr/lib64/cmake/cmark/cmark-targets.cmake"
  but not all the files it references.
Call Stack (most recent call first):
  /usr/lib64/cmake/cmark/cmark-config.cmake:37 (include)
  cmake/Findcmark.cmake:10 (find_package)
  CMakeLists.txt:96 (find_package)
-- Configuring incomplete, errors occurred!

Not sure why this is only hitting neochat, maybe something in the CMake config is causing this?  No other fedora packages seem to be affected so far.

Comment 1 Jens Petersen 2023-01-17 16:01:38 UTC
I meant to add I'd like to update to the newer cmark for Fedora 38, so ideally it should go into rawhide soon.

Comment 2 marcdeop 2023-01-17 19:01:41 UTC
I believe the problem lies on your cmark build. It's removing the libcmark.a file for some reason.

I built cmark and neochat successfully here: https://copr.fedorainfracloud.org/coprs/marcdeop/tests/builds/

NOTE: I added "BuildRequires: cmark" in Neochat.

Please re-open if I am wrong.

Comment 3 Jens Petersen 2023-01-18 05:25:44 UTC
We don't ship static libs in Fedora: anyway I tweaked cmark's cmake to not build libcmark.a now.

I still don't know why neochat thinks it now needs /usr/bin/cmark - does it really?
The fact that it thought it needed the static lib also suggests something might be wrong in cmake, but anyway.

But I also got neochat to build with:

@@ -35,9 +35,10 @@ BuildRequires: cmake(KF5WindowSystem)
 BuildRequires: cmake(KQuickImageEditor)
 BuildRequires: cmake(QCoro5)
 BuildRequires: cmake(Quotient)
-BuildRequires: pkgconfig(libcmark)
+BuildRequires: cmake(cmark)
 
 BuildRequires: cmake
+BuildRequires: cmark
 BuildRequires: desktop-file-utils
 BuildRequires: extra-cmake-modules
 BuildRequires: gcc