PySCeS / pysces

The official PySCeS project source code repository.
https://pysces.github.io
Other
34 stars 10 forks source link

[regression in 1.2.1] ../meson.build:1:0: ERROR: Compiler gfortran13 cannot compile programs. #100

Closed yurivict closed 3 months ago

yurivict commented 3 months ago

In 1.2.1 you changed from distools+cmake to pyproject+meson, and now it doesn't build:

* Getting build dependencies for wheel...
* Building wheel...
+ meson setup /usr/ports/biology/py-PySCeS/work-py39/pysces-1.2.1 /usr/ports/biology/py-PySCeS/work-py39/pysces-1.2.1/.mesonpy-su6ep7xi -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/usr/ports/biology/py-PySCeS/work-py39/pysces-1.2.1/.mesonpy-su6ep7xi/meson-python-native-file.ini
The Meson build system
Version: 1.4.0
Source dir: /usr/ports/biology/py-PySCeS/work-py39/pysces-1.2.1
Build dir: /usr/ports/biology/py-PySCeS/work-py39/pysces-1.2.1/.mesonpy-su6ep7xi
Build type: native build
Project name: pysces
Project version: 1.2.1

../meson.build:1:0: ERROR: Compiler gfortran13 cannot compile programs.

A full log can be found at /usr/ports/biology/py-PySCeS/work-py39/pysces-1.2.1/.mesonpy-su6ep7xi/meson-logs/meson-log.txt

ERROR Backend subprocess exited when trying to invoke build_wheel
*** Error code 1

The file /usr/ports/biology/py-PySCeS/work-py39/pysces-1.2.1/.mesonpy-su6ep7xi/meson-logs/meson-log.txt isn't present.

How to tell what is wrong?

The meson framework seems to be broken when used in Python. People experience similar problems, see here for example.

FreeBSD 14.0

yurivict commented 3 months ago

After substituting the gfortran13 command with a shell script and logging gfortran13's output the error is:

/usr/local/bin/ld: /tmp//ccx9gGbY.o: relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
yurivict commented 3 months ago

The reason was that "-shared" was in LDFLAGS.