[Bug]: long dependency paths can break compiler driver #26261
Closed
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
- Install chapel dependencies such that the resulting
CHPL_TARGET_BUNDLED_COMPILE_ARGS
orCHPL_TARGET_BUNDLED_LINK_ARGS
as viewed fromprintchplenv --internal
is longer than 4096 chars. - Build chapel and try to compile any program.
- 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