在 Fedora 15 x86_64 上编译 wmii

发布于 2024-11-12 07:08:36 字数 2449 浏览 2 评论 0原文

我在 Fedora 15 上编译 wmii v3.9.2 时遇到问题;这是有趣的部分(事情在链接阶段崩溃):

% bmake -de
MAKE all libbio/
MAKE all libfmt/
MAKE all libregexp/                                                       
MAKE all libutf/
MAKE all libixp/
MAKE all doc/
MAKE all man/
MAKE all cmd/
MAKE all cmd/wmii/
MAKE all cmd/menu/
LD cmd/wmii9menu.out
/usr/bin/ld: wmii/xext.o: undefined reference to symbol 'XRenderFindVisualFormat'
/usr/bin/ld: note: 'XRenderFindVisualFormat' is defined in DSO /usr/lib64/libXrender.so.1 so try adding it to the linker command line
/usr/lib64/libXrender.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

*** Failed target:  wmii9menu.out
*** Failed command: ../util/link "cc" "$(pkg-config --libs 2>/dev/null) -g -L../lib -L/usr/lib64 ../lib/libregexp9.a ../lib/libbio.a ../lib/libfmt.a       ../lib/libutf.a -L../lib -L/usr/lib64 ../lib/libregexp9.a ../lib/libbio.a ../lib/libfmt.a ../lib/libutf.a" wmii9menu.out wmii9menu.o clientutil.o wmii/x11.o   wmii/xext.o wmii/geom.o wmii/map.o util.o ../lib/libixp.a $(pkg-config --libs xft xrandr xinerama) -lXext
*** Error code 1

Stop.
bmake: stopped in /srv/redhat/BUILD/wmii+ixp-3.9.2/cmd

*** Failed target:  dall
*** Failed command: dirs="libbio libfmt libregexp libutf libixp doc man cmd libwmii_hack rc alternative_wmiircs"; set -e; targ=dall; targ=${targ#d}; for i in $dirs; do export WMII_HGVERSION=""; export BASE=$i/; if [ ! -d $i ]; then echo Skipping nonexistent directory: $i 1>&2; else echo MAKE $targ $BASE; (cd $i  && bmake $targ) || exit ; fi; done
*** Error code 1

Stop.
bmake: stopped in /srv/redhat/BUILD/wmii+ixp-3.9.2

最后,在 config.mk 中,我有以下设置:

...
INCLUDES = -I. -I$(ROOT)/include -I$(INCLUDE) -I/usr/include
LIBS = -L$(ROOT)/lib -L/usr/lib64
...                                                                           
LDFLAGS += -g $(LIBS)
SOLDFLAGS += $(LDFLAGS)
SHARED = -shared -Wl,-soname=$(SONAME)
STATIC = -static
...

通过更多的手动解决,生成错误的语句基本上如下:

gcc \
    -o wmii9menu.out\
    -L../lib -L/usr/lib $(pkg-config --libs xft xrandr xinerama xext)\
    ../lib/libregexp9.a ../lib/libbio.a ../lib/libfmt.a\
    ../lib/libutf.a ../lib/libixp.a\
    wmii9menu.o clientutil.o util.o\
    wmii/x11.o wmii/xext.o wmii/geom.o wmii/map.o

这里,pkg-config解析为以下内容,其本身是完全正确的:

-lXft -lXrandr -lXinerama -lXext  

I'm having trouble compiling wmii v3.9.2 on Fedora 15; Here's the interesting part (things break down at the linking stage):

% bmake -de
MAKE all libbio/
MAKE all libfmt/
MAKE all libregexp/                                                       
MAKE all libutf/
MAKE all libixp/
MAKE all doc/
MAKE all man/
MAKE all cmd/
MAKE all cmd/wmii/
MAKE all cmd/menu/
LD cmd/wmii9menu.out
/usr/bin/ld: wmii/xext.o: undefined reference to symbol 'XRenderFindVisualFormat'
/usr/bin/ld: note: 'XRenderFindVisualFormat' is defined in DSO /usr/lib64/libXrender.so.1 so try adding it to the linker command line
/usr/lib64/libXrender.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

*** Failed target:  wmii9menu.out
*** Failed command: ../util/link "cc" "$(pkg-config --libs 2>/dev/null) -g -L../lib -L/usr/lib64 ../lib/libregexp9.a ../lib/libbio.a ../lib/libfmt.a       ../lib/libutf.a -L../lib -L/usr/lib64 ../lib/libregexp9.a ../lib/libbio.a ../lib/libfmt.a ../lib/libutf.a" wmii9menu.out wmii9menu.o clientutil.o wmii/x11.o   wmii/xext.o wmii/geom.o wmii/map.o util.o ../lib/libixp.a $(pkg-config --libs xft xrandr xinerama) -lXext
*** Error code 1

Stop.
bmake: stopped in /srv/redhat/BUILD/wmii+ixp-3.9.2/cmd

*** Failed target:  dall
*** Failed command: dirs="libbio libfmt libregexp libutf libixp doc man cmd libwmii_hack rc alternative_wmiircs"; set -e; targ=dall; targ=${targ#d}; for i in $dirs; do export WMII_HGVERSION=""; export BASE=$i/; if [ ! -d $i ]; then echo Skipping nonexistent directory: $i 1>&2; else echo MAKE $targ $BASE; (cd $i  && bmake $targ) || exit ; fi; done
*** Error code 1

Stop.
bmake: stopped in /srv/redhat/BUILD/wmii+ixp-3.9.2

Finally, in config.mk, I have the following settings:

...
INCLUDES = -I. -I$(ROOT)/include -I$(INCLUDE) -I/usr/include
LIBS = -L$(ROOT)/lib -L/usr/lib64
...                                                                           
LDFLAGS += -g $(LIBS)
SOLDFLAGS += $(LDFLAGS)
SHARED = -shared -Wl,-soname=$(SONAME)
STATIC = -static
...

With a little more manual resolution, the statement generating the error is essentially as follows:

gcc \
    -o wmii9menu.out\
    -L../lib -L/usr/lib $(pkg-config --libs xft xrandr xinerama xext)\
    ../lib/libregexp9.a ../lib/libbio.a ../lib/libfmt.a\
    ../lib/libutf.a ../lib/libixp.a\
    wmii9menu.o clientutil.o util.o\
    wmii/x11.o wmii/xext.o wmii/geom.o wmii/map.o

Here, the pkg-config resolves to the following, which by itself is perfectly correct:

-lXft -lXrandr -lXinerama -lXext  

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

似狗非友 2024-11-19 07:08:36

解决方案如下:

--- wmii+ixp-3.9.2/config.mk   2011-06-03 14:03:22.950163074 +1000
+++ wmii+ixp-3.9.2/config.mk   2011-06-03 14:03:16.086129011 +1000
@@ -32 +32 @@
-X11PACKAGES = xft
+X11PACKAGES = xft xext xrandr xrender xinerama

And the solution is as follows:

--- wmii+ixp-3.9.2/config.mk   2011-06-03 14:03:22.950163074 +1000
+++ wmii+ixp-3.9.2/config.mk   2011-06-03 14:03:16.086129011 +1000
@@ -32 +32 @@
-X11PACKAGES = xft
+X11PACKAGES = xft xext xrandr xrender xinerama
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文