<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Build Qt on Ubuntu 22: md4c::md4c-html]]></title><description><![CDATA[<p dir="auto">I try build Qt from source code in Ubuntu 22, but I get error</p>
<pre><code>CMake Error at /usr/lib/x86_64-linux-gnu/cmake/md4c/md4cConfig.cmake:95 (message):
  The imported target "md4c::md4c-html" references the file

     "/usr/lib/x86_64-linux-gnu/libmd4c-html.so.0.4.8"
</code></pre>
<p dir="auto">This is my Qt build steps</p>
<pre><code># host: Ubuntu 22
# sudo apt-get build-dep qtbase5-dev cmake ninja-build

# I forget this line
# sudo apt-get install libmd4c*

# This steps use Qt mirror on github because of fast downloading from github. But you can use 
# git clone git://code.qt.io/qt/qt5.git qt5

export MyQtBaseDir=$PWD
# Prepare Qt
cd ${MyQtBaseDir}
# Qt's folders must be clear: remove and create its again
rm -Rf ${MyQtBaseDir}/build_host_powerfull/ ${MyQtBaseDir}/build_artifacts_host_powerfull/ &amp;&amp; mkdir ${MyQtBaseDir}/build_host_powerfull ${MyQtBaseDir}/build_artifacts_host_powerfull

# If you want test another Qr version do: 
#rm -Rf ${MyQtBaseDir}/qt5/
git clone https://github.com/qt/qt5 qt5
cd qt5
# git switch 6.6.0
perl init-repository --module-subset=qtbase,qtserialport,qtcharts

export QT_DEBUG_PLUGINS=1
# export QT_QPA_EGLFS_FB=/dev/fb0

cd ${MyQtBaseDir}/build_host_powerfull
../qt5/configure -release -static -opensource -nomake examples -nomake tests -confirm-license -skip webengine -skip qtwayland -skip qtdoc -skip qtgraphicaleffects -skip qtqa -skip qttranslations -skip qtvirtualkeyboard -skip qtquicktimeline -skip qtquick3d -skip qt3d -skip qtrepotools -skip qttools -skip qtimageformats -skip qtnetworkauth -skip qtwebsockets -skip qtactiveqt -skip qtmacextras -skip winextras -skip qtmultimedia -skip qtgamepad -skip qtserialbus -skip qtspeech -skip qtsensors -skip qtlocation -no-ssl -prefix ../build_artifacts_host_powerfull -skip qtserialport -skip qtcharts -- -GNinja -DCMAKE_TOOLCHAIN_FILE=../toolchain_host_powerfull.cmake
cmake --build . --parallel &amp;&amp; cmake --install .
</code></pre>
<p dir="auto">This is my toolchain_host_powerfull.cmake</p>
<pre><code>cmake_minimum_required(VERSION 3.18)
include_guard(GLOBAL)

#set(CMAKE_GENERATOR "Ninja")
#can't off this set(FEATURE_pcre2 OFF)
#set(FEATURE_opengl OFF)
#set(FEATURE_ico OFF)
#set(FEATURE_xcb OFF)
#set(FEATURE_xcb_xlib OFF)
set(FEATURE_network ON)
set(FEATURE_sctp OFF)
set(FEATURE_widgets ON)
#enable signal-slot
#set(FEATURE_dbus OFF)
#set(FEATURE_dbus_linked OFF)

#set(FEATURE_gui ON)
#set(FEATURE_sqlmodel OFF)
#set(FEATURE_sql OFF)
set(FEATURE_androiddeployqt OFF)
#set(testlib OFF)
#set(X11_SUPPORTED OFF) # more https://bugreports.qt.io/browse/QTBUG-109028
set(FEATURE_c89 OFF)
#set(FEATURE_c99 OFF)
#set(FEATURE_c11 OFF)
set(FEATURE_pkg_config OFF)
#set(FEATURE_testlib OFF)
#set(FEATURE_translation OFF)
#set(FEATURE_xml OFF)
#set(FEATURE_backtrace OFF)
#set(FEATURE_animation OFF)
#set(FEATURE_intelcet OFF)
#set(BUILD_WITH_PCH OFF)
#set(FEATURE_x86intrin OFF)
#build static Qt 
set(BUILD_SHARED_LIBS ON) #Build Qt statically (OFF) or dynamically (ON)
#set(FEATURE_static ON)
#no qmake
#set(FEATURE_qmake OFF)

set(CMAKE_C_FLAGS_INIT "static")
set(CMAKE_CXX_FLAGS_INIT "static")
set(CMAKE_BUILD_TYPE "Debug")

include(CMakeInitializeConfigs)

function(cmake_initialize_per_config_variable _PREFIX _DOCSTRING)
  if (_PREFIX MATCHES "CMAKE_(C|CXX|ASM)_FLAGS")
    set(CMAKE_${CMAKE_MATCH_1}_FLAGS_INIT "${QT_COMPILER_FLAGS}")
        
    foreach (config DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)
      if (DEFINED QT_COMPILER_FLAGS_${config})
        set(CMAKE_${CMAKE_MATCH_1}_FLAGS_${config}_INIT "${QT_COMPILER_FLAGS_${config}}")
      endif()
    endforeach()
  endif()


  if (_PREFIX MATCHES "CMAKE_(SHARED|MODULE|EXE)_LINKER_FLAGS")
    foreach (config SHARED MODULE EXE)
      set(CMAKE_${config}_LINKER_FLAGS_INIT "${QT_LINKER_FLAGS}")
    endforeach()
  endif()

  _cmake_initialize_per_config_variable(${ARGV})
endfunction()
</code></pre>
]]></description><link>https://forum.qt.io/topic/152529/build-qt-on-ubuntu-22-md4c-md4c-html</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 16:49:13 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/152529.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 01 Dec 2023 04:36:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Build Qt on Ubuntu 22: md4c::md4c-html on Mon, 04 Dec 2023 00:44:01 GMT]]></title><description><![CDATA[<p dir="auto">To solve this problem do</p>
<pre><code class="language-bash">sudo apt-get install libmd4c*
</code></pre>
<p dir="auto">Full code <a href="https://github.com/AndreiCherniaev/Ubuntu_X11_Build_Qt_widgets" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>.</p>
]]></description><link>https://forum.qt.io/post/781521</link><guid isPermaLink="true">https://forum.qt.io/post/781521</guid><dc:creator><![CDATA[DungeonLords]]></dc:creator><pubDate>Mon, 04 Dec 2023 00:44:01 GMT</pubDate></item></channel></rss>