GithubHelp home page GithubHelp logo

32-bit x86 build failure with 1.5.6 about zstd HOT 3 CLOSED

ms178 avatar ms178 commented on May 3, 2024
32-bit x86 build failure with 1.5.6

from zstd.

Comments (3)

felixhandte avatar felixhandte commented on May 3, 2024 2

Zstd includes an optimized assembly Huffman decoder on x86_64, so building zstd not only invokes a C compiler (which you are telling to build in 32-bit mode) but also invokes an assembler (which you aren't).

I can repro your issue with your invocation, and can confirm it's fixed if you instead:

export CFLAGS="-m32"
export CXXFLAGS="-m32"
export ASMFLAGS="-m32"

It's curious that you say this worked in 1.5.5, since the asm decoder has existed for a while and I'm not aware of anything having changed here between those releases.

from zstd.

terrelln avatar terrelln commented on May 3, 2024

Looks like the repro command, taken from the PKGBUILD.txt file is:

export CC="clang -m32"
export CXX="clang++ -m32"

cmake -S build/cmake -B build -G Ninja \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_C_STANDARD=23 \
    -DCMAKE_CXX_STANDARD=23 \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=/usr/lib32 \
    -DZSTD_ZLIB_SUPPORT=ON \
    -DZSTD_LZMA_SUPPORT=ON \
    -DZSTD_LZ4_SUPPORT=ON \
    -DZSTD_BUILD_CONTRIB=ON \
    -DZSTD_BUILD_STATIC=OFF \
    -DZSTD_BUILD_TESTS=OFF \
    -DZSTD_PROGRAMS_LINK_SHARED=ON
cmake --build build

Its strange because we have 32-bit builds in our CI that are working. I'm traveling and don't have easy access to an intel machine that can do a 32-bit build. But I'll see if someone else can repro.

from zstd.

ms178 avatar ms178 commented on May 3, 2024

Thanks, Felix! Indeed, that fixes the observed failure. It is still puzzling why I didn't hit the same issue on 1.5.5 earlier. CachyOS upstream doesn't seem to hit this either, according to their PKGBUILD at https://github.com/CachyOS/CachyOS-PKGBUILDS/blob/master/zstd/lib32-zstd/PKGBUILD, they do not specify export ASMFLAGS="-m32" there but use GCC to compile the package.

from zstd.

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.