Discrepancies between docker and pipeline compilation results - Linker Error
Asked by Lucas Avanci Gaudio:

We have a pipeline setup for our project, and it is based on Debian, compiling some c++ code with the c++ executable.

A local docker image is set up with the same dockerfile uploaded to the repository, and for the same setup commands, the results from the online pipeline are different than the local docker machine in the last linker step. The code finishes compilation successfully in the local docker, while it fails in the pipeline.

```
bitbucket-pipelines.yml has the following commands:

# This is a sample build configuration for C++ -- Make.
# Check our guides at https://confluence.atlassian.com/x/5Q4SMw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: be1et/ceinms-platform:latest
pipelines:
  default:
    - step:
        # Double the resources for this build
        size: 2x
        caches:
          - "builddir"
        script:
          # Clones required submodules
          - git submodule update --init
          # Prepare build
          - mkdir -p build && cd build && cmake .. -DOPENSIM_INSTALL_DIR=/opensim_install -Wno-dev -DCMAKE_CXX_FLAGS="-w"
          # We build with hidden warnings, which is bad, but there are so many warnings regular output is drowned out
          # Build
          - cmake --build . --verbose
definitions:
  caches:
    builddir: build
```

The commands to compile the code in the local docker are the following  

```
git reset --hard a4e0b5da0e43dfa9ed63544e79bba0cdc289a13c 
git submodule update --init
mkdir -p build && cd build
cmake .. -DOPENSIM_INSTALL_DIR=/opensim_install -Wno-dev -DCMAKE_CXX_FLAGS="-w" 
cmake --build . --verbose
```

The compilation results for the [local](https://drive.google.com/file/d/1p0l9Bg9_PupxZHfHY9It2jqtxwwafA4B/view?usp=sharing) and [pipeline](https://drive.google.com/file/d/14cAGjvm1rTAncCSBynbJNTx-Rk5VgD9c/view?usp=sharing) are linked to the respective names.

With the files of the local docker, I dumped the object where the functions reported as missing should be located, and indeed they are listed there. I can\`t be sure if they are listed in the objects generated in the pipeline.

What could be causing this discrepancy in results, and how can I approach fixing it? Is there any way to remotely access the pipeline machine to try and debug this?


Answers:
author: Patrik S
body: Hello [@Lucas Avanci Gaudio](/t5/user/viewprofilepage/user-id/4988894) ,  
In order to further investigate this case we'd need to take a look at your pipeline build, so I went ahead and created an internal ticket for you using the email of your community account, so you don't have to share this information here. You should have received an email with a link to the support ticket.  
Just in case you haven't received it, please feel free to let me know and I can post the ticket URL here. The ticket will be visible only to you and Atlassian staff, no one else can view its contents even if they have the URL.  
Thank you [@Lucas Avanci Gaudio](/t5/user/viewprofilepage/user-id/4988894) .  
Kind regards,  
Patrik S


Tags: bitbucket-cloud

cloud