While trying to build a simple Kogito application with the Persistence profile enabled the build failed complaining that the lib stdc++ was not found:
/usr/bin/ld: cannot find -lstdc++
The builder image is based on the ubi8-minimal and to build it the s2i tool was used with the following command was used:
s2i build https://github.com/kiegroup/kogito-examples --context-dir jbpm-quarkus-example quay.io/kiegroup/kogito-quarkus-ubi8-s2i:0.8.0-rc1 kogitotest:10.0 --runtime-image quay.io/kiegroup/kogito-quarkus-ubi8:0.8.0-rc1 --loglevel 5 --env MAVEN_MIRROR_URL=http://nexus.apps.spolti.cloud/nexus/content/groups/public/ --env NATIVE=true --env MAVEN_ARGS_APPEND="-Ppersistence"
As first hint I think it could be something related with the libstdc++-static because when running the same build on my local machine it works and the only difference I found around this the stdc++ lib was that my machine have the llibstdc++-devel and static packages while the image only have the libstdc++, tried the to install the devel one, but no luck thus I thought it could be something related with the static one.
The fix:
To solve this I had to symlink /usr/lib64/libstdc++.so.6.0.25 to /usr/lib64/libstdc++.so but not sure why on my machine it works without the symlink and have piratically the same libs available, eg libstdc++.so.6.0.27 with a symlink to libstdc++.so.6