diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3d4eb474521dfca14f913945747f9e38100a677c..e0b03e17c9f81e0f93cd39e42527191a796cff08 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-image: "flowdalic/debian-testing-dev:1.4"
+image: "flowdalic/debian-testing-dev:1.5"
 
 before_script:
   - |
diff --git a/meson.build b/meson.build
index 7c5fee1e2cfcea5099ca0c61b0fd9ec502c42bc1..be4deabdcf84131a3a1732cb46f93579117f3a8b 100644
--- a/meson.build
+++ b/meson.build
@@ -12,6 +12,8 @@ thread_dep = dependency('threads')
 uring_dep = dependency('liburing')
 emper_dependencies = [thread_dep, uring_dep]
 
+boost_thread_dep = dependency('boost', modules : ['thread'], required: false)
+
 run_target('iwyu',
 		   command: 'tools/check-iwyu')
 
@@ -42,7 +44,9 @@ conf_data.set('EMPER_' + semaphore_impl.to_upper() + '_WAKEUP_SEMAPHORE', true)
 
 locked_unbounded_queue_impl = get_option('locked_unbounded_queue_implementation')
 if locked_unbounded_queue_impl == 'boost_shared_mutex'
-	boost_thread_dep = dependency('boost', modules : ['thread'])
+	if not boost_thread_dep.found()
+		error('Boost thread module not found, but locked_unbounded_queue_implementation set to boost_shared_mutex')
+	endif
 	emper_dependencies += [boost_thread_dep]
 endif
 conf_data.set('EMPER_' + locked_unbounded_queue_impl.to_upper() + '_LOCKED_UNBOUNDED_QUEUE', true)