conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
945 stars 1.71k forks source link

[meta] non utf-8 data in console output #7937

Open n-bes opened 2 years ago

n-bes commented 2 years ago

Theses packages contains output on build which can't decoded as utf-8

Package and Environment Details (include every applicable attribute)

FROM ubuntu
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update -y && \
    apt-get install -y \
        autoconf \
        build-essential \
        cmake \
        git \
        libgl1-mesa-dev \
        pkg-config \
        python3 \
        python3-pip && \
    pip3 install conan && \
    conan config install https://github.com/conan-io/hooks.git && \
    conan config set hooks.conan-center && \
    conan profile new default --detect && \
    conan profile update settings.compiler.libcxx=libstdc++11 default

WORKDIR /usr/local/src
COPY conan-center-index conan-center-index

Steps to reproduce (Include if Applicable)

docker run --rm conan_env:local \
    conan create \
    conan-center-index/recipes/{package_name}/{recipe_folder {package_name}/{version}@ \
    --build=missing

I wrapped output into base64 and save to file. It can be decoded with this little script:

import base64
import sys

if __name__ == '__main__':
    if len (sys.argv) != 2:
        exit(1)

    with open(sys.argv[1]) as file:
        try:
            raw_data = file.read()
            data = base64.b64decode(raw_data)
            data.decode('utf-8')
            print("File contains valid utf-8 data")
        except UnicodeDecodeError as e:
            print("Good part: ", data[:e.start].decode('utf-8'))
            print("-------------------------------------------")
            print("Broken part:", data[e.start:])

image

capnproto_0.7.0.txt capnproto_0.8.0.txt capnproto_0.9.1.txt m4.1.4.18.txt m4.1.4.19.txt taocpp-json.1.0.0-beta.10.txt taocpp-json.1.0.0-beta.11.txt taocpp-json.1.0.0-beta.12.txt taocpp-json.1.0.0-beta.13.txt zstr.1.0.4.txt

SSE4 commented 2 years ago

an interesting report. maybe it deserves a hook. I'll try to take a look, but not sure what's the actual problem of that. maybe it can fail some CI scripts?

Croydon commented 2 years ago

If those output comes from the upstream projects, then I don't understand what and why we should do anything about it 🤔

n-bes commented 2 years ago

@SSE4 i think, hook should allows only ascii symbols. @Croydon Usually , it came from test package part which can be fixed. For example:

https://github.com/conan-io/conan-center-index/blob/7956b030e0d7d7402aac97fe2471ee970b8458c9/recipes/m4/all/test_package/frozen.m4f#L8-L10

n-bes commented 2 years ago

I got the results for ascii:

arduinojson 6.18.0
aws-c-event-stream  0.2.7
aws-c-event-stream  0.1.5
aws-kvs-pic cci.20210812
bzip2   1.0.8
bzip2   1.0.6
c-ares  1.14.0
capnproto   0.7.0
capnproto   0.8.0
capnproto   0.9.1
cunit   2.1-3
eastl   3.17.03
eastl   3.17.06
fmt 8.0.0
fmt 8.0.1
freetype    2.11.0
freetype    2.10.4
freetype    2.10.2
freetype    2.10.1
freetype    2.10.0
icu 64.2
icu 65.1
icu 66.1
icu 67.1
icu 68.1
icu 68.2
icu 69.1
indicators  1.9
indicators  2.0
indicators  2.2
iqa cci.20181227
jemalloc    5.2.1
libattr 2.5.1
libbacktrace    cci.20210118
libgpg-error    1.36
libmodplug  0.8.9.0
libpcap 1.9.1
libpcap 1.10.0
libpcap 1.10.1
libraw  0.19.5
libwebsockets   4.2.0
libwebsockets   4.2.1
libwebsockets   4.3.0
m4  1.4.19
m4  1.4.18
mdns    1.0
mdns    1.1
mdns    1.2
mdns    1.3
mdns    1.4
mdns    1.4.1
nlopt   2.7.0
nlopt   2.6.2
nlopt   2.6.1
opus    1.3.1
packio  2.0.0
pthreadpool cci.20210218
quickfast   1.5
quickfast   cci.20170314
quickfix    1.15.1
resiprocate 1.12.0
rgbcx   cci.20200415
srt 1.4.2
srt 1.4.3
srt 1.4.4
stb cci.20200203
stb cci.20210713
taocpp-json 1.0.0-beta.13
taocpp-json 1.0.0-beta.12
taocpp-json 1.0.0-beta.11
taocpp-json 1.0.0-beta.10
tomlplusplus    2.0.0
tsil    1.45
unicorn 1.0.3
vcglib  2020.12
vorbis  1.3.6
vorbis  1.3.7
waf 2.0.19
xerces-c    3.2.2
xerces-c    3.2.3
xnnpack cci.20210310
xxhash  0.8.0
yyjson  0.3.0
zstr    1.0.4