Hello, There are 2 problems with HP-UX build (I use GNU gcc and native ld): 1. ld options '+b <libdir>' are passed without '-Wl,' prefix directly to gcc (not to ld):
gcc -shared -Wl,+h -Wl,rlm_acctlog-2.1.12.so -Wl,+nodefaultrpath -o .libs/rlm_acctlog-2.1.12.so .libs/rlm_acctlog.o +b /comptel/ilink/src/freeradius-server-2.1.12/src/lib/.libs:/comptel/ilink/xxxxxxxxxxxxxxxx32/lib /comptel/ilink/src/freeradius-server-2.1.12/src/lib/.libs/libfreeradius-radius.so -lnsl -lrt -lpthread -lc gcc: +b: No such file or directory gcc: /comptel/ilink/src/freeradius-server-2.1.12/src/lib/.libs:/comptel/ilink/xxxxxxxxxxxxxxxx32/lib: No such file or directory make[6]: *** [rlm_acctlog.la] Error 1
Probably, native ld is never invoked directly in FreeRADIUS build, so I've hacked ./configure script in this place:
if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=:
case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E'
# hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi
I replaced hardcode_libdir_flag_spec_ld='+b $libdir' with hardcode_libdir_flag_spec_ld='${wl}+b ${wl}$libdir' (quick and dirty fix), and this allowed me to continue: 2. raddb/Makefile uses one-argument form of 'ln -s', which is not present on HP-UX:
make[2]: Entering directory `/comptel/ilink/src/freeradius-server-2.1.12/raddb' Usage: ln [-f] [-i] [-s] f1 f2 ln [-f] [-i] [-s] f1 ... fn d1 make[2]: *** [all] Error 2 make[2]: Leaving directory `/comptel/ilink/src/freeradius-server-2.1.12/raddb'
I've fixed it this way: sed -i.orig 's/\(\<ln -s [^ ]*\);/\1 .;/' raddb/Makefile Regarding the 1st problem, I think the proper fix should instead ensure that hardcode_libdir_flag_spec is passed to gcc while hardcode_libdir_flag_spec_ld is passed to native ld only. These flags are not used in Makefiles, rules.mak or Make.inc, they are defined and used in ./configure - generated libtool script. I'll see if I can make a proper fix there. -- With best regards, xrgtn