adding -fPIC compiler option for building on SPARC, Solaris 11.4
Phil Thompson
phil at riverbankcomputing.com
Thu Nov 12 08:54:02 GMT 2020
On 12/11/2020 00:31, Nate Alderson wrote:
> Hello,
>
> I am attempting to build PyQt5-5.15.2.dev2010041344 on SPARC, Solaris
> 11.4
> with gcc 9.3.0 , but it fails linking:
>
> ....
> ld: fatal: relocation error: R_SPARC_M44: file
> moc_qpycore_event_handlers.o: symbol vtable for PyQtMonitor: invalid
> shared
> object relocation type: ABS44 code model unsupported
> ld: fatal: relocation error: R_SPARC_L44: file
> moc_qpycore_event_handlers.o: symbol vtable for PyQtMonitor: invalid
> shared
> object relocation type: ABS44 code model unsupported
> ld: fatal: relocation error: R_SPARC_H44: file
> moc_qpycore_event_handlers.o: symbol QHash<QObject*,
> QHashDummyValue>::deleteNode2(QHashData::Node*): invalid shared object
> relocation type: ABS44 code model unsupported
> ld: fatal: relocation error: R_SPARC_M44: file
> moc_qpycore_event_handlers.o: symbol QHash<QObject*,
> QHashDummyValue>::deleteNode2(QHashData::Node*): invalid shared object
> relocation type: ABS44 code model unsupported
> ld: fatal: relocation error: R_SPARC_L44: file
> moc_qpycore_event_handlers.o: symbol QHash<QObject*,
> QHashDummyValue>::deleteNode2(QHashData::Node*): invalid shared object
> relocation type: ABS44 code model unsupported
>
>
> Googling indicated I should add the -fPIC option to the g++ flags but I
> can't figure out how that works. I've tried:
> "python configure.py CXXFLAGS+=-fPIC" among other things but nothing
> seems
> to work. Any suggestions?
>
> I have manually added the flag to some Makefiles and that resolved the
> issue.
>
> Thanks,
> Nate
Try QMAKE_CXXFLAGS
Phil
More information about the PyQt
mailing list