Giter Site home page Giter Site logo

build fails on armv7-a about crc32c HOT 6 CLOSED

icrar avatar icrar commented on June 28, 2024
build fails on armv7-a

from crc32c.

Comments (6)

rtobar avatar rtobar commented on June 28, 2024

@stanislavlevin thanks for reporting this.

In principle this is what the platform setup option (which is not documented, our bad there) should be for, so you can specify a different platform from the one you are building in. See 42b8a15 for details. I think it should be possible to pass this option both via the command line (python setup.py build_ext --platform=...) or via a setup.cfg` file.

Please let me know if you can overcome your cross-compilation issue with this option. On my end I'll try to document the option a bit better for future users.

from crc32c.

stanislavlevin avatar stanislavlevin commented on June 28, 2024

This time the issue has been solved as:

--- a/crc32c/setup.py
+++ b/crc32c/setup.py
@@ -60,7 +60,7 @@ class _build_ext(build_ext):
         assert(len(self.distribution.ext_modules) == 1)
         platform = self.platform.lower()
         is_intel = platform in ['x86_64', 'amd64', 'i386', 'i686']
-        is_arm = platform in ['aarch64_be', 'aarch64', 'armv8b', 'armv8l']
+        is_arm = platform in ['aarch64_be', 'aarch64']

Next update time, I will try the explicit platform option for armh.
Thank you!

from crc32c.

rtobar avatar rtobar commented on June 28, 2024

@stanislavlevin please let me know if the platform flag works (it would prevent modifying the sources in order to compile the code), and please close this ticket if the problem can be avoided that way.

from crc32c.

stanislavlevin avatar stanislavlevin commented on June 28, 2024

ALTLinux is RPM based, so, for building packages we are using RPM specfile with corresponding RPM macros syntax. For example, there is common RPM macro to build/install python packages:

%build                                                                          
%python3_build_debug                                                            
                                                                                
%install                                                                        
%python3_install

which roughly invoke python3 setup.py build (not directly build_ext). Setuptools doesn't support passing down additional options for subsequent commans. So even if I pass --platform build fails:

+ /usr/bin/python3 setup.py build --debug --platform x86_64
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option --platform not recognized

Pretty sure, other RPM based distros have the same issue.

from crc32c.

rtobar avatar rtobar commented on June 28, 2024

@stanislavlevin is it an option to create a local setup.cfg before running the rest of the commands? You could write the setting there; i.e.:

[build_ext]
platform = ${TARGET_MACHINE_ARCH}

from crc32c.

rtobar avatar rtobar commented on June 28, 2024

Closing as directions were given on how to address the issue fundamentally, plus the original problem was circumvented anyway.

from crc32c.

Related Issues (18)

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.