Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#61112 - [cmake] FindBoost with Boost thread generates wrong Boost_LIBRARIES (added -lpthread)

Attached to Project: Arch Linux
Opened by Major (majorx234) - Monday, 17 December 2018, 17:05 GMT
Last edited by Doug Newgard (Scimmia) - Monday, 17 December 2018, 17:10 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Problem appear with cmake-3.13.1-1 in old version cmake-3.12.4-1 everything works fine.

If I use boost in a cmake project and use FindBoost.cmake provided by this cmake package
with
find_package(Boost REQUIRED COMPONENTS thread)

I get output in cmake with : MESSAGE(${Boost_LIBRARIES})

Outputstring:

/usr/lib/libboost_thread.so-lpthread/usr/lib/libboost_chrono.so/usr/lib/libboost_system.so/usr/lib/libboost_date_time.so/usr/lib/libboost_atomic.so

so there is a "-lpthread" inside the string of ${Boost_LIBRARIES}
wich leads to errors when cmake generates make files and and gcc try to link against -l-lpthread

I have this problem on 2 pcs even with plain new installed Archlinux just with newest boost package
boost 1.68.0-2
boost-libs 1.68.0-2

in old version cmake-3.12.4-1
the Outputstring of MESSAGE(${Boost_LIBRARIES}) is:
/usr/lib/libboost_date_time.so/usr/lib/libboost_system.so/usr/lib/libboost_thread.so/usr/lib/libboost_chrono.so/usr/lib/libboost_atomic.so

as expected

Steps to reproduce:
small cmake project with
find_package(Boost REQUIRED COMPONENTS thread)
MESSAGE(${Boost_LIBRARIES})
This task depends upon

Closed by  Doug Newgard (Scimmia)
Monday, 17 December 2018, 17:10 GMT
Reason for closing:  Duplicate
Additional comments about closing:  Do NOT make duplicates under any circumstances

Loading...