Skip to content

[Bug]: long dependency paths can break compiler driver #26261

Closed
@arezaii

Description

Summary of Problem

If chapel dependencies have very long paths, the compiler driver can break.

Description:
This seems to happen mostly with spack dependencies since spack encodes shasums in the package path. The most likely culprits are the CHPL_TARGET_BUNDLED_LINK_ARGS or CHPL_TARGET_BUNDLED_COMPILE_ARGS, but any of the flags that accumulate values longer than 4096 chars can cause this problem.

Is this issue currently blocking your progress?
No, can be worked around by passing --no-compiler-driver to chpl

Steps to Reproduce

  1. Install chapel dependencies such that the resulting CHPL_TARGET_BUNDLED_COMPILE_ARGS or CHPL_TARGET_BUNDLED_LINK_ARGS as viewed from printchplenv --internal is longer than 4096 chars.
  2. Build chapel and try to compile any program.
  3. The assertion at compiler/util/files.cpp:209, assert(strBuf[len - 1] == '\n' && "stored line exceeds maximum length"); will fail.

Source Code:

writeln("Hello");

Compile command:
chpl foo.chpl

Execution command:
n/a, compilation fails

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions