Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
I'm hoping this sub-board is appropriate for this question.
I'm having errors when doing a make for dwmblocks and I'm hoping this might find its way to a DWM user.
chris@mars:~/dwmblocks$ make
cp blocks.def.h blocks.h
cc `pkg-config --cflags x11 --libs x11` dwmblocks.c -o dwmblocks
/usr/bin/ld: /tmp/cc2DtK0H.o: in function `setroot':
dwmblocks.c:(.text+0x3d7): undefined reference to `XStoreName'
/usr/bin/ld: dwmblocks.c:(.text+0x3e6): undefined reference to `XFlush'
/usr/bin/ld: /tmp/cc2DtK0H.o: in function `setupX':
dwmblocks.c:(.text+0x3f9): undefined reference to `XOpenDisplay'
/usr/bin/ld: /tmp/cc2DtK0H.o: in function `main':
dwmblocks.c:(.text+0x6b9): undefined reference to `XCloseDisplay'
collect2: error: ld returned 1 exit status
make: *** [Makefile:5: output] Error 1
I appear to have all the bits in place since I don't have an issue compiling dwm.
Any help would be nice please.
All the functions which have produced linker errors are provided by the Xlib, what means that:
a) there's a problem with pkg-config: execute the following cmd in the terminal:
sudo ldconfig -v | grep X11 #update the caches and show the version of libX11 currently used by the linker.
sudo find / -name libX11.so* #find the location of the libX11
The location of X11 can be used to instruct the compiler and the linker where to search for the libs, f.e. -L/usr/lib/x86_64-linux-gnu/
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system." The_full_story and Nothing_have_changed
It means that the problem is with pkgconfig metadata in Sid/Ubuntu and *not* with the project -> it should be reported as a bug in Sid. (I'm assuming that it's Sid, judging by the cds60601's signature)
But anyway it's really strange - Xlib is one of the most fundamental libs - it's unbelievable that than someone have managed to break it ...
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system." The_full_story and Nothing_have_changed
chris@mars:~$ pkg-config --cflags x11 --libs x11
-lX11
chris@mars:~$ sudo ldconfig -v | grep X11 #update the caches and show the version of libX11 currently used by the linker.
[sudo] password for chris:
ldconfig: Can't stat /usr/local/lib/x86_64-linux-gnu: No such file or directory
ldconfig: Path `/usr/lib/x86_64-linux-gnu' given more than once
ldconfig: Path `/lib/x86_64-linux-gnu' given more than once
ldconfig: Path `/usr/lib/x86_64-linux-gnu' given more than once
ldconfig: Path `/usr/lib' given more than once
libQt5X11Extras.so.5 -> libQt5X11Extras.so.5.14.2
libX11.so.6 -> libX11.so.6.3.0
ldconfig: /lib/x86_64-linux-gnu/ld-2.31.so is the dynamic linker, ignoring
libX11-xcb.so.1 -> libX11-xcb.so.1.0.0
chris@mars:~$ sudo find / -name libX11.so* #find the location of the libX11
/usr/lib/x86_64-linux-gnu/libX11.so
/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
/usr/lib/x86_64-linux-gnu/libX11.so.6
chris@mars:~$
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system." The_full_story and Nothing_have_changed
That's interesting, because this is *NOT* a compiler error - it's the linker which is failing...
I was wrong - the problem is with the project, namely with the makefile - incorrect syntax for gcc: (but it would work in older versions)
Replace the "output" rule in the makefile with the following snippet:
The trick is that the order of arguments for GCC determines which options are passed to the linker (ld)
.
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system." The_full_story and Nothing_have_changed