Giter Site home page Giter Site logo

Comments (12)

GoGoOtaku avatar GoGoOtaku commented on August 23, 2024

_ZGVdN4v_log2 is part of glibc or to be more precise it it is part of glibc's vector math library (libmvec.so)
To me this looks like a linking error. The compiler did properly optimize the code to AVX2 but the linker didn't get the memo. I am not sure how this would happen tbh but I look into it. I will spin up an arch VM sometime next week and try it for myself.

As an aside:
Am I right to assume that you are using x86/amd64 and glibc?
glibc is the default so unless you explicitly chose another C library it should be glibc.
Can you run ldd on your readpe? (ldd $(which readpe) should do it) and tell me libmvec.so is in the list?
Is your processor older than 2014? If it was around there could you try lscpu and check if avx2 is in the flags section?

from readpe.

AkechiShiro avatar AkechiShiro commented on August 23, 2024

Yes I am using glibc and x86/amd64, glibc is the default, the only thing that could impact the glibc may be that I have nix installed as well and have paths for Nix in my PATH variable, not sure if Nix comes with it's own glibc

from readpe.

AkechiShiro avatar AkechiShiro commented on August 23, 2024

@GoGoOtaku ldd output :

	linux-vdso.so.1 (0x00007ffca2d70000)
	libpe.so.1 => /usr/lib/libpe.so.1 (0x00007f6a68edf000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f6a68cfd000)
	libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x00007f6a687ff000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f6a68f45000)

from readpe.

AkechiShiro avatar AkechiShiro commented on August 23, 2024

Processor is not older than 2014 :

Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         43 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  8
  On-line CPU(s) list:   0-7
Vendor ID:               AuthenticAMD
  Model name:            AMD Ryzen 7 PRO 3700U w/ Radeon Vega Mobile Gfx
    CPU family:          23
    Model:               24
    Thread(s) per core:  2
    Core(s) per socket:  4
    Socket(s):           1
    Stepping:            1
    Frequency boost:     enabled
    CPU(s) scaling MHz:  72%
    CPU max MHz:         2300.0000
    CPU min MHz:         1400.0000
    BogoMIPS:            4592.34

2017 Zen+ architecture on a T495 Thinkpad Lenovo latpop.
AVX2 is supported image

from readpe.

AkechiShiro avatar AkechiShiro commented on August 23, 2024

glibc version :

core/glibc 2.38-7 [0 B 47.33 MiB] [Installed]
    GNU C Library
core/lib32-glibc 2.38-7 [0 B 18.04 MiB] [Installed]
    GNU C Library (32-bit)

Glibc from Nix :
image

from readpe.

GoGoOtaku avatar GoGoOtaku commented on August 23, 2024

I tried building it on a fresh vm and it looks like the PKGBUILD is working.

@GoGoOtaku ldd output :

	linux-vdso.so.1 (0x00007ffca2d70000)
	libpe.so.1 => /usr/lib/libpe.so.1 (0x00007f6a68edf000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f6a68cfd000)
	libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x00007f6a687ff000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f6a68f45000)

Seems like it didn't link against libm and libmvec on your system.
libm has been explicitly added to libpes Makefile and unless you link statically you don't need to add libmvec (which is only needed due to optimizations by the compiler anyway).

I'm frankly stumped. Did you have an old libpe?
I think I am mostly stumped. This commit isn't in the latest version.
a4d2fb1

Now afaik this shouldn't cause what you experience. (I could still run it in my VM after all)
If you have a more aggressive dependency cleaning setup that might cause it.

from readpe.

AkechiShiro avatar AkechiShiro commented on August 23, 2024

I'm using mold as a linker, maybe that's the issue ? And not the default linker @GoGoOtaku

from readpe.

GoGoOtaku avatar GoGoOtaku commented on August 23, 2024

I could actually reproduce this error with mold. And it is indeed the missing -lm that the commit added. I don't know what the best workaround for you is for now but I will also probably release a new version in the not so distant future.

from readpe.

AkechiShiro avatar AkechiShiro commented on August 23, 2024

Thanks a lot for your help ! I will be waiting and test it once it's out

from readpe.

AkechiShiro avatar AkechiShiro commented on August 23, 2024

Hi again @GoGoOtaku could I be of any help towards the new release ? I would just like to help fix this issue, I can work on a PR/do some tests if needed.

from readpe.

GoGoOtaku avatar GoGoOtaku commented on August 23, 2024

I'm sorry for this taking so long.
I went to a hospital and even tho I took my laptop I didn't really have much time to maintain this repo.

I did make a new release now tho.

from readpe.

AkechiShiro avatar AkechiShiro commented on August 23, 2024

Thanks a lot for the new release !
No worries on the time taken, it's alright !

from readpe.

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.