IBM Support

Build fails with "Unable to set working directory" error

Troubleshooting


Problem

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

Symptom

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)

Cause

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
    ./configure
    ./make

[{"Product":{"code":"SSB2MV","label":"Rational Build Forge"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Agent: Source Kit","Platform":[{"code":"PF016","label":"Linux"}],"Version":"7.0.2;7.1;7.1.1;7.1.1.4;7.1.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
20 April 2020

UID

swg21509103