On Wed, Mar 8, 2023 at 7:48 AM Stefan Kania stefan@kania-online.de wrote:
I just installed a fresh 2.5 server with the symas-packages and debian 11. I can start the service, but as soon as I try to authenticate for example with:
ldapsearch -x -D cn=admin,dc=example,dc=net -W
the server crashes, I put the loglevel to "any" and I saw
kernel: traps: slapd[18020] trap invalid opcode ip:7febaf26a415 sp:7fc3ad4b69e0 error:0 in libargon2.so.1[7febaf266000+5000]
Everytime I try to authenitcate. All packages are up to date.
any idea
Here's the problem. I'm not sure how I missed it. https://git.symas.net/symas-public/libargon2/-/blob/master/Makefile#L51 :
OPTTARGET ?= native OPTTEST := $(shell $(CC) -Iinclude -Isrc -march=$(OPTTARGET) src/opt.c -c \ -o /dev/null 2>/dev/null; echo $$?)
'OPTTARGET ?= native' says to set OPTTARGET to native if it is not set in the environment. Eventually it shows up on the GCC command line as '-march=native'.
-march=native enables ISA's on the build machine. Those ISAs may not be present on the host the program is running on, like your Xeon's.
You have to rebuild the library. If you build on the server with the Xeon's, then _you_ can use -march=native. However, if the library is being built on another machine, then you have to use -march=x86-64 if you want to distribute the binary.
-march=x86-64 targets the base amd64 machine. You can build it and it will run on all amd64 machines.
You should probably file a bug report against symas-libargon for doing that to you :)
Jeff