question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Response file needed for Fortran project on Linux

See original GitHub issue

Inspired by #7212.

A project with lots of Fortran source:

#!/bin/sh
set -eu
work_dir=meson_toolong
build_dir=b
n=12000
mkdir -p ${work_dir}
cd ${work_dir}
rm -rf ${build_dir}
{
  echo "project('toolong', 'fortran')"
  echo "srcs = ["
} > meson.build
for i in $(seq -w ${n})
do
  src_file=f${i}.f90
  {
    echo "Subroutine s${i}"
    echo "End"
  } > "${src_file}"
  echo " '${src_file}'," >> meson.build
done
{
  echo "]"
  echo "library('toolong', srcs)"
} >> meson.build
meson . ${build_dir}
cd ${build_dir}
ninja -v

gives

The Meson build system
Version: 0.59.0
Source dir: /home/mat_cross/documents/Meson/resp/meson_toolong
Build dir: /home/mat_cross/documents/Meson/resp/meson_toolong/b
Build type: native build
Project name: toolong
Project version: undefined
Fortran compiler for the host machine: gfortran (gcc 11.2.1 "GNU Fortran (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1)")
Fortran linker for the host machine: gfortran ld.bfd 2.35.2-4
Host machine cpu family: x86_64
Host machine cpu: x86_64
Build targets in project: 1

Found ninja-1.10.2 at /usr/bin/ninja
ninja: fatal: posix_spawn: Argument list too long

(Python is 3.9.6).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dcbakercommented, Aug 17, 2021

For me it falls over trying to do the depscan step, which is a python program we maintain. But it does generate a rule for usin ghte fortran linker with a response file, so this actually an issue with the depscanner

0reactions
matcrosscommented, Aug 18, 2021

Sorry, my fault. It’s looking good from your submit/depscan-file-limit branch. Thanks again for the fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use Response Files - Intel
Developer guide and reference for users of the Intel® Fortran Compiler Classic and Intel® Fortran Compiler.
Read more >
Intel® Fortran Compiler for Linux* Systems User's Guide
To compile programs with this compiler, you need to meet the ... Response files to use the options and files for individual projects....
Read more >
Intel® Fortran Compiler Documentation
Like configuration files, response files are used to: Decrease the time you spend entering command-line options. Ensure consistency of often used commands.
Read more >
INTEL® FORTRAN COMPILER User's Guide - Parallel.ru
If you have varying option requirements for different projects, see Response. Files. These files can be added to the directory where Intel® Fortran...
Read more >
Intel® Fortran Compiler User and Reference Guides
Chapter 9: Using Configuration Files and Response Files. 4. Intel® Fortran Compiler User and ... File Sharing on Linux* OS and Mac OS*...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found