Bug #27137 Documentation section 2.1.3 doesn't say to link with libmysys.a
Submitted: 14 Mar 2007 16:47 Modified: 9 May 2007 9:17
Reporter: Sela Lerer
Status: Closed
Category:Server: Docs Severity:S3 (Non-critical)
Version: OS:HP/UX (HP-UX 11v2)
Assigned to: Jon Stephens Target Version:
Tags: link, documentation, libmysys
Triage: D4 (Minor)

[14 Mar 2007 16: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 17: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 17:55] Hartmut Holzgraefe
http://dev.mysql.com/doc/ndbapi/en/getting-started-linker-options.html
[7 May 2007 17:55] Tomas Ulin
Hartmut,

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

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

BR,

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

#2 mysys needs to linked first, then mystring
[9 May 2007 8:22] Jon Stephens
Changed category to Documentation, reassigned to myself.
[9 May 2007 9: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.