Unable to run 32-bit executable on Ubuntu 20.04 on Pipelines
Asked by Jason:

Hi there,   

I am unable to run a 32-bit executable inside docker on Bitbucket Pipelines.   

I have a custom docker image which I have added all that is required to run a 32-bit GCC cross compiler. This same docker image works as expected when running on Windows (using Docker on WSL). When I run the same docker image and build scripts inside Bitbucket Pipelines then I get an exception.

```
bash: /opt/mspgcc/bin/msp430-gcc: cannot execute binary file: Exec format error??
```

Here is part of my **Dockerfile**:  

```
FROM ubuntu:20.04

RUN dpkg --add-architecture i386 && \

    apt-get update && \

    apt-get install -y build-essential libc6-i386 libstdc++6

# Install MSP-GCC 20081229
...
```

Here is my **bitbucket-pipelines.yml:**  

```
image:

  name: company.azurecr.io/msp430-gcc:20081229

  username: $DOCKER_USERNAME

  password: $DOCKER_PASSWORD

pipelines:

  default:

    - step:

        name: Build Project

        script:

          - cd arr01-02

          - msp430-gcc -MM -mmcu=msp430x247 -O2 -Wall -Wunused -I./include/ src/variant.c src/arr01-02.c src/temperature.c src/bms.c src/flash.c src/scale.c src/stream.c src/can.c src/usci.c
```

This is pretty much identical to [Unable to run 32-bit executable on Ubuntu 16.04 on Pipelines](https://community.atlassian.com/t5/Bitbucket-questions/Unable-to-run-32-bit-executable-on-Ubuntu-16-04-on-Pipelines/qaq-p/1688253?) . The suggestion was to email Bitbucket support and ask them to enable 32-bit support on the Pipeline. However, every support avenue I have tried has brought me here.   

Is anyone able to assist me with enabling 32-bit support for my Pipeline?   

Kind Regards,   
Jason.


Answers:
author: Norbert C
body: Hi Jason,

I would like to inform you that I've created a support ticket for your issue, reference number is: BBS-179496

I'm going to keep you informed in the support ticket. You can open this support ticket by clicking on the link which you've received.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support

comments: author: Jason
body: Hi Norbert,   

Thanks for your help on this. I have clicked on the ticket and will be following along.   

Kind Regards,   
Jason.


author: Norbert C
body: You're welcome Jason, I'm always happy to help :)


author: Norbert C
body: Hi [@Jason](/t5/user/viewprofilepage/user-id/4710512)

I would like to inform you that I informed the engineering team about this issue and will update you shortly with our findings.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support


author: Norbert C
body: Hi Jason,

Thank you for contacting Atlassian Community, I'm Norbert from Bitbucket Cloud Support and I'm here to help you.

Can you let me know whether if you're having this issue on your personal Workspace or with the pr\*\*\*\*\*\*\*n Workspace?

I'm looking forward to hear from you.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support

comments: author: Jason
body: Hi [@Norbert C](/t5/user/viewprofilepage/user-id/1190200)  

Thanks for getting back to me.   

I'm having issues in the pr\*\*\*\*\*\*\*n Workspace. There is a **tr\*-firmware** repo with a pipeline that is currently failing due to the issue explained above.   

I am able to use this exact docker image to run the build scripts on a Windows PC and everything behaves as expected. Others have suggested that maybe the docker containers for Pipelines are being run using a configuration/environment which does not allow for 32-bit executables to be used.   

Kind Regards,   
Jason.


Tags: bitbucket-cloud

cloud