I have set up the bitbucket-pipeline for our project, with custom GCC installation on docker space. ,we could build bootloader but when it comes to build the application code all our c source code mentioned in cmake were built, but bitbucket doesn't link the pre-built library files mentioned in cmake though the files located in the folder. Bitbucket throws no such file or folder.
bitbucket-pipeline.yml file:
image: gcc:10.2
pipelines:
pull-requests:
'**':
- step:
name: build
script:
- apt-get update
- apt-get install -y cmake
- chmod +x install_crosstoolchain.sh
- ./install_crosstoolchain.sh
- make
snippet of cmake file where our .a file is located on main directory
DXXXLIB = DXXXXX/XXX.a
bitbucket error:
arm-none-eabi-gcc: DXXXXX/XXX.a: No such file or directory
Please guide us to fix this.
It was the same issue with other library files but with building source code for it generated new library for it and problem vanished.
This particular library file we can't generate it and its a from third party.
Hi Avanthi,
Welcome to Atlassian Community!
Can you let us know if you were using an absolute or relative path? When you execute a build the repository's content gets mounted to the following directory:
/opt/atlassian/pipelines/agent/build
Can you try to refer the library to this path and let us know if that makes any difference?
I tried with the absolute path /opt/atlassian/pipelines/agent/build but still it didn't work.
The problem here is with linking the library files generated by another compiler I guess. I had the same issue with another library file, but since we have source code for it I made it compiled here within bitbucket and the linker could locate the generated file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looking at the error, I'm wondering if this is caused by the architecture
What I can see is that you're trying to compile for arm
arm-none-eabi-gcc: DXXXXX/XXX.a: No such file or directory
git clone https://<user_name>@bitbucket.org/xxxxx/xxxxx.web
cd xxxxxxx
git checkout <commit sha>
docker run -it --volume=<Local_Repo_Dir>:/xxxxxx --workdir="/xxxxxx" --memory=8g --memory-swap=8g --memory-swappiness=0 --entrypoint=/bin/bash gcc:10.2
####once you're in the conatiner
- apt-get update
- apt-get install -y cmake
- chmod +x install_crosstoolchain.sh
- ./install_crosstoolchain.sh
- make
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.