PurpleI2P / i2pd

🛡 I2P: End-to-End encrypted and anonymous Internet
https://i2pd.website
BSD 3-Clause "New" or "Revised" License
3.27k stars 423 forks source link

AVX/AES for linux packaging #1602

Closed khumarahn closed 3 years ago

khumarahn commented 3 years ago

Hi!

I maintain i2pd for gentoo linux. I am not quite sure what I should do about AVX/AES. Can you clarify whether the package compiled on a machine with AVX/AES would work on a machine without? (Or the other way around?) Does i2pd now do the runtime detection of processor features?

This should not be a problem for gentoo most of the time because normally packages are compiled on the machine they are used (also with -march=native), but gentoo also supports distribution of binary packages, where this can be important.

I see that our friends from arch linux https://github.com/archlinux/svntogit-community/tree/packages/i2pd/trunk do not treat this in any special way. (And they are usually right.)

r4sas commented 3 years ago

Hi. Yes, now all detected at runtime correctly and extra options is added (sometimes on VMs instructions can be shown in CPU extensions, but really they are now available and vice versa) - cpuext block.

Little patch, added to archlinux and our trunk, is needed for correct support of old x86 processors. I'm not assumed that someone can try use such processors.

khumarahn commented 3 years ago

Thanks for the explanation! Can you point me to the patch? (It looks like arch folks do not apply anything related, or am I wrong?)

yhaenggi commented 3 years ago

I have plenty of old devices to test with, anything specific needed?

r4sas commented 3 years ago

It looks like arch folks do not apply anything related, or am I wrong?

Ah, I was wrong. Here was other issue from OpenWRT, see here: https://github.com/PurpleI2P/i2pd/issues/1600. So use that patch: https://github.com/openwrt/packages/pull/14192/files#diff-5b7978408b4816053594e5b0bdc6de16f1c3a874232ac8d54d13044da47b9866

@yhaenggi, apply patch from link above and try build/run.

yhaenggi commented 3 years ago

I can confirm auto-detection works on K6 (x86) and P4 (x86+x86_64).

r4sas commented 3 years ago

Added task on Arch bugtracker: https://bugs.archlinux.org/task/69092

r4sas commented 3 years ago

Fixed in Archlinux. Closing issue as answered.