3

I have a hard time compiling some program.

error: undefined reference to 'boost::iostreams::zlib::best_speed

So I am trying to build boost 1.72.0 on Ubuntu 19.10

$ ./b2

Building the Boost C++ Libraries.


- zlib                     : no  (cached)
- bzip2                    : yes (cached)

But it appears I already have zlib.

$ apt show zlib1g
Package: zlib1g
Version: 1:1.2.11.dfsg-1ubuntu3
$ apt show zlib1g-dev
Package: zlib1g-dev
Version: 1:1.2.11.dfsg-1ubuntu3

Can I somehow explicitly pass a path to zlib to b2?

I have a header in my system:

$ find /usr/include -name "zlib.h"
/usr/include/zlib.h
Eliah Kagan
  • 119,640
DDT
  • 151

1 Answers1

1

For more predictable results you have to install all needed build-dependencies for current version of Boost package by running

sudo apt-get build-dep boost1.67

and then try to compile the newest.

N0rbert
  • 103,263