IBM Support

Build fails with "Unable to set working directory" error

Technote (troubleshooting)


IBM Rational Build Forge build step fails on agent indicating error with truncated path name.


Path name for agent working directory is truncated.

For example, the following "Hello World" build running build with tag BUILD_1 appears as follows:

Unable to set working directory to '/build/Hello_World/BUILD_' (2). (12)


The agent was built under a 64-bit system (x86-64) as a 64-bit binary.

Diagnosing the problem

Use the Linux file command to verify the bfagent binary.

For example:

file /usr/local/bin/bfagent

/usr/local/bin/bfagent: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped

Resolving the problem

Install the appropriate 32-bit libraries and the 32-bit gcc libraries (libgcc) to rebuild the agent with the gcc environment variable CFLAGS=-m32.

  1. Find the appropriate 32-bit libraries

    Use the Linux ldd command on the bfagent binary to list the associated library files

  2. Use the system package manager system to verify the package containing the associated library files.

    Under Red Hat Enterprise Linux (RHEL), use the rpm command.

    For example: rpm -qf /path/to/libfile

  3. Install the appropriate 32-bit libraries as needed

  4. Set the gcc CFLAGS=-m32 environment variable flag

  5. Rebuild the Build Forge agent

    For example:

    cd /path/to/bfagent_source
    export CFLAGS=-m32

Document information

More support for: Rational Build Forge
Agent: Source Kit

Software version: 7.0.2, 7.1, 7.1.1,, 7.1.2

Operating system(s): Linux

Reference #: 1509103

Modified date: 12 September 2012

Translate this page: