Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add boost 1.80.0 #627

Merged
merged 1 commit into from
Oct 17, 2022
Merged

add boost 1.80.0 #627

merged 1 commit into from
Oct 17, 2022

Conversation

tnixeu
Copy link

@tnixeu tnixeu commented Oct 14, 2022

  • I've followed this guide
    step by step carefully. Yes

I used the 7z instead of the tar.bz2 because it almost 20MB smaller and cmake supports it as well.

@NeroBurner NeroBurner added the package:update Add a new version to an existing package label Oct 14, 2022
Copy link

@NeroBurner NeroBurner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

17MB less for this release

If 7z is supported by CMake without a hitch the nearly 20MB less are very welcome

$ du -h boost_1_80_0.*
94M     boost_1_80_0.7z
111M    boost_1_80_0.tar.bz2

@NeroBurner NeroBurner merged commit 0f67f50 into cpp-pm:master Oct 17, 2022
@NeroBurner
Copy link

Thanks for the update and space improvements

@NeroBurner
Copy link

@hjmallon
Copy link

Unfortunately extracting 7z appears to fail on our CI machines (linux x86_64, cmake 3.24.3). I haven't investigated why yet.

CMake Error: Problem with archive_read_next_header(): Pathname cannot be converted from UTF-16LE to current locale.
CMake Error: Problem extracting tar: /root/.hunter/_Base/Download/Boost/1.80.0/5463e53/boost_1_80_0.7z

@NeroBurner
Copy link

TL;DR: set the LANG="C.UTF-8" env-variable in the Dockerfile (or any other way)

# set LANG to fix extracting of 7z Boost 1.80 archive by CMake during Hunter build
ENV LANG "C.UTF-8"

Long version:
We had the same issue in our docker images.

All hunter Boost builds with Boost version 1.80.0 fail because this version switched to use the 7z archive to save space.

This works well on cpp-pm/hunter and locally when running inside my Desktop machine. But when running the same command inside our docker container the following error shows:

-- extracting... [tar xfz]
CMake Error: Problem with archive_read_next_header(): Pathname cannot be converted from UTF-16LE to current locale.
CMake Error: Problem extracting tar: /builds/hunter/hunter/_Base/Download/Boost/1.80.0/5463e53/boost_1_80_0.7z

The found workaround/fix is to set the LANG environment variable to C.UTF-8

The current locale command inside the docker container returns the following:

$ locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

When setting the LANG variable it looks as follows (and then CMake extract works again)

$ export LANG="C.UTF-8"
$ locale
LANG=C.UTF-8
LANGUAGE=
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=

For a permanent fix the following lines are added to the Dockerfile:

# set LANG to fix extracting of 7z Boost 1.80 archive by CMake during Hunter build
ENV LANG "C.UTF-8"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:update Add a new version to an existing package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants