finally I figured out myself how to compile SAP::Rfc.
- use the HP ANSI CC (gcc should also work)
- export LD_PRELOAD=/usr/lib/libcl.2 (to avoid some linker errors)
Can't shl_load() a library containing Thread Local Storage: /usr/lib/libcl.2
- use RFCSDK 4.6C 32bit, since the 6.20 and 6.40 versions of RFCSDK did not work for me