我已经仔细检查过我是否具有构建 X 的所有依赖项,并且它们都是最新版本。我什至不知道从哪里开始处理这些错误,所以我希望这里有人可以帮助我。如果重要的话,在 WSL2 上编译。
使用build.sh方法进行编译。
这是我正在使用的命令:
./util/modular/build.sh --clone $HOME/Xbuild
这是错误:
/home/mason/lx-os/cross-tools/lib/gcc/x86_64-unknown-linux-gnu/9.3.0/../../../../x86_64-unknown-linux-gnu/bin/ld: warning: libXau.so.6, needed by /home/mason/Xbuild/lib/libxcb.so, not found (try using -rpath or -rpath-link)
/home/mason/lx-os/cross-tools/lib/gcc/x86_64-unknown-linux-gnu/9.3.0/../../../../x86_64-unknown-linux-gnu/bin/ld: warning: libXdmcp.so.6, needed by /home/mason/Xbuild/lib/libxcb.so, not found (try using -rpath or -rpath-link)
/home/mason/lx-os/cross-tools/lib/gcc/x86_64-unknown-linux-gnu/9.3.0/../../../../x86_64-unknown-linux-gnu/bin/ld: warning: libxcb-shm.so.0, needed by ../image/.libs/libxcb-image.so, not found (try using -rpath or -rpath-link)
/home/mason/lx-os/cross-tools/lib/gcc/x86_64-unknown-linux-gnu/9.3.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /home/mason/Xbuild/lib/libxcb.so: undefined reference to `XauGetBestAuthByAddr'
/home/mason/lx-os/cross-tools/lib/gcc/x86_64-unknown-linux-gnu/9.3.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../image/.libs/libxcb-image.so: undefined reference to `xcb_shm_put_image'
/home/mason/lx-os/cross-tools/lib/gcc/x86_64-unknown-linux-gnu/9.3.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /home/mason/Xbuild/lib/libxcb.so: undefined reference to `XauDisposeAuth'
/home/mason/lx-os/cross-tools/lib/gcc/x86_64-unknown-linux-gnu/9.3.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../image/.libs/libxcb-image.so: undefined reference to `xcb_shm_get_image'
/home/mason/lx-os/cross-tools/lib/gcc/x86_64-unknown-linux-gnu/9.3.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /home/mason/Xbuild/lib/libxcb.so: undefined reference to `XdmcpWrap'
/home/mason/lx-os/cross-tools/lib/gcc/x86_64-unknown-linux-gnu/9.3.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../image/.libs/libxcb-image.so: undefined reference to `xcb_shm_get_image_reply'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:648: test_xcb_image] Error 1
我以为跑步sudo ldconfig
可以解决这个问题,但事实并非如此。
答案1
以 root 身份运行构建脚本解决了这个问题。