#1597 closed defect (wontfix)
Python NG bindings do not inherit global compiler settings
Reported by: | dron | Owned by: | hobu |
---|---|---|---|
Priority: | normal | Milestone: | 1.5.0 |
Component: | PythonBindings | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | warmerdam |
Description
Python bindings should inherit compiler settings from the main configuration file (GDALmake.opt on Unix). When I am changing compiler via standard configure options Python modules should be built with the same compiler, e.g., if I do
$ CC=gcc-2.95 CXX=gcc-2.95 ./configure $ make
GDAL library will be built using specified gcc-2.95 compiler, but Python bindings will be built with gcc, which can be a different one resulting in binary incompatibility.
Change History (4)
comment:1 by , 17 years ago
Cc: | added |
---|---|
Owner: | changed from | to
comment:2 by , 17 years ago
Andrey,
Yes, this is contrary to how distutils/setuptools works. These Python build mechanisms bend over backwards to build extensions with the version of the compiler that built Python itself. Distutils has some private classes that monkey with the compiler, and could maybe be made to use the compiler given from a user instead of what it thinks Python's compiler was. I imagine this kind of monkey patching would be brittle though.
I have recently fixed GDALColorTable to use the C API (#1578), and I don't think there are any more SWIG stuff that use C++ linkage. I don't know if that is related to your issue, but I think it would clear up any linkage issues between GDAL built with 2.95 and Python built with 3.4.3, for example. Unless I'm totally wrong, of course :)
Howard
comment:3 by , 17 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:4 by , 17 years ago
It there are no more C++ linkage in the bindings it is fine with me. C++ incompatibility was the actual problem here.
Best regards, Andrey
Andrey,
I think this is contrary to how python building with setuptools works, but I'll turn this over to Howard to discuss with you.