marian-nmt / marian-dev

Fast Neural Machine Translation in C++ - development repository
https://marian-nmt.github.io
Other
256 stars 126 forks source link

static link Threads lib for a portable bin #1012

Closed thammegowda closed 10 months ago

thammegowda commented 1 year ago

Description

adding Threads as EXT_LIB so we can statically link.

This PR partially fixes #1011

List of changes:

Added dependencies: none

How to test

1) build marian on ubuntu20.04 2) scp build/marian to a machine having ubuntu22.04 3) run ./marian --help and see that marian doesnt crash!

Describe how you have tested your code, including OS and the cmake command.

# cpu only build
cmake .. -DUSE_MPI=off -DUSE_STATIC_LIBS=on -DCOMPILE_CUDA=off -DCOMPILE_CPU=on

# cuda build
cmake .. -DUSE_MPI=off -DUSE_STATIC_LIBS=on -DCOMPILE_PASCAL=on -DCOMPILE_VOLTA=on -DCOMPILE_AMPERE=on -DBUILD_ARCH=x86-64 

Checklist

thammegowda commented 1 year ago

@snukky Thanks for the review. I've just updated CHANGELOG.