Code Monkey home page Code Monkey logo

Comments (6)

kn007 avatar kn007 commented on June 6, 2024 6

temp fix:
change CMAKE_AR & CMAKE_RANLIB value from ngx_brotli/deps/brotli/out/CMakeFiles/3.27.7/CMakeCCompiler.cmake
ar to gcc-ar, ranlib to gcc-ranlib

ar & ranlib version 2.30-108.el8_5.1
gcc-ar & gcc-ranlib version 2.35-8.el8_5.6

> cmake --build . --config Release --target brotlienc                                                                                                                       ed738e8 [ed738e8] untracked
-- Build type is 'Release'
-- Compiler is not EMSCRIPTEN
-- Configuring done (0.0s)
-- Generating done (0.1s)
-- Build files have been written to: /data/src/ngx_brotli/deps/brotli/out
[  3%] Building C object CMakeFiles/brotlicommon.dir/c/common/constants.c.o
[  6%] Building C object CMakeFiles/brotlicommon.dir/c/common/context.c.o
[ 10%] Building C object CMakeFiles/brotlicommon.dir/c/common/dictionary.c.o
[ 13%] Building C object CMakeFiles/brotlicommon.dir/c/common/platform.c.o
[ 17%] Building C object CMakeFiles/brotlicommon.dir/c/common/shared_dictionary.c.o
[ 20%] Building C object CMakeFiles/brotlicommon.dir/c/common/transform.c.o
[ 24%] Linking C static library libbrotlicommon.a
[ 24%] Built target brotlicommon
[ 27%] Building C object CMakeFiles/brotlienc.dir/c/enc/backward_references.c.o
[ 31%] Building C object CMakeFiles/brotlienc.dir/c/enc/backward_references_hq.c.o
[ 34%] Building C object CMakeFiles/brotlienc.dir/c/enc/bit_cost.c.o
[ 37%] Building C object CMakeFiles/brotlienc.dir/c/enc/block_splitter.c.o
[ 41%] Building C object CMakeFiles/brotlienc.dir/c/enc/brotli_bit_stream.c.o
[ 44%] Building C object CMakeFiles/brotlienc.dir/c/enc/cluster.c.o
[ 48%] Building C object CMakeFiles/brotlienc.dir/c/enc/command.c.o
[ 51%] Building C object CMakeFiles/brotlienc.dir/c/enc/compound_dictionary.c.o
[ 55%] Building C object CMakeFiles/brotlienc.dir/c/enc/compress_fragment.c.o
[ 58%] Building C object CMakeFiles/brotlienc.dir/c/enc/compress_fragment_two_pass.c.o
[ 62%] Building C object CMakeFiles/brotlienc.dir/c/enc/dictionary_hash.c.o
[ 65%] Building C object CMakeFiles/brotlienc.dir/c/enc/encode.c.o
[ 68%] Building C object CMakeFiles/brotlienc.dir/c/enc/encoder_dict.c.o
[ 72%] Building C object CMakeFiles/brotlienc.dir/c/enc/entropy_encode.c.o
[ 75%] Building C object CMakeFiles/brotlienc.dir/c/enc/fast_log.c.o
[ 79%] Building C object CMakeFiles/brotlienc.dir/c/enc/histogram.c.o
[ 82%] Building C object CMakeFiles/brotlienc.dir/c/enc/literal_cost.c.o
[ 86%] Building C object CMakeFiles/brotlienc.dir/c/enc/memory.c.o
[ 89%] Building C object CMakeFiles/brotlienc.dir/c/enc/metablock.c.o
[ 93%] Building C object CMakeFiles/brotlienc.dir/c/enc/static_dict.c.o
[ 96%] Building C object CMakeFiles/brotlienc.dir/c/enc/utf8_util.c.o
[100%] Linking C static library libbrotlienc.a
[100%] Built target brotlienc

compile nginx with ngx_brotli pass.

I know this is an upstream question, but these projects belong to Google. So I won't close this issue

from ngx_brotli.

kn007 avatar kn007 commented on June 6, 2024 2

It seems that it will not be fixed.

from ngx_brotli.

FireMasterK avatar FireMasterK commented on June 6, 2024

There's an upstream issue at: google/brotli#1094

from ngx_brotli.

wyattoday avatar wyattoday commented on June 6, 2024

@FireMasterK

Yes, as I wrote in the readme. Better to link the actual source than to copy & paste it in a random issue or forum post. "Why?" you ask? So the canonical source can be referenced and updated when things inevitable change in the future.

This is a compiler issue. Don't use ancient compilers. If you're on Redhat (or a clone) use the devtoolset / gcc-toolset to use the latest compilers (while still targeting the system glibc).

In short, google it.

from ngx_brotli.

saytesnake avatar saytesnake commented on June 6, 2024

It seems that it will not be fixed.

Maybe it doesn't need fixing because it's really a compiler issue.

alpine:3.14 with gcc 10.3.1, compile pass without any errors, musl of course.

But Redhat 8 (or Rocky8 or AlmaLinux8) with gcc 8.5.0 or gcc 10.3.1 is compile failed, and I don't know why because I know nothing about C. 😅

Using gcc 11.2.1 will compile successfully.

dnf -y install gcc-toolset-11-gcc gcc-toolset-11-gcc-c++
source /opt/rh/gcc-toolset-11/enable

from ngx_brotli.

kn007 avatar kn007 commented on June 6, 2024

temp fix: change CMAKE_AR & CMAKE_RANLIB value from ngx_brotli/deps/brotli/out/CMakeFiles/3.27.7/CMakeCCompiler.cmake ar to gcc-ar, ranlib to gcc-ranlib

@saytesnake

from ngx_brotli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.