Statically link libpgbind.a?


I see that in PGI 6.2, libpgbind.a is provided, but I am unable to link it statically. No matter whether -Bstatic, or -Bstatic_pgi are specified in the link step, libpgbind is always linked dynamically.

Could you confirm if this is the case?


Our system has Suse 10.1 on it, so numa libraries are present, and get dynamically linked.

If libpgbind cannot be statically linked, then why is …6.2/lib/libpgbind.a available?

Hi Gina,

You can link libpgbind statically but 6.2 had it incorrectly placed in the dynamic section when linking with “-Bstatic_pgi”. This has been corrected in 7.0. However, libnuma must be linked dynamically.

You can work around this by adding the following line to your “.mypgf90rc”, “.mypgcpprc”, and “.mypgccrc” files in your “home” directory or “siterc” if you want the change to apply to everyone.


Alternatively, you can compile with “-v” (verbose), copy the link line, and move “-lpgbind” after “-Bstatic”.

Note that by linking libpgbind statically, your code will not run on systems that do not support NUMA.

Hope this helps,

Hi Mat,

Thank you for all your help. I will see if we can move to version 7.0… or implement your suggestion if we continue with 6.2.