0

I am attempting to compile a Delphi project in TeamCity (http://www.jetbrains.com/teamcity/) using a command line runner. For each project, I get a "File name too long" error. The project(s) compile successfully in the Delphi IDE. I've even tried building the project from the buildagent directory (in this case: C:\TeamCity\buildAgent\work\cbe5a74bfd8678cb\iqwin_2013\Iqworkflow), and it compiles there as well. This particular command line build has also worked in the past on a different environment.

Error:

[15:18:45]Step 2/50: iqworkflow (Command Line)
[15:18:45][Step 2/50] Starting: C:\TeamCity\buildAgent\temp\agentTmp\custom_script5211313096540988416.cmd
[15:18:45][Step 2/50] in directory: C:\TeamCity\buildAgent\work\cbe5a74bfd8678cb\iqwin_2013\Iqworkflow
[15:18:45][Step 2/50] Embarcadero Delphi for Win32 compiler version 22.0
[15:18:45][Step 2/50] Copyright (c) 1983,2010 Embarcadero Technologies, Inc.
[15:18:45][Step 2/50] Error: E2288 File name too long (exceeds 260 characters)
[15:18:45][Step 2/50] Error: E2288 File name too long (exceeds 260 characters)
[15:18:45][Step 2/50] Error: E2288 File name too long (exceeds 260 characters)
[15:18:45][Step 2/50] Error: E2288 File name too long (exceeds 260 characters)
[15:18:45][Step 2/50] IQWorkflow.dpr(1) Fatal: F1027 Unit not found: 'System.pas' or binary equivalents (.dcu)
[15:18:45][Step 2/50] Process exited with code 1
[15:18:45][Step 2/50] Step iqworkflow (Command Line) failed
  • System.pas can be found in C:\Program Files (x86)\Embarcadero\RAD Studio\8.0\source\rtl\sys
invertigo
  • 6,336
  • 5
  • 39
  • 64
  • there are no file names (full path) that exceed 260 characters. i dont think there are any that even exceed 100 characters. i'm thinking its related to the command line arguments that are being passed in, but that's just a guess. – invertigo Oct 31 '13 at 17:49
  • There must be a filename which we cannot see here. When you double click one of these 4 error messages, where does it take you in your code? – Jerry Dodge Oct 31 '13 at 17:55
  • these error messages are coming from TeamCity, so there is no way to drill in. like i mentioned, the project builds successfully in the Delphi IDE on the same machine. – invertigo Oct 31 '13 at 17:57
  • Wait, "Unit not found: 'System.pas'" makes me think it's something messed up with your IDE, not your project. – Jerry Dodge Oct 31 '13 at 18:00
  • Would you happen to have an HP computer? Could this be your problem? http://stackoverflow.com/questions/8444064/delphi-xe2-cant-compile-any-project-on-my-computer-because-of-environment-varia – Jerry Dodge Oct 31 '13 at 18:01
  • Perhaps you have installed your IDE in a different location than the Program Files? Some place which would give a much longer directory? – Jerry Dodge Oct 31 '13 at 18:14
  • it's not an HP machine, Delphi is installed here: `C:\Program Files (x86)\Embarcadero\RAD Studio\8.0` – invertigo Oct 31 '13 at 19:43
  • All we can do is guess, because as it stands, nothing that you've shown us reveals any file name being too long. It *must* be something we can't see. – Jerry Dodge Oct 31 '13 at 20:09
  • 1
    Perhaps you can provide content of that `custom_script5211313096540988416.cmd`? It can shed some light on that problem. – Serhii Kheilyk Nov 01 '13 at 04:32

1 Answers1

1

The problem ended up being a particular path (out of about 50, so it wasn't immediately evident) in my library path arguments that had a space in it, but was not in double-quotes.

Broken: C:\test folder\lib

Fixed: "C:\test folder\lib"

invertigo
  • 6,336
  • 5
  • 39
  • 64