devcontainers / templates

Repository for Dev Container Templates that are managed by Dev Container spec maintainers. See https://github.com/devcontainers/template-starter to create your own!
https://containers.dev/templates
MIT License
924 stars 242 forks source link

Fix the error caused by hard-coded library path #143

Closed wxw-matt closed 1 year ago

wxw-matt commented 1 year ago

The cmake creates lib64 for 64-bit arch, so the hard-coded lib/mariadb causes the failure:

cp: cannot stat 'lib/mariadb/libmariadbcpp.so': No such file or directory
wxw-matt commented 1 year ago

This patch has been tested on the WSL and non-WSL Ubuntu

samruddhikhandale commented 1 year ago

cp: cannot stat 'lib64/mariadb/libmariadbcpp.so': No such file or directory

Looks like the smoke test failed with similar error. Apparently, even though the arch is 64 in this case, the file does not exist. https://github.com/devcontainers/templates/actions/runs/4663780383/jobs/8269031440#step:6:328

@wxw-matt Can you help fix that? thanks!

wxw-matt commented 1 year ago

cp: cannot stat 'lib64/mariadb/libmariadbcpp.so': No such file or directory

Looks like the smoke test failed with similar error. Apparently, even though the arch is 64 in this case, the file does not exist. https://github.com/devcontainers/templates/actions/runs/4663780383/jobs/8269031440#step:6:328

@wxw-matt Can you help fix that? thanks!

Thanks for raising the problem. It seems the cmake's behaviour is inconsistent, so I just check if the lib64 exists based on the assumption that the cmake only creates either lib or lib64.

wxw-matt commented 1 year ago

Great, thanks!

Can you also help bump the patch version before we merge this PR?

https://github.com/devcontainers/templates/blob/28ec8a2202681e5254afca026ad1dc659855fbee/src/cpp-mariadb/devcontainer-template.json#L3

Sure, it has been updated to 1.0.6.

wxw-matt commented 1 year ago

@microsoft-github-policy-service agree