Compiling Samba-3.6.4/source3, there is a point when script configure tries to guess a method to get a ld-warning for unresolved externs. Indeed, option -error_unresolved does cause an error message, because it means option -e with parameter 'rror_unresolved', meaning: the entry point is function rror_unresolved. The flag in question would be -bernotok.
Or, via gcc: -Wl,-bernotok
according to http://pic.dhe.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.cmds%2Fdoc%2Faixcmds3%2Fld.htm "-z defs" should do the same as -ernotok on AIX ld. Can you attach the config.log from that machine? (Also adding such a AIX machine to the build farm would be very welcome, this help fixing things like this and keep up good AIX support in samba)
"-z defs" should do the same as -ernotok on AIX ld True, but only in -bsvr4 mode config.log: configure:19615: checking if -Wl,-z,defs works configure:19629: gcc -o conftest -O -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/tevent -I./librpc -I./.. -I./../lib/popt -Wl,-z,defs -L./bin conftest.c >&5 ld: 0706-005 Cannot find or open file: defs ld:open(): No such file or directory collect2: ld returned 255 exit status configure:19629: $? = 1 ... configure:19635: result: no configure:19615: checking if -error_unresolved works configure:19629: gcc -o conftest -O -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/tevent -I./librpc -I./.. -I./../lib/popt -error_unresolved -L./bin conftest.c >&5 ld: 0711-327 WARNING: Entry point not found: rror_unresolved ld: 0711-244 ERROR: No csects or exported symbols have been saved. collect2: ld returned 8 exit status configure:19629: $? = 1 ... configure:19635: result: no configure:19615: checking if -Wl,-error_unresolved works configure:19629: gcc -o conftest -O -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/tevent -I./librpc -I./.. -I./../lib/popt -Wl,-error_unresolved -L./bin conftest.c >&5 ld: 0711-327 WARNING: Entry point not found: rror_unresolved ld: 0711-244 ERROR: No csects or exported symbols have been saved. collect2: ld returned 8 exit status configure:19629: $? = 1 ... configure:19635: result: no Well, seeing this, I don't really see why does it use option -error_unresolved when configure correctly detects it doesn't work.
I also can't see how the configure run of this config.log added -error_unresolved to any compile flags. Can you attach the complete config.log and the resulting Makefile, please?
Okay, it was me: I happened to define LDFLAGS as '-Wl,-brtl' to enable standalone shared libs work; this also changed the result of -error_unresolved with -brtl: ld: 0711-327 WARNING: Entry point not found: rror_unresolved without it: ld: 0711-327 WARNING: Entry point not found: rror_unresolved ld: 0711-244 ERROR: No csects or exported symbols have been saved. So I think we might even close this as a local problem.
yes, looks like a local problem. It should be working if you set the LDFLAGS *before* running configure though because preset LDFLAGS are also being used in the configure tests.
True, the problem still exists in my special case (I _have_to_ use option -brtl), but it's not something that couldn't be saved with a sed-replace. Thank you for your help.