Skip to content

Build failure when passing CFLAGS with LFortran #387

Closed

Description

@bonachea

Passing arbitrary CFLAGS to install.sh with FC=lfortran can lead to a build-time failure.

Demonstration:

env CFLAGS=-g CXXFLAGS=-g FC=lfortran ./install.sh 
...
clang: error: unknown argument: '-g-I/usr/local/pkg/lfortran/0.68.0/bin/../include/lfortran'

A LFortran-specific defect in the installer incorrectly appends values to CFLAGS without a space separator, leading to incorrectly concatenated C argument.

Temporary workaround is to append an extra space to the value of CFLAGS, eg CFLAGS="-g "

Activity

  1. self-assigned this
    on Nov 3, 2026
  2. added
    bug
    on Nov 3, 2026
  3. added 2 commits that reference this issue on Nov 18, 2026
    b79a042
    c5e3643
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugbuild/install scripts

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions