boostorg / boostorg/boost

Fails to find a static library with runtime-link=shared

Open
#627 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
8.6k
Forks
1.9k
Avg merge
39m
Merged PRs (30d)
2

Description

B2 fails to find static library (zlib) when I change `runtime-link=static` to `runtime-link=shared`:

```
$ ls /path/to/include/x64-debug
zconf.h zlib.h

$ ls /path/to/lib/x64-debug
libz.a

$ ./b2 -n --reconfigure --debug-configure --with-iostreams -s ZLIB_INCLUDE=/path/to/include/x64-debug -s ZLIB_LIBPATH=/path/to/lib/x64-debug -s ZLIB_NAME=libz link=static runtime-link=static

notice: [zlib] Using pre-installed library
notice: [zlib] Condition

Building the Boost C++ Libraries.
- zlib : yes [3]

$ ./b2 -n --reconfigure --debug-configure --with-iostreams -s ZLIB_INCLUDE=/path/to/include/x64-debug -s ZLIB_LIBPATH=/path/to/lib/x64-debug -s ZLIB_NAME=libz link=static runtime-link=shared

notice: [zlib] Using pre-installed library
notice: [zlib] Condition

Building the Boost C++ Libraries.
- zlib : no [3]

[3] link=static
```

No other difference in command line nor in environment, other than `runtime-link=static` vs. `runtime-link=shared`.

Tried current tip of the master branch (2b06d9f20560a4f7292833fcb71d8c6a3652ca76) as well as an old version 1.71.0.

I expect C++ runtime type selection to not affect library search.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.