Re: configure + make fails on AIX due to missing -lpthread

Thien-Thi Nguyen <[email protected]> Thu, 22 Jan 2015 19:33:50 +0100
Newsgroups gmane.comp.version-control.rcs.bugs
Message-ID <[email protected]>
() Michael Felt <[email protected]>
() Thu, 22 Jan 2015 17:05:18 +0100

   After the following:
    ./configure --prefix=/opt --sysconfdir=/var/rcs/etc
   --sharedstatedir=/var/rcs/com --localstatedir=/var/rcs
   --mandir=/usr/share/man --infodir=/opt/share/info/rcs

   make proceeds normally until the programs need to 'link' -
   ident is the first failure:

Thanks for reporting this.  First questions: Was this method
used for previous versions of GNU RCS?  If not, how were
previous versions built?

   To succeed, copy/paste then add -lpthread and the command
   succeeds

   [...]

   cc -qlanglvl=extc89 -qlanglvl=extc99 -qlanglvl=extc99 -g -o ident
   ident.o libparts.a -L../lib -lgnu
   ld: 0711-317 ERROR: Undefined symbol: .pthread_setspecific
   ld: 0711-317 ERROR: Undefined symbol: .pthread_getspecific
   ld: 0711-317 ERROR: Undefined symbol: .pthread_once
   ld: 0711-317 ERROR: Undefined symbol: .pthread_key_create
   ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
   information.

I wonder where those .pthread_* symbols are being referenced.
RCS is definitely single-threaded.  Maybe something from gnulib?

   Just let me know what else you would like to receive.

Could you please re-run w/o "-lpthread", using those options
indicated in the error message "to obtain more information"?
Also, maybe nm(1) can tell where those symbols are referenced.
E.g., i'd be interested in seeing the output of:

 nm lib/*.o src/*.o src/libparts.a

(I presume AIX nm(1) works similarly to GNU/Linux nm(1); feel
free to substitute a more appropriate command as you see fit.)

Lastly, could you please also attach config.status and
lib/config.h (all from the original build, w/o "-lpthread")?

-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil
signature.asc (application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlTBQpEACgkQZwMiJEyAdQLDTgCg5DAzrVvlHKEhx4Yhnovx8OQP
9IYAn1XjN7TNCH11uHNHBayExWwD08nW
=xSTq
-----END PGP SIGNATURE-----