[QGIS-Developer] ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: cannot allocate memory in static TLS block

Denis Rouzaud denis.rouzaud at gmail.com
Wed Aug 19 22:59:27 PDT 2020


Hi all,

While checking the PyQGIS build, I realized that there was an error when
running any PyQGIS code on Ubuntu Focal:
ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: cannot allocate memory
in static TLS block
https://github.com/qgis/pyqgis/runs/1006224259?check_suite_focus=true#step:3:228

I found this reference:
https://bugs.launchpad.net/ubuntu/+source/opencv/+bug/1890170?comments=all

Without really understanding the meaning of this, I gave a try at:

export LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6

Which seems to solve the problem.

>From a comment on Launchpad, this could be related to mysql-server being
compiled with faster TLS model (-ftls-model=initial-exec)
https://github.com/mysql/mysql-server/commit/735bd2a53834266c7256830c8d34672ea55fe17b

This could well explain why it was not raised very loudly before (Ubuntu
Focal + mssql server combination)

I am writing here to leave a reference to this.
But if anybody has any suggestions, additions or corrections to my
statements...please let me/us know.

Cheers,
Denis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200820/6c58c426/attachment.html>


More information about the QGIS-Developer mailing list