Git Product home page Git Product logo

Comments (10)

Legrandin avatar Legrandin commented on May 27, 2024 1

Yes, when debug is active, those error messages are expected (as part of the trial-and-error to autodetect).

This bug is fixed in v3.20.0.

from pycryptodome.

Legrandin avatar Legrandin commented on May 27, 2024

Thanks for the flagging. Can you suggest a way to replicate this problem without having to fully compile from scratch the most recent gcc14 candidate (e.g., some Docker image)?

from pycryptodome.

kostadinsh avatar kostadinsh commented on May 27, 2024

I don't think there are docker images for gcc itself, but you could use a gentoo image, and build gcc-14 with portage.

from pycryptodome.

thesamesam avatar thesamesam commented on May 27, 2024

Let me see. I think there might be something I can arrange. I will get back to you.

from pycryptodome.

thesamesam avatar thesamesam commented on May 27, 2024

OK, try https://jwakely.github.io/pkg-gcc-latest/. They're unofficial builds from one of the GCC maintainers.

The example Dockerfile on that page works for me:

FROM ubuntu:latest
RUN apt-get update -y
RUN apt-get install -y build-essential wget
RUN wget --quiet https://kayari.org/gcc-latest/gcc-latest.deb
RUN dpkg -i gcc-latest.deb
RUN /opt/gcc-latest/bin/gcc --version

with:

docker build -t gcc gcc/
docker run -it gcc

from pycryptodome.

Legrandin avatar Legrandin commented on May 27, 2024

Thanks @thesamesam!
Unfortunately, with that GCC14 version and OS, I can't reproduce the problem (as in, the library builds fine with export CFLAGS="-O2 -lto".

@kostadinsh if this is still a problem for you, can you also retry by setting PYCRYPTODOME_DEBUG=1, then you get a complete dump of all the autodetect logic.

from pycryptodome.

kostadinsh avatar kostadinsh commented on May 27, 2024

These appeard with the env variable set:

build/test1.c:3:6: error: #error Not clang
    3 |     #error Not clang
      |      ^~~~~
build/test1.c:2:14: fatal error: intrin.h: No such file or directory
    2 |     #include <intrin.h>
      |              ^~~~~~~~~~
compilation terminated.
build/test1.c:2:14: fatal error: intrin.h: No such file or directory
    2 |     #include <intrin.h>
      |              ^~~~~~~~~~
compilation terminated.
In file included from build/test1.c:2:
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/wmmintrin.h: In function ‘f’:
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/wmmintrin.h:103:1: error: inlining failed in call to ‘always_inline’ ‘_mm_clmulepi64_si128’: target specific option mismatch
  103 | _mm_clmulepi64_si128 (__m128i __X, __m128i __Y, const int __I)
      | ^~~~~~~~~~~~~~~~~~~~
build/test1.c:6:16: note: called from here
    6 |         return _mm_clmulepi64_si128(x, y, 0x00);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

complete build log

from pycryptodome.

Legrandin avatar Legrandin commented on May 27, 2024

I think I found the issue, and pushed a fix to master (b408368). Please try if you have a chance.

from pycryptodome.

kostadinsh avatar kostadinsh commented on May 27, 2024

A few new things popped up with the debug variable, but the build finishes fine.

build/test1.c:3:6: error: #error Not clang
    3 |     #error Not clang
      |      ^~~~~
build/test1.c:2:14: fatal error: intrin.h: No such file or directory
    2 |     #include <intrin.h>
      |              ^~~~~~~~~~
compilation terminated.
build/test1.c:2:14: fatal error: intrin.h: No such file or directory
    2 |     #include <intrin.h>
      |              ^~~~~~~~~~
compilation terminated.
In function ‘f’,
    inlined from ‘main’ at build/test1.c:11:13:
build/test1.c:5:16: error: ‘__builtin_ia32_aesenc128’ needs isa option -mvaes -mavx512vl -maes -msse2
    5 |         return _mm_aesenc_si128(x, y);
      |                ^
lto-wrapper: fatal error: /usr/bin/x86_64-pc-linux-gnu-gcc returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
In file included from build/test1.c:2:
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/wmmintrin.h: In function ‘f’:
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/wmmintrin.h:103:1: error: inlining failed in call to ‘always_inline’ ‘_mm_clmulepi64_si128’: target specific option mismatch
  103 | _mm_clmulepi64_si128 (__m128i __X, __m128i __Y, const int __I)
      | ^~~~~~~~~~~~~~~~~~~~
build/test1.c:6:16: note: called from here
    6 |         return _mm_clmulepi64_si128(x, y, 0x00);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

complete build log

from pycryptodome.

thesamesam avatar thesamesam commented on May 27, 2024

Just want to say thank you for addressing this quickly and the assistance. It helps a lot when testing many packages with upcoming releases.

from pycryptodome.

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.