Skip to content

Executable stacks in json-fortran #599

@susilehtola

Description

@susilehtola

Hi, I'm the Fedora maintainer of json-fortran.

Fedora's security criteria are always developing and nowadays executable stacks in code are forbidden.
json-fortran's builds started failing recently because of this:

/usr/bin/ld: error: /tmp/cc6PCWTr.ltrans0.ltrans.o: is triggering the generation of an executable stack (because it has an executable .note.GNU-stack section)
/usr/bin/ld: failed to set dynamic section sizes: file format not recognized
collect2: error: ld returned 1 exit status

I have faced a similar issue with some other Fortran code (OpenMolcas), where the issue was caused by internal procedures (functions within functions); moving the function outside of the function removed the executable stack and fixed the packaging issue. I am not sure what is the problem with json-fortran.

See the Fedora bug report for build log files
https://bugzilla.redhat.com/show_bug.cgi?id=2385086

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions