Compile HAProxy >2.1 with glibc <2.10 (USE_MY_ACCEPT4, USE_MY_SPLICE)

As per the changelog and the announcement here, the USE_MY_ACCEPT4 and USE_MY_SPLICE options have been dropped/removed.

If I had to compile on a machine with glibc before 2.10, how should I proceed to compile any HAProxy newer than 2.1?

Asking for a friend of course, hes an utter dingus who really thinks using SLES 10 SP2 makes any sense in 2023.

Disable those features, haproxy works fine without them:

make clean; make TARGET=linux-glibc CPU=generic USE_ACCEPT4= USE_LINUX_SPLICE=
lukas@dev:~/haproxy$ ./haproxy -vv | grep -e SPLICE -e ACCEPT4 -e HAProxy
HAProxy version 2.9-dev1-f7dcce-47 2023/07/17 -
1 Like

Right, I was able to compile HAProxy 2.8.1 with one more quirk: For glibc 2.4 with 2.6.16 kernel I had to undefine USE_CPU_AFFINITY as well as use the linux-glibc-legacy target (docs mention that 2.6.28 or higher is required) to be able to compile without errors:

make clean; make TARGET=linux-glibc-legacy USE_ACCEPT4= USE_LINUX_SPLICE= USE_CPU_AFFINITY=

Thank you for your quick input!

1 Like

Thats one for the history books though :wink:

1 Like