# Documentation - Building from source

**URL:** <https://forum.opencv.org/t/documentation-building-from-source/2051>\
**Category:** Uncategorized\
**Tags:** build\
**Created:** [March 9, 2021, 5:49pm UTC](https://forum.opencv.org/t/documentation-building-from-source/2051 "2021-03-09T17:49:33Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![H\_D](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@H\_D](https://forum.opencv.org/u/H_D)\
**Post date:** [March 9, 2021, 5:49pm UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/1 "2021-03-09T17:49:33Z")

</div>

Given the extracted Sub-Directory of the documentation (no other directories) from the source code distribution, how, _ **precisely** _, can I get the documentation build into HTML and PDF files.

Else, if it is not possible, then with the full source code distribution (will obtain it again)

NOTE: I would like to do it for _opencv (core)_ and all others e.g. _opencv\_contrib , nonfree_ etc…

---

<div class="post-metadata">

**Author:** ![laurent.berger](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@laurent.berger](https://forum.opencv.org/u/laurent.berger)\
**Post date:** [March 9, 2021, 5:55pm UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/2 "2021-03-09T17:55:19Z")

</div>

documentation is built using doxygen.  
I don’t know a pdf file fro documentation? Where did you get it?  
How to build documentation it’s [here](https://docs.opencv.org/master/d4/db1/tutorial_documentation.html)

---

<div class="post-metadata">

**Author:** ![H\_D](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@H\_D](https://forum.opencv.org/u/H_D)\
**Post date:** [March 10, 2021, 1:59am UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/3 "2021-03-10T01:59:42Z")

</div>

@laurent.berger]([Profile - laurent.berger - OpenCV](https://forum.opencv.org/u/laurent.berger))

I tried it. But during cmake running, it gives errors about missing components, and not being allowed to download them either, lots of them.

Can you give _ **fool-proof** _ _step by step_ instructions, from **scratch**? (include _a_ ll steps such as _download,extract,configuration,setup,configuration, etc…_ ),

I would like to do it for opencv (core) and all others e.g. opencv\_contrib , nonfree etc…

---

<div class="post-metadata">

**Author:** ![laurent.berger](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@laurent.berger](https://forum.opencv.org/u/laurent.berger)\
**Post date:** [March 10, 2021, 8:45am UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/4 "2021-03-10T08:45:45Z")

</div>

Can you post cmakeoutput.txt?

---

<div class="post-metadata">

**Author:** ![H\_D](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@H\_D](https://forum.opencv.org/u/H_D)\
**Post date:** [March 11, 2021, 2:41am UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/6 "2021-03-11T02:41:43Z")

</div>

@laurent.berger

Here they are,(did not allow being attached):

**CMakeOutput.log**  
[https://justpaste.it/CMakeOutput](https://justpaste.it/CMakeOutput)

**CMakeError.log**  
[https://justpaste.it/CMakeError](https://justpaste.it/CMakeError)

---

<div class="post-metadata">

**Author:** ![laurent.berger](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@laurent.berger](https://forum.opencv.org/u/laurent.berger)\
**Post date:** [March 11, 2021, 8:13am UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/7 "2021-03-11T08:13:11Z")

</div>

that’s only test. Don’t stop cmake process and post full cmake output and may be cmakecache.txt

---

<div class="post-metadata">

**Author:** ![H\_D](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@H\_D](https://forum.opencv.org/u/H_D)\
**Post date:** [March 11, 2021, 10:17am UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/8 "2021-03-11T10:17:39Z")

</div>

@laurent.berger

**Full Cmake Output:**  
[http://justpaste.it/Full\_Cmake\_Output](http://justpaste.it/Full_Cmake_Output)

**cmakecache.txt**  
[http://justpaste.it/CMakeCache](http://justpaste.it/CMakeCache)

---

<div class="post-metadata">

**Author:** ![laurent.berger](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@laurent.berger](https://forum.opencv.org/u/laurent.berger)\
**Post date:** [March 11, 2021, 11:54am UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/9 "2021-03-11T11:54:38Z")

</div>

Some lines are missing in cmakeoutput

---

<div class="post-metadata">

**Author:** ![H\_D](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@H\_D](https://forum.opencv.org/u/H_D)\
**Post date:** [March 11, 2021, 12:20pm UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/10 "2021-03-11T12:20:07Z")

</div>

@laurent.berger

> [@laurent.berger](#):
>
> Some lines are missing in cmakeoutput

Yes. The following was output to StandardError stream:

```
CMake Error at CMakeLists.txt:779 (find_package):
  Could not find a package configuration file provided by "quirc" with any of
  the following names:

    quircConfig.cmake
    quirc-config.cmake

  Add the installation prefix of "quirc" to CMAKE_PREFIX_PATH or set
  "quirc_DIR" to a directory containing one of the above files. If "quirc"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!
See also "C:/OpenCV_Doc/BUILD/CMakeFiles/CMakeOutput.log".
See also "C:/OpenCV_Doc/BUILD/CMakeFiles/CMakeError.log".

```

---

<div class="post-metadata">

**Author:** ![laurent.berger](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@laurent.berger](https://forum.opencv.org/u/laurent.berger)\
**Post date:** [March 11, 2021, 12:23pm UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/11 "2021-03-11T12:23:43Z")

</div>

Have you clone opencv?  
delete cmakecache.txt start cmakegui

---

<div class="post-metadata">

**Author:** ![H\_D](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@H\_D](https://forum.opencv.org/u/H_D)\
**Post date:** [March 11, 2021, 1:29pm UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/12 "2021-03-11T13:29:50Z")

</div>

> Have you clone opencv?  
> Yes, and _opencv\_contrib_ also.

I did as stated in [https://docs.opencv.org/master/d4/db1/tutorial\_documentation.html](https://docs.opencv.org/master/d4/db1/tutorial_documentation.html), :

> ## Generate documentation
> 
> Get the OpenCV sources  
> Get the OpenCV\_contrib sources  
> Create build directory near the sources folder(s) and go into it  
> Run cmake:
> 
> `cmake -DBUILD_DOCS=ON -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ../opencv`

> delete cmakecache.txt start cmakegui

And do what with it?, (I _never_ used it before)

---

<div class="post-metadata">

**Author:** ![laurent.berger](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@laurent.berger](https://forum.opencv.org/u/laurent.berger)\
**Post date:** [March 11, 2021, 1:54pm UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/13 "2021-03-11T13:54:41Z")

</div>

delete cmakecache.txt That’s better. Post all cmake output after cmd cmake

You must get something like [that](https://gist.github.com/LaurentBerger/ab5ba5ff9cbe4f585578d7169cae5b85#file-gistfile1-txt)

---

<div class="post-metadata">

**Author:** ![H\_D](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@H\_D](https://forum.opencv.org/u/H_D)\
**Post date:** [March 11, 2021, 7:06pm UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/14 "2021-03-11T19:06:01Z")

</div>

@laurent.berger

I did post _all_ output. Here it is, after running _again_:  
[https://justpaste.it/9qycg](https://justpaste.it/9qycg)

and here is a video of it in action:

---

<div class="post-metadata">

**Author:** ![laurent.berger](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@laurent.berger](https://forum.opencv.org/u/laurent.berger)\
**Post date:** [March 11, 2021, 7:32pm UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/15 "2021-03-11T19:32:31Z")

</div>

try cmake -DWITH\_QUIRC:BOOL=OFF

---

<div class="post-metadata">

**Author:** ![H\_D](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@H\_D](https://forum.opencv.org/u/H_D)\
**Post date:** [March 11, 2021, 7:54pm UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/16 "2021-03-11T19:54:46Z")

</div>

@laurent.berger

> [@laurent.berger](#):
>
> -DWITH\_QUIRC:BOOL=OFF

I still get more errors:

```
-- ADE: Download: v0.1.1f.zip
CMake Error at cmake/OpenCVDownload.cmake:161 (message):
      Downloads are not permitted during configure. Please pre-download the file "C:/OpenCV_Doc/OpenCV/.cache/ade/b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip":
      
      vcpkg_download_distfile(OCV_DOWNLOAD
          URLS "https://github.com/opencv/ade/archive/v0.1.1f.zip"
          FILENAME "opencv-cache/ade/b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip"
          SHA512 0
      )
Call Stack (most recent call first):
  modules/gapi/cmake/DownloadADE.cmake:5 (ocv_download)
  modules/gapi/cmake/init.cmake:19 (include)
  cmake/OpenCVModule.cmake:298 (include)
  cmake/OpenCVModule.cmake:361 (_add_modules_1)
  modules/CMakeLists.txt:7 (ocv_glob_modules)

-- Configuring incomplete, errors occurred!
See also "C:/OpenCV_Doc/BUILD/CMakeFiles/CMakeOutput.log".
See also "C:/OpenCV_Doc/BUILD/CMakeFiles/CMakeError.log".

```

Output:  
[https://justpaste.it/8atqk](https://justpaste.it/8atqk)

---

<div class="post-metadata">

**Author:** ![laurent.berger](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@laurent.berger](https://forum.opencv.org/u/laurent.berger)\
**Post date:** [March 11, 2021, 7:58pm UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/17 "2021-03-11T19:58:03Z")

</div>

try cmake -G"Visual Studio 16 2019" -A x64 -DWITH\_QUIRC:BOOL=OFF  
Are you behind a proxy?

there is an issue here [Can't install OpenCV with ffmpeg · Issue #4696 · microsoft/vcpkg · GitHub](https://github.com/Microsoft/vcpkg/issues/4696)

---

<div class="post-metadata">

**Author:** ![H\_D](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@H\_D](https://forum.opencv.org/u/H_D)\
**Post date:** [March 11, 2021, 8:31pm UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/18 "2021-03-11T20:31:16Z")

</div>

> [@H\_D](#):
>
> @laurent.berger

@laurent.berger

Not behind a proxy (Other command line utilities like GIT, are able to download files).

Same output using:

> cmake -DBUILD\_DOCS=ON -DOPENCV\_EXTRA\_MODULES\_PATH=…/opencv\_contrib/modules …/opencv -G"Visual Studio 16 2019" -A x64 -DWITH\_QUIRC:BOOL=OFF

> there is an issue here [Can’t install OpenCV with ffmpeg · Issue #4696 · microsoft/vcpkg · GitHub](https://github.com/Microsoft/vcpkg/issues/4696)

There is no `...\vcpkg\downloads\opencv-cache\` directory created.

---

<div class="post-metadata">

**Author:** ![laurent.berger](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@laurent.berger](https://forum.opencv.org/u/laurent.berger)\
**Post date:** [March 12, 2021, 8:02am UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/19 "2021-03-12T08:02:24Z")

</div>

There is a problem in your configuration. Where do you clone opencv (origin [github.com/opencv](http://github.com/opencv))?

What is vckpg ? there is no no need of vckpg to build opencv

---

<div class="post-metadata">

**Author:** ![H\_D](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@H\_D](https://forum.opencv.org/u/H_D)\
**Post date:** [March 12, 2021, 10:19am UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/20 "2021-03-12T10:19:47Z")

</div>

@laurent.berger

Clone source code To:

```
C:\OpenCV_Doc\OpenCV
C:\OpenCV_Doc\OpenCV_contrib

```

I am currently trying with the Latest version of the Source Code on GIT repository, and it is working, so far (still _processing…_)

---

<div class="post-metadata">

**Author:** ![H\_D](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@H\_D](https://forum.opencv.org/u/H_D)\
**Post date:** [March 12, 2021, 5:21pm UTC](https://forum.opencv.org/t/documentation-building-from-source/2051/21 "2021-03-12T17:21:19Z")

</div>

@laurent.berger

With the latest source code, from the official GIT repositories. the `cmake` step completed without errors.

But when compiling the built project with Visual Studio. using the generated project files, there are build errors:

| Severity | Code | Description | Project | File | Line | Suppression State |
| --- | --- | --- | --- | --- | --- | --- |
| Error | | Illegal ALIASES format ‘text/javascript\> addToggle(); @endhtmlonly’. Use name=value or name{n}=value, where n is the number of arguments | doxygen\_cpp | C:\OpenCV\_Doc\BUILD\doc\CUSTOMBUILD | 1 | |
| Error | | Problems running bibtex. Verify that the command ‘perl --version’ works from the command line. Exit code: 1 | doxygen\_cpp | C:\OpenCV\_Doc\BUILD\doc\CUSTOMBUILD | 1 | |
| Error | | Problems running dot: exit code=-1, command=‘dot’, arguments=‘C:/OpenCV\_Doc/BUILD/doc/doxygen/html/inline\_dotgraph\_1.dot -Tsvg -o C:/OpenCV\_Doc/BUILD/doc/doxygen/html/dot\_inline\_dotgraph\_1.svg’ | doxygen\_cpp | C:\OpenCV\_Doc\BUILD\doc\CUSTOMBUILD | 1 | |
| Error | | Problems running dot: exit code=-1, command=‘dot’, arguments=‘C:/OpenCV\_Doc/BUILD/doc/doxygen/html/inline\_dotgraph\_1.dot -Tcmapx -o C:/OpenCV\_Doc/BUILD/doc/doxygen/html/dot\_inline\_dotgraph\_1.map’ | doxygen\_cpp | C:\OpenCV\_Doc\BUILD\doc\CUSTOMBUILD | 1 | |
| Error | | Problems running dot: exit code=-1, command=‘dot’, arguments=‘C:/OpenCV\_Doc/BUILD/doc/doxygen/html/inline\_dotgraph\_2.dot -Tsvg -o C:/OpenCV\_Doc/BUILD/doc/doxygen/html/dot\_inline\_dotgraph\_2.svg’ | doxygen\_cpp | C:\OpenCV\_Doc\BUILD\doc\CUSTOMBUILD | 1 | |
| Error | | Problems running dot: exit code=-1, command=‘dot’, arguments=‘C:/OpenCV\_Doc/BUILD/doc/doxygen/html/inline\_dotgraph\_2.dot -Tcmapx -o C:/OpenCV\_Doc/BUILD/doc/doxygen/html/dot\_inline\_dotgraph\_2.map’ | doxygen\_cpp | C:\OpenCV\_Doc\BUILD\doc\CUSTOMBUILD | 1 | |
| Error | | Problems running dot: exit code=-1, command=‘dot’, arguments=‘C:/OpenCV\_Doc/BUILD/doc/doxygen/html/inline\_dotgraph\_3.dot -Tsvg -o C:/OpenCV\_Doc/BUILD/doc/doxygen/html/dot\_inline\_dotgraph\_3.svg’ | doxygen\_cpp | C:\OpenCV\_Doc\BUILD\doc\CUSTOMBUILD | 1 | |
| Error | | Problems running dot: exit code=-1, command=‘dot’, arguments=‘C:/OpenCV\_Doc/BUILD/doc/doxygen/html/inline\_dotgraph\_3.dot -Tcmapx -o C:/OpenCV\_Doc/BUILD/doc/doxygen/html/dot\_inline\_dotgraph\_3.map’ | doxygen\_cpp | C:\OpenCV\_Doc\BUILD\doc\CUSTOMBUILD | 1 | |
| Error | MSB8066 | Custom build for ‘C:\OpenCV\_Doc\BUILD\CMakeFiles\10d41d57a77342e4a3100f8f5e8ed012\doxygen\_cpp.rule’ exited with code -1. | doxygen\_cpp | C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets | 238 | |

I will download the official pre-built Documentation, from the GIT repository’s release.

[Next page](https://forum.opencv.org/t/documentation-building-from-source/2051.md?page=2)
