Skip to content

Update Dockerfile since #1276: add libgomp to runtime dependencies - #1301

Merged
taku910 merged 1 commit into
google:masterfrom
kkew3:fix-dockerfile-20260805-libgomp
Aug 6, 2026
Merged

Update Dockerfile since #1276: add libgomp to runtime dependencies#1301
taku910 merged 1 commit into
google:masterfrom
kkew3:fix-dockerfile-20260805-libgomp

Conversation

@kkew3

@kkew3 kkew3 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

This PR is a continuation of #1276.

Commit fd53b5c introduced -lgomp flag for linux:

diff --git a/python/setup.py b/python/setup.py
index 60e0811..0af8a9e 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -131,6 +131,7 @@ class build_ext_unix(_build_ext):
       # GNU linker
       libs.append('-Wl,--start-group')
       libs.extend(abseil_libs)
+      libs.append('-lgomp')
       libs.append('-Wl,--end-group')
       libs.append('-Wl,--gc-sections')
       libs.append('-Wl,--version-script=exports.txt')
@@ -143,6 +144,9 @@ class build_ext_unix(_build_ext):
 
     if sys.platform == 'linux':
       libs.append('-Wl,-Bsymbolic')
+      libs.append('-fopenmp')
+      libs.append('-lgomp')
+      cflags.append('-fopenmp')
 
     if is_gil_disabled():
       cflags.append('-DPy_GIL_DISABLED')

Hence, we need to update the runtime dependencies as well.

The test run of the Dockerfile can be checked at https://github.com/kkew3/sentencepiece_dockerfile/actions/runs/31021739631/job/92359882631?pr=20.

Commit fd53b5c introduces `-lgomp`
flag for linux. Hence, we need to update the runtime dependencies.
@taku910
taku910 merged commit 43640a0 into google:master Aug 6, 2026
33 of 35 checks passed
@kkew3
kkew3 deleted the fix-dockerfile-20260805-libgomp branch August 6, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants