Error when compiling ZNC 1.10.1 #1074

Closed
opened 2026-10-05 05:01:59 +02:00 by adam · 11 comments
Owner

I already installed ZNC in a past, like a breeze.

This time, I'm stuck with en arror about Boost::locale

When I do cmake .. -DCMAKE_INSTALL_PREFIX="$HOME/.local", I got :

-- Checking for module 'libargon2'
--   Package 'libargon2', required by 'virtual:world', not found
-- Could NOT find boost_locale (missing: boost_locale_DIR)
-- Boost.Locale or gettext (msgfmt) is not found, disabling i18n support
-- Will build cctz
+---------------------------------------+
| ZNC 1.10.1 configured                 |
|                                       |
| Prefix    : /home/memyselfandi/.local |
| SSL       : yes                       |
| IPv6      : yes                       |
| Async DNS : yes                       |
| Perl      : no                        |
| Python    : no                        |
| Tcl       : no                        |
| Cyrus     : yes                       |
| Charset   : yes                       |
| Zlib      : yes                       |
| i18n      : no                        |
| Argon2    : no                        |
+---------------------------------------+

Now you can run 'make' to compile ZNC

-- Configuring done
CMake Error at src/CMakeLists.txt:67 (target_link_libraries):
  Target "znclib" links to:

    Boost::locale

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.



-- Generating done

And if when I make :

[ 28%] Building CXX object src/CMakeFiles/znc.dir/main.cpp.o
[ 29%] Linking CXX executable znc
/usr/bin/ld: cannot find -lBoost::locale: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/znc.dir/build.make:103: src/znc] Error 1
make[1]: *** [CMakeFiles/Makefile2:438: src/CMakeFiles/znc.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

I downloaded and compiled the Boost Library (https://www.boost.org/doc/user-guide/getting-started.html) in my ~/local but I don't know how to "include" the lib in the buid, or how to fix the missing link.

I'm not root on this server (no sudo), and a real noob in C++.

Anyone can help me ?
Thx 🙏

I already installed ZNC in a past, like a breeze. This time, I'm stuck with en arror about `Boost::locale` When I do `cmake .. -DCMAKE_INSTALL_PREFIX="$HOME/.local"`, I got : ``` -- Checking for module 'libargon2' -- Package 'libargon2', required by 'virtual:world', not found -- Could NOT find boost_locale (missing: boost_locale_DIR) -- Boost.Locale or gettext (msgfmt) is not found, disabling i18n support -- Will build cctz +---------------------------------------+ | ZNC 1.10.1 configured | | | | Prefix : /home/memyselfandi/.local | | SSL : yes | | IPv6 : yes | | Async DNS : yes | | Perl : no | | Python : no | | Tcl : no | | Cyrus : yes | | Charset : yes | | Zlib : yes | | i18n : no | | Argon2 : no | +---------------------------------------+ Now you can run 'make' to compile ZNC -- Configuring done CMake Error at src/CMakeLists.txt:67 (target_link_libraries): Target "znclib" links to: Boost::locale but the target was not found. Possible reasons include: * There is a typo in the target name. * A find_package call is missing for an IMPORTED target. * An ALIAS target is missing. -- Generating done ``` And if when I `make` : ``` [ 28%] Building CXX object src/CMakeFiles/znc.dir/main.cpp.o [ 29%] Linking CXX executable znc /usr/bin/ld: cannot find -lBoost::locale: No such file or directory collect2: error: ld returned 1 exit status make[2]: *** [src/CMakeFiles/znc.dir/build.make:103: src/znc] Error 1 make[1]: *** [CMakeFiles/Makefile2:438: src/CMakeFiles/znc.dir/all] Error 2 make: *** [Makefile:136: all] Error 2 ``` I downloaded and compiled the Boost Library (https://www.boost.org/doc/user-guide/getting-started.html) in my `~/local` but I don't know how to "include" the lib in the buid, or how to fix the missing link. I'm not root on this server (no sudo), and a real noob in C++. Anyone can help me ? Thx 🙏 <!-- github-sync-id:3260989558 -->
adam closed this issue 2026-10-05 05:01:59 +02:00
Author
Owner

Hmmm... I added export boost_locale_DIR=/home/memyselfandi/local to my .bashrc, sourced it, and now I have another message on cmake :

-- Checking for module 'libargon2'
--   Package 'libargon2', required by 'virtual:world', not found
CMake Warning at /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake:141 (find_package):
  Could not find a configuration file for package "boost_locale" that exactly
  matches requested version "1.74.0".

  The following configuration files were considered but not accepted:

    /home/memyselfandi/local/lib/cmake/boost_locale-1.89.0/boost_locale-config.cmake, version: 1.89.0

Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake:258 (boost_find_component)
  CMakeLists.txt:264 (find_package)

Seems the lib is installed somewhere on the server but whit a different version ?

Hmmm... I added `export boost_locale_DIR=/home/memyselfandi/local` to my .bashrc, sourced it, and now I have another message on cmake : ``` -- Checking for module 'libargon2' -- Package 'libargon2', required by 'virtual:world', not found CMake Warning at /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake:141 (find_package): Could not find a configuration file for package "boost_locale" that exactly matches requested version "1.74.0". The following configuration files were considered but not accepted: /home/memyselfandi/local/lib/cmake/boost_locale-1.89.0/boost_locale-config.cmake, version: 1.89.0 Call Stack (most recent call first): /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake:258 (boost_find_component) CMakeLists.txt:264 (find_package) ``` Seems the lib is installed somewhere on the server but whit a different version ? <!-- github-comment-id:3114667722 -->
Author
Owner

I downloaded and compiled the Boost Library

You should not need that. Unless you specifically want i18n support. This may be a difference between how cmake was finding boost itself before vs how boost does it now

Can you pastebin your CMakeCache.txt and cmake --system-information while in the build directory?

> I downloaded and compiled the Boost Library You should not need that. Unless you specifically want i18n support. This may be a difference between how cmake was finding boost itself before vs how boost does it now Can you pastebin your CMakeCache.txt and `cmake --system-information` while in the build directory? <!-- github-comment-id:3114790627 -->
Author
Owner

Thanx.

CMakeCache.txt
https://pastebin.com/sSGKU3ui

cmake --system-information
https://pastebin.com/DBt52WTa

Thanx. CMakeCache.txt https://pastebin.com/sSGKU3ui `cmake --system-information` https://pastebin.com/DBt52WTa <!-- github-comment-id:3114846157 -->
Author
Owner

Error, this is a private paste or is pending moderation. If this paste belongs to you, please login to Pastebin to view it.

> Error, this is a private paste or is pending moderation. If this paste belongs to you, please login to Pastebin to view it. <!-- github-comment-id:3114852441 -->
Author
Owner

Sorry, should be better :

CMakeCache.txt
https://pastebin.com/4m9mE3i1

cmake --system-information
https://pastebin.com/WKyCEQq0

Sorry, should be better : CMakeCache.txt https://pastebin.com/4m9mE3i1 cmake --system-information https://pastebin.com/WKyCEQq0 <!-- github-comment-id:3114895044 -->
Author
Owner

cmake --system-information

This one still doesn't work

> cmake --system-information This one still doesn't work <!-- github-comment-id:3114955993 -->
Author
Owner

But I've now reproduced it, thanks

But I've now reproduced it, thanks <!-- github-comment-id:3114973089 -->
Author
Owner

cmake --system-information
https://pastebin.com/Dk9pL5Yp

Better ?

[edit: it's Pending Moderation, maybe because I just been creating my account]

`cmake --system-information` https://pastebin.com/Dk9pL5Yp Better ? [edit: it's Pending Moderation, maybe because I just been creating my account] <!-- github-comment-id:3115019555 -->
Author
Owner

That link doesn't work either.

Anyway, don't worry, I fixed this already, please try patch from https://github.com/znc/znc/commit/2daae4358a11a9c7153fd8d4991764f9425cfe5b

That link doesn't work either. Anyway, don't worry, I fixed this already, please try patch from https://github.com/znc/znc/commit/2daae4358a11a9c7153fd8d4991764f9425cfe5b <!-- github-comment-id:3115025271 -->
Author
Owner

cmake worked and it's compiling... Thanx :)

cmake worked and it's compiling... Thanx :) <!-- github-comment-id:3115048049 -->
Author
Owner

znc up and running :)

znc up and running :) <!-- github-comment-id:3115073209 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#1074