Regression: Weston build fails (doesn't link lcms2 although using its functions)
Setup:
- Ubuntu 18.04
- Meson 0.47 from Ubuntu 18.10
- Git version of Weston (and its main dependencies): 2f9ca278 build: do not allow unresolved symbols
Weston builds started to fail yesterday, due to using functions from lcms2, but not linking it:
$ meson -Dimage-jpeg=false -Dimage-webp=false -Dsimple-dmabuf-drm=auto -Dxwayland-path=/opt/install/bin/Xwayland -Dpipewire=false -Dbackend-drm-screencast-vaapi=false -Dbackend-rdp=false -Dremoting=false --buildtype=debugoptimized ../source/weston
...
Native dependency lcms2 found: YES 2.9
Native dependency colord found: YES 1.3.3
...
[412/428] Linking target compositor/cms-colord.so.
FAILED: compositor/cms-colord.so
ccache cc -o compositor/cms-colord.so 'compositor/compositor@@cms-colord@sha/cms-colord.c.o' 'compositor/compositor@@cms-colord@sha/cms-helper.c.o' -Llib -Wl,--no-undefined -Wl,--as-needed -shared -fPIC -Wl,--start-group -Wl,-soname,cms-colord.so libweston/libweston-8.so.0.0.0 lib/libwayland-server.so /usr/lib/x86_64-linux-gnu/libpixman-1.so /usr/lib/x86_64-linux-gnu/libxkbcommon.so /usr/lib/x86_64-linux-gnu/libcolord.so /usr/lib/x86_64-linux-gnu/libcolordprivate.so /usr/lib/x86_64-linux-gnu/libgio-2.0.so /usr/lib/x86_64-linux-gnu/libgobject-2.0.so /usr/lib/x86_64-linux-gnu/libglib-2.0.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/../libweston:$ORIGIN/../../../../../lib' -Wl,-rpath-link,.cache/jhbuild/build/source/weston/libweston:lib
compositor/compositor@@cms-colord@sha/cms-helper.c.o: In function `weston_cms_set_color_profile':
compositor/cms-helper.c:79: undefined reference to `cmsReadTag'
compositor/cms-helper.c:91: undefined reference to `cmsEvalToneCurveFloat'
compositor/cms-helper.c:92: undefined reference to `cmsEvalToneCurveFloat'
compositor/cms-helper.c:93: undefined reference to `cmsEvalToneCurveFloat'
compositor/compositor@@cms-colord@sha/cms-helper.c.o: In function `weston_cms_destroy_profile':
compositor/cms-helper.c:108: undefined reference to `cmsCloseProfile'
compositor/compositor@@cms-colord@sha/cms-helper.c.o: In function `weston_cms_load_profile':
compositor/cms-helper.c:131: undefined reference to `cmsOpenProfileFromFile'
collect2: error: ld returned 1 exit status
...
$ readelf -s /usr/lib/x86_64-linux-gnu/liblcms2.so.2.0.8|grep cmsOpenProfileFromFile
131: 0000000000015470 13 FUNC GLOBAL DEFAULT 12 cmsOpenProfileFromFile
345: 00000000000153f0 120 FUNC GLOBAL DEFAULT 12 cmsOpenProfileFromFileTHR
Edited by Eero Tamminen