Buidling boost error: Name clash for '<pstage\lib>boost_system-vc120-mt-1_58.dll'
Asked Answered
B

5

7

I'm trying to build boost on windows 8.1 with Visual Studio 2013 on 64bit system.

b2 toolset="msvc" address-model=64 -s ZLIB_SOURCE=C:\H\M\zlib --build-type=complete stage

Here is full output:

Performing configuration checks

    - symlinks supported       : no
    - junctions supported      : yes
    - hardlinks supported      : yes
    - arm                      : no
    - mips1                    : no
    - power                    : no
    - sparc                    : no
    - x86                      : yes
    - has_icu builds           : no
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam
    - iconv (libc)             : no
    - iconv (separate)         : no
    - icu                      : no
    - icu (lib64)              : no
    - message-compiler         : yes
    - compiler-supports-ssse3  : yes
    - compiler-supports-avx2   : yes
    - gcc visibility           : no
    - long double support      : yes
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
error: Name clash for '<pstage\lib>boost_system-vc120-mt-1_58.dll'
error:
error: Tried to build the target twice, with property sets having
error: these incompabile properties:
error:
error:     -  <warnings>all
error:     -  <architecture>x86 <warnings>on
error:
error: Please make sure to have consistent requirements for these
error: properties everywhere in your project, especially for install
error: targets.

What does it mean and how to resolve it?

Thanks

Britanybritches answered 7/12, 2014 at 12:18 Comment(0)
P
9

builds if I add --without-context --without-coroutine to b2 options

Polyanthus answered 11/1, 2015 at 9:29 Comment(0)
P
6

From the Boost 1.58 beta release notes:

Important Note

There is a bug with the build scripts; you have to specify the address-mode and architecture to b2. I used:

./b2 address-model=64 architecture=x86

to test this.

Adding these flags to the b2 command solves the problem without having to exclude the context and coroutine libraries (handy if, say, you actually use these libraries, like I do!).

Naturally, if you're building 32-bit libraries, you want to add address-model=32 instead.

Primer answered 4/4, 2015 at 9:36 Comment(1)
even with the parameters it failed to compile on 1.69Macnair
H
2

Did you get boost from git repository?

If so, I think the latest version available in git is broken. Today I tried to compile it too and if you would solve errors you mentioned, you will get another errors because of incomplete files in destination directories (boost ptr_container library isn't installed after compilation from source)

The solution was download latest boost version from their site (http://sourceforge.net/projects/boost/files/boost/1.57.0/). After that, compilation and installation works correctly

Hairless answered 7/12, 2014 at 20:56 Comment(2)
Yes I was trying to get git version with all the submodules. Will try stable this evening.Britanybritches
I did git co boost-1.56.0;, then build with the same error.Spurling
S
2

In my case I was using variant=release,debug command line argument, which was causing name collision.

I've added extra argument --layout=tagged and problem disappeared.

See also https://mcmap.net/q/1174472/-boost-libraries-debug-and-release-build-on-linux

Stygian answered 30/4, 2019 at 11:27 Comment(0)
O
1

Maybe you have two version of g++ available in $PATH. Try running where g++. If you see two g++ then remove one from $PATH. And then start over all the build process again. That worked for me and

Oleviaolfaction answered 7/8, 2018 at 12:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.