Forum: CFEngine Help Subject: Re: Fwd:CFEngine Help: Compile tokyocabinet AIX 7.1 Author: raymondcox Link to topic: https://cfengine.com/forum/read.php?3,25774,25803#msg-25803
I have been struggling with the same issues on AIX 5.3 and 6.1 with gcc 4.2.0 and this is how I managed to work around the tokyocabinet issues: The errors that the linker is returning relate to some kind of crypt stuff: ld: 0711-317 ERROR: Undefined symbol: encrypted_pw_passlen ld: 0711-317 ERROR: Undefined symbol: getpass_auto ld: 0711-317 ERROR: Undefined symbol: crypt_r ld: 0711-317 ERROR: Undefined symbol: max_history_size ld: 0711-317 ERROR: Undefined symbol: max_pw_passlen ld: 0711-317 ERROR: Undefined symbol: .main There are a couple of postings out there that suggest creating a linker script to resolve the issues related to crypt: Create the following file in /tmp called crypt.exp: #! __crypt_r __setkey_r __encrypt_r Add the following to your LDFLAGS: -lc -lcrypt -ltli -wl,-brtl,-bI:/tmp/crypt.exp My LDFLAGS is configured as such: LDFLAGS=-lc -lcrypt -ltli -L/usr/local/lib -wl,-brtl,-bI:/tmp/crypt.exp -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000 -Wl,-bnoquiet I still get the duplicate symbol warnings, however the errors are now gone. I am able to run make and make check successfully. I am still unable to compile CFEngine 3.3, the configure script is not finding tokyocabinet, but I feel pretty confident that I have a good tolkycabinet build. If I get that last part fixed I will post that as well. The two postings that I used for this are: ld-undefined-symbol-__crypt_r-imagemagick-172766 and Building static AIX subversion client _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine