Giter VIP home page Giter VIP logo

Comments (4)

picca avatar picca commented on August 30, 2024

after instrumentation of the code on amd64

 data = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 44369, 214, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
compressed = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 128, 80, 173, 0, 0, 128, 0, 128, 133, 83, 255, 255, 128, 43, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
uncompressed = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 44369, 214, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

on arm64

data=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 44369, 214, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
compressed = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 128, 80, 173, 0, 0, 128, 0, 128, 133, 83, 255, 255, 128, 43, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
uncompressed = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 129, 129, 257, 337, 510, 510, 510, 638, 638, 766, 899, 982, 1237, 1492, 1620, 1663, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918]

So it seems that the problem is located in the uncompress part of the code.

from dxtbx.

picca avatar picca commented on August 30, 2024

Looking at the cbf_decompress code it seems that char is used during the decompression.
but char is signed on amd64 and unsigned on the other architectures.

https://wiki.debian.org/ArchitectureSpecificsMemo#arm64

    if (c != -0x80) {

the compiled line is this one

g++ -o dxtbx/src/dxtbx/boost_python/compression.o -c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/hdf5/serial -std=c++11 -pthread -DBOOST_PYTHON_MAX_BASES=2 -fPIC -fno-strict-aliasing -Wall -Wno-sign-compare -Wno-unknown-pragmas -Wno-parentheses -Winit-self -Wno-unused-local-typedefs -Werror=vla -g -O0 -fno-inline -DBOOST_ALL_NO_LIB -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DBUILD_CBF -I/<<PKGBUILDDIR>> -I/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build_/annlib_adaptbx/include -I/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/base/include -I/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build_/include -I/usr/include -I/<<PKGBUILDDIR>>/dxtbx/src -I/usr/include/cbflib -I/<<PKGBUILDDIR>>/cbflib_adaptbx -I/usr/include/python3.10 -I/usr/include/hdf5/serial /<<PKGBUILDDIR>>/dxtbx/src/dxtbx/boost_python/compression.cc

this line contain -Wno-sign-compare which hide this issue. It would be great to remove this.

from dxtbx.

picca avatar picca commented on August 30, 2024

This no-sign-compare option comes from libtbx/SConscript

def gcc_common_warn_options():
  result = [
    "-Wall",
    "-Wno-sign-compare",
    "-Wno-unknown-pragmas",
    "-Wno-parentheses"
    ]

from dxtbx.

picca avatar picca commented on August 30, 2024

Hello,, applying this patch [1] seems to fix this issue [2], nevertheless hiding the sign / non-sign warning is a bad idea.
you can find the build log without this hyding here [3]

Cheers

[1] https://salsa.debian.org/science-team/cctbx/-/raw/master/debian/patches/0017-dxtbx-fix-for-unsigned-char-arch.patch
[2] https://ci.debian.net/data/autopkgtest/unstable/arm64/c/cctbx/26314394/log.gz
[3] https://buildd.debian.org/status/fetch.php?pkg=cctbx&arch=arm64&ver=2022.8%2Bds2%2B%7E3.11.1%2Bds1-2&stamp=1663768004&raw=0

from dxtbx.

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.