0

I'm trying to use Google Cloud Build to build my project which requires TexturePacker.

I managed to install TexturePacker but once script execute its CLI I get this error:

/usr/bin/../lib/texturepacker/TexturePacker_: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/bin/../lib/texturepacker/TexturePacker_)

Tried to install necessary lib but still no success (like below):

FROM gcr.io/cloud-builders/yarn
RUN apt-get update && apt-get install -y libgl1-mesa-glx
RUN apt-get install -y libstdc++6
RUN wget https://www.codeandweb.com/download/texturepacker/5.2.0/TexturePacker-5.2.0-ubuntu64.deb && dpkg -i TexturePacker-5.2.0-ubuntu64.deb

Does anyone has an idea on how to fix it?

Daniel Ocando
  • 3,554
  • 2
  • 11
  • 19
abradas
  • 91
  • 4
  • I'm new at Cloud Build but I'm thinking it might be useful to see your complete cloudbuild.yaml and the Dockerfile if you are building custom steps. – Kolban Nov 18 '19 at 21:20
  • I've edited my post with full Dockerfile. it's based on yarn builder as I run normal node.js script which inside it uses TexturePacker cli – abradas Nov 18 '19 at 21:41
  • @abradas according to the [TexturePacker documentation](https://www.codeandweb.com/texturepacker/support) there is a known bug about `Command line client (TexturePacker) not found`. They suggest an extra step of placing the link to the executable manually. Have you tried this locally? – Daniel Ocando Nov 20 '19 at 14:48
  • Yes, it works locally but not in Google Build. However, here the problem i a bit different i guess. TexturePacker command works but once i try to build sprisheets it crashes as it needs GLIBCXX_3.4.21 – abradas Nov 21 '19 at 13:40
  • As I understand the issue now is in Cloud Build and can not recognize “GLIBCXX_3.4.21” lib. Are you using Cloud Build with Docker? If not, I would recommend you to use Docker in order to use “GLIBCXX_3.4.21” lib. [Here](https://cloud.google.com/cloud-build/docs/quickstart-docker) you can check how to use Cloud Build with Docker. – Nicholas Nov 25 '19 at 10:46
  • Hey @chainicko, yes i used custom docker and i installed all libs(see my Dockerfile posted in main post). This is what you meant right? – abradas Nov 25 '19 at 12:52
  • Yes, I found something similar in askubuntu but from your answer seems you solved your issue! – Nicholas Nov 26 '19 at 09:32

1 Answers1

1

I was managed to solve it using this Dockerfile:

FROM node:latest
RUN apt-get update

# Install updates and dependencies
RUN apt-get install --no-install-recommends -y -q curl python build-essential git ca-certificates libkrb5-dev imagemagick && \
    apt-get clean && rm /var/lib/apt/lists/*_*

#TexturePacker and dependencies
RUN apt-get install -y libgl1-mesa-glx
RUN apt-get install -y libstdc++6
RUN wget https://www.codeandweb.com/download/texturepacker/5.2.0/TexturePacker-5.2.0-ubuntu64.deb && dpkg -i TexturePacker-5.2.0-ubuntu64.deb
abradas
  • 91
  • 4