hello i compile libdrm as dependence for qt5 but libcairo from libdrm is undefined. FreeBSD 11.0-RELEASE-p9 FreeBSD 11.0-RELEASE-p9 #0: Tue Apr 11 08:48:40 UTC 2017 FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0) libtool: link: cc -Wall -Wextra -Wsign-compare -Werror-implicit-function-declaration -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wstrict-aliasing=2 -Winit-self -Wdeclaration-after-statement -Wold-style-definition -Wno-unused-parameter -Wno-attributes -Wno-long-long -Winline -Wshadow -Wno-missing-field-initializers -O2 -pipe -fstack-protector -fno-strict-aliasing -fstack-protector -o .libs/kms-steal-crtc kms-steal-crtc.o ./.libs/libkms-test.a /usr/ports/graphics/libdrm/work/libdrm-2.4.80/.libs/libdrm.so ../util/.libs/libutil.a -L/usr/local/lib -lcairo -lpthread -lm -pthread -Wl,-rpath -Wl,/usr/local/lib /usr/bin/ld: warning: libGL.so.1, needed by /usr/local/lib/libcairo.so, not found (try using -rpath or -rpath-link) /usr/bin/ld: warning: libGL.so.1, needed by /usr/local/lib/libcairo.so, not found (try using -rpath or -rpath-link) /usr/local/lib/libcairo.so: undefined reference to `glXMakeCurrent' /usr/local/lib/libcairo.so: undefined reference to `glXMakeCurrent' /usr/local/lib/libcairo.so: undefined reference to `glEnable' /usr/local/lib/libcairo.so: undefined reference to `glIsEnabled' /usr/local/lib/libcairo.so: undefined reference to `glBlendFuncSeparate' /usr/local/lib/libcairo.so: undefined reference to `glDisable' /usr/local/lib/libcairo.so: undefined reference to `glClear' /usr/local/lib/libcairo.so: undefined reference to `glClearStencil' /usr/local/lib/libcairo.so: undefined reference to `glReadBuffer' /usr/local/lib/libcairo.so: undefined reference to `glXChooseFBConfig' /usr/local/lib/libcairo.so: undefined reference to `glGetError' /usr/local/lib/libcairo.so: undefined reference to `glStencilFunc' /usr/local/lib/libcairo.so: undefined reference to `glClearColor' /usr/local/lib/libcairo.so: undefined reference to `glReadPixels' /usr/local/lib/libcairo.so: undefined reference to `glDrawBuffer' /usr/local/lib/libcairo.so: undefined reference to `glActiveTexture' /usr/local/lib/libcairo.so: undefined reference to `glEnable' /usr/local/lib/libcairo.so: undefined reference to `glIsEnabled' /usr/local/lib/libcairo.so: undefined reference to `glBlendFuncSeparate' /usr/local/lib/libcairo.so: undefined reference to `glDisable' /usr/local/lib/libcairo.so: undefined reference to `glClear' /usr/local/lib/libcairo.so: undefined reference to `glClearStencil' /usr/local/lib/libcairo.so: undefined reference to `glReadBuffer' /usr/local/lib/libcairo.so: undefined reference to `glXChooseFBConfig' /usr/local/lib/libcairo.so: undefined reference to `glGetError' /usr/local/lib/libcairo.so: undefined reference to `glStencilFunc' /usr/local/lib/libcairo.so: undefined reference to `glClearColor' /usr/local/lib/libcairo.so: undefined reference to `glReadPixels' /usr/local/lib/libcairo.so: undefined reference to `glDrawBuffer' /usr/local/lib/libcairo.so: undefined reference to `glActiveTexture' /usr/local/lib/libcairo.so: undefined reference to `glXGetCurrentContext' /usr/local/lib/libcairo.so: undefined reference to `glXGetCurrentContext' /usr/local/lib/libcairo.so: undefined reference to `glXSwapBuffers' /usr/local/lib/libcairo.so: undefined reference to `glColorMask' /usr/local/lib/libcairo.so: undefined reference to `glBlendFunc' /usr/local/lib/libcairo.so: undefined reference to `glBindTexture' /usr/local/lib/libcairo.so: undefined reference to `glXGetVisualFromFBConfig' /usr/local/lib/libcairo.so: undefined reference to `glDepthMask' /usr/local/lib/libcairo.so: undefined reference to `glStencilOp' /usr/local/lib/libcairo.so: undefined reference to `glDeleteTextures' /usr/local/lib/libcairo.so: undefined reference to `glPixelStorei' /usr/local/lib/libcairo.so: undefined reference to `glGetIntegerv' /usr/local/lib/libcairo.so: undefined reference to `glXGetCurrentDrawable' /usr/local/lib/libcairo.so: undefined reference to `glDrawElements' /usr/local/lib/libcairo.so: undefined reference to `glTexImage2D' /usr/local/lib/libcairo.so: undefined reference to `glXSwapBuffers' /usr/local/lib/libcairo.so: undefined reference to `glColorMask' /usr/local/lib/libcairo.so: undefined reference to `glBlendFunc' /usr/local/lib/libcairo.so: undefined reference to `glBindTexture' /usr/local/lib/libcairo.so: undefined reference to `glXGetVisualFromFBConfig' /usr/local/lib/libcairo.so: undefined reference to `glDepthMask' /usr/local/lib/libcairo.so: undefined reference to `glStencilOp' /usr/local/lib/libcairo.so: undefined reference to `glDeleteTextures' /usr/local/lib/libcairo.so: undefined reference to `glPixelStorei' /usr/local/lib/libcairo.so: undefined reference to `glGetIntegerv' /usr/local/lib/libcairo.so: undefined reference to `glXGetCurrentDrawable' /usr/local/lib/libcairo.so: undefined reference to `glDrawElements' /usr/local/lib/libcairo.so: undefined reference to `glTexImage2D' /usr/local/lib/libcairo.so: undefined reference to `glDrawArrays' /usr/local/lib/libcairo.so: undefined reference to `glScissor' /usr/local/lib/libcairo.so: undefined reference to `glDrawArrays' /usr/local/lib/libcairo.so: undefined reference to `glScissor' /usr/local/lib/libcairo.so: undefined reference to `glTexSubImage2D' /usr/local/lib/libcairo.so: undefined reference to `glXQueryContext' /usr/local/lib/libcairo.so: undefined reference to `glGetString' /usr/local/lib/libcairo.so: undefined reference to `glXGetProcAddress' /usr/local/lib/libcairo.so: undefined reference to `glViewport' /usr/local/lib/libcairo.so: undefined reference to `glTexParameteri' /usr/local/lib/libcairo.so: undefined reference to `glGenTextures' /usr/local/lib/libcairo.so: undefined reference to `glXQueryExtensionsString' /usr/local/lib/libcairo.so: undefined reference to `glTexSubImage2D' /usr/local/lib/libcairo.so: undefined reference to `glXQueryContext' /usr/local/lib/libcairo.so: undefined reference to `glGetString' /usr/local/lib/libcairo.so: undefined reference to `glXGetProcAddress' /usr/local/lib/libcairo.so: undefined reference to `glViewport' /usr/local/lib/libcairo.so: undefined reference to `glTexParameteri' /usr/local/lib/libcairo.so: undefined reference to `glGenTextures' /usr/local/lib/libcairo.so: undefined reference to `glXQueryExtensionsString' cc: error: linker command failed with exit code 1 (use -v to see invocation) cc: error: linker command failed with exit code 1 (use -v to see invocation) --- kms-universal-planes --- *** [kms-universal-planes] Error code 1 make[5]: stopped in /usr/ports/graphics/libdrm/work/libdrm-2.4.80/tests/kms --- kms-steal-crtc --- *** [kms-steal-crtc] Error code 1 make[5]: stopped in /usr/ports/graphics/libdrm/work/libdrm-2.4.80/tests/kms 2 errors make[5]: stopped in /usr/ports/graphics/libdrm/work/libdrm-2.4.80/tests/kms --- all-recursive --- *** [all-recursive] Error code 1 make[4]: stopped in /usr/ports/graphics/libdrm/work/libdrm-2.4.80/tests 1 error make[4]: stopped in /usr/ports/graphics/libdrm/work/libdrm-2.4.80/tests --- all-recursive --- *** [all-recursive] Error code 1 make[3]: stopped in /usr/ports/graphics/libdrm/work/libdrm-2.4.80 1 error make[3]: stopped in /usr/ports/graphics/libdrm/work/libdrm-2.4.80 *** [all] Error code 2 make[2]: stopped in /usr/ports/graphics/libdrm/work/libdrm-2.4.80 1 error make[2]: stopped in /usr/ports/graphics/libdrm/work/libdrm-2.4.80 ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make[1]: stopped in /usr/ports/graphics/libdrm *** Error code 1 Stop. make: stopped in /usr/ports/graphics/libdrm ===>>> make build failed for graphics/libdrm ===>>> Aborting update ===>>> Update for libdrm-2.4.75_3,1 failed ===>>> Aborting update ===>>> Update for graphics/mesa-libs failed ===>>> Aborting update ===>>> Update for qt5-quick-5.7.1 failed ===>>> Aborting update ===>>> Update for qt5-connectivity-5.7.1 failed ===>>> Aborting update ===>>> Update for qt5-5.7.1 failed ===>>> Aborting update ===>>> There are messages from installed ports to display, but first take a moment to review the error messages above. Then press Enter when ready to proceed.
Created attachment 182756 [details] config.log Added config.log
(In reply to Martin Filla from comment #0) > /usr/bin/ld: warning: libGL.so.1, needed by /usr/local/lib/libcairo.so, not found (try using -rpath or -rpath-link) > /usr/bin/ld: warning: libGL.so.1, needed by /usr/local/lib/libcairo.so, not found (try using -rpath or -rpath-link) Try upgrading properly. libGL.so.1 moved from graphics/libGL to graphics/mesa-libs. graphics/cairo already depends on it via USE_GL=gl for OPENGL=on.
The tests, which are built but not installed, detect and use cairo if it's present. If cairo has been built with GL support, then it depends on mesa-libs (formerly libGL), which in turn depend on libdrm. So, there is circular dependency, but that wasn't readily apparent since the cairo dependency is undeclared. The solution is to disable use of cairo by adding --disable-cairo-tests to CONFIGURE_ARGS in libdrm's Makefile.
A commit references this bug: Author: rezny Date: Sun May 21 18:53:31 UTC 2017 New revision: 441421 URL: https://svnweb.freebsd.org/changeset/ports/441421 Log: Assorted fixes and improvements to libdrm * define ETIME in libsync.h to fix build of freedreno in Mesa [1] * disable cairo tests to avoid circular dependency when cairo uses libGL [2] * add TESTS option to install test programs which are always built * build libkms on all platforms, it need not be limited to x86 * cease disabling vmwgfx, which needed patching to build PR: 219420 [2] Reported by: strejda [1], maficccc@gmail.com [2] Approved by: swills (mentor) Differential Revision: https://reviews.freebsd.org/D10841 Changes: head/graphics/libdrm/Makefile head/graphics/libdrm/files/patch-libkms_vmwgfx.c head/graphics/libdrm/files/patch-libsync.h head/graphics/libdrm/pkg-plist