Export to GitHub

pwauth - issue #3

Undefined symbol: .flock in AIX


Posted on Jan 20, 2011 by Grumpy Bird

What steps will reproduce the problem? 1. #define SHADOW_AIX in config.h 2. compile

What is the expected output? What do you see instead?

gcc -o pwauth -g main.o auth_aix.o auth_bsd.o auth_hpux.o auth_mdw.o auth_openbsd.o auth_pam.o auth_sun.o fail_log.o lastlog.o nologin.o snooze.o -lcrypt ld: 0711-317 ERROR: Undefined symbol: .flock ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. collect2: ld returned 8 exit status make: The error code from the last command is 1.

What version of the product are you using? On what operating system? pwauth-2.3.8 AIX 6100-06-03-1048

Please provide any additional information below. Exactly the same error in previous AIX versions as 6100-05-04-1048 or 5300-07-02-0806.

Comment #1

Posted on Mar 2, 2011 by Grumpy Wombat

Make sure the Makefile contains: LIB= -lcrypt -lbsd instead of LIB= -lcrypt

Found this hint on http://bugs.python.org/issue4026

Comment #2

Posted on Apr 1, 2011 by Grumpy Bird

Thank you gwachter. It was solved by making the change you suggested.

Comment #3

Posted on Oct 5, 2011 by Happy Wombat

Probably I should convert this to use fcntl() instead of flock() which is a POSIX standard and probably more portable. Solaris has bigger problems with it than AIX.

Comment #4

Posted on Oct 6, 2011 by Happy Wombat

Version 2.3.10 now uses fcntl(). It should now build on AIX even without the -lbsd compatibility library.

Status: Fixed

Labels:
Type-Defect Priority-Medium