Bug #27137 Documentation section 2.1.3 doesn't say to link with libmysys.a
Submitted: 14 Mar 2007 15:47 Modified: 9 May 2007 7:17
Reporter: Sela Lerer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:HP/UX (HP-UX 11v2)
Assigned to: Jon Stephens CPU Architecture:Any
Tags: documentation, libmysys, link

[14 Mar 2007 15:47] Sela Lerer
Description:
When linking with libndbclient.a on HP-UX the linker could not locate base64_decode() which is in libmysys.a, so it is required to add -lmysys to the compiler command line.

NOTE:
Another problem we encountered and I'm not sure what the reason is, is that the linker did not recognized any symbols from libndbclient.a. We solved that by adding to aCC the flag -Wl,Fl to make the linker forceload all object files from archives.

How to repeat:
Read the NDBAPI documentation and try to compile and NDBAPI using client program on HP-UX.

Suggested fix:
Change documentation (preferably allow users to add comments like in the regular MySQL documentation).
[3 May 2007 15:54] Hartmut Holzgraefe
http://dev.mysql.com/doc/ndbapi/en/getting-started-linker-options.html

only has "-lmystrings", but in my code generator i'm using "-lmysys -lmystring"
(and yes, the library order is important on some platforms)
[3 May 2007 15:55] Hartmut Holzgraefe
http://dev.mysql.com/doc/ndbapi/en/getting-started-linker-options.html
[7 May 2007 15:55] Tomas Ulin
Hartmut,

what exactly needs documenting?  Such that Jon can do it...

T
[7 May 2007 15:55] Tomas Ulin
I'll set to documenting, so it comes to Jon's attention.

BR,

T
[7 May 2007 16:21] Hartmut Holzgraefe
#1 -lmysys is needed in addition to -lmystring

#2 mysys needs to linked first, then mystring
[9 May 2007 6:22] Jon Stephens
Changed category to Documentation, reassigned to myself.
[9 May 2007 7:17] Jon Stephens
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

Updated docs per Hartmut's suggestions.

Note to submitter: The system we're using presently for user comments only allows comments to be made on the User Manuals. In future we do hope to expand this in order to cover *all* online MySQL docs, but there is no definite ETA for that at this time. Thanks for the suggestion.