Open ShevaDavid opened 7 months ago
Hey, it looks like you don't have the XCB headers installed. You'll need the dev version of your distro's XCB library
On 24 March 2024 11:20:47 GMT, D @.***> wrote:
When I run
make
rm -f xoop cc -Wall -Wextra -pedantic -lxcb -lxcb-randr -lxcb-xinput -lxcb-xfixes xoop.c -o xoop xoop.c:27:10: fatal error: xcb/randr.h: No such file or directory 27 | #include <xcb/randr.h> | ^
~~~~ compilation terminated. make: *** [: xoop] Error 1 -- Reply to this email directly or view it on GitHub: https://github.com/m-col/xoop/issues/1 You are receiving this because you are subscribed to this thread.
Message ID: @.***>
Hi!
I installed the required libraries and still got compilation errors:
$ make
rm -f xoop
cc -Wall -Wextra -pedantic -lxcb -lxcb-randr -lxcb-xinput -lxcb-xfixes xoop.c -o xoop
xoop.c: In function โexit_angrilyโ:
xoop.c:53:5: warning: format not a string literal and no format arguments [-Wformat-security]
53 | fprintf(stderr, msg);
| ^~~~~~~
/usr/bin/ld: /tmp/ccqOwLTk.o: warning: relocation against `xcb_input_id' in read-only section `.text'
/usr/bin/ld: /tmp/ccqOwLTk.o: in function `exit_angrily':
xoop.c:(.text+0x36): undefined reference to `xcb_disconnect'
/usr/bin/ld: /tmp/ccqOwLTk.o: in function `create_barrier':
xoop.c:(.text+0x78): undefined reference to `xcb_generate_id'
/usr/bin/ld: xoop.c:(.text+0xb5): undefined reference to `xcb_xfixes_create_pointer_barrier_checked'
/usr/bin/ld: xoop.c:(.text+0xd0): undefined reference to `xcb_request_check'
/usr/bin/ld: /tmp/ccqOwLTk.o: in function `delete_barriers':
xoop.c:(.text+0x298): undefined reference to `xcb_xfixes_delete_pointer_barrier'
/usr/bin/ld: /tmp/ccqOwLTk.o: in function `exit_nicely':
xoop.c:(.text+0x2c7): undefined reference to `xcb_disconnect'
/usr/bin/ld: /tmp/ccqOwLTk.o: in function `check_xfixes':
xoop.c:(.text+0x2f6): undefined reference to `xcb_xfixes_query_version'
/usr/bin/ld: xoop.c:(.text+0x304): undefined reference to `xcb_xfixes_id'
/usr/bin/ld: xoop.c:(.text+0x30f): undefined reference to `xcb_get_extension_data'
/usr/bin/ld: /tmp/ccqOwLTk.o: in function `check_randr':
xoop.c:(.text+0x36a): undefined reference to `xcb_randr_id'
/usr/bin/ld: xoop.c:(.text+0x375): undefined reference to `xcb_get_extension_data'
/usr/bin/ld: xoop.c:(.text+0x3c8): undefined reference to `xcb_randr_select_input'
/usr/bin/ld: /tmp/ccqOwLTk.o: in function `check_xinput':
xoop.c:(.text+0x3f4): undefined reference to `xcb_input_id'
/usr/bin/ld: xoop.c:(.text+0x3ff): undefined reference to `xcb_get_extension_data'
/usr/bin/ld: xoop.c:(.text+0x45c): undefined reference to `xcb_input_xi_select_events'
/usr/bin/ld: /tmp/ccqOwLTk.o: in function `loop_cursor':
xoop.c:(.text+0x581): undefined reference to `xcb_warp_pointer'
/usr/bin/ld: /tmp/ccqOwLTk.o: in function `event_loop':
xoop.c:(.text+0x63a): undefined reference to `xcb_flush'
/usr/bin/ld: xoop.c:(.text+0x6a4): undefined reference to `xcb_flush'
/usr/bin/ld: xoop.c:(.text+0x6bf): undefined reference to `xcb_wait_for_event'
/usr/bin/ld: /tmp/ccqOwLTk.o: in function `main':
xoop.c:(.text+0x7ca): undefined reference to `xcb_connect'
/usr/bin/ld: xoop.c:(.text+0x7e0): undefined reference to `xcb_connection_has_error'
/usr/bin/ld: xoop.c:(.text+0x7fd): undefined reference to `xcb_get_setup'
/usr/bin/ld: xoop.c:(.text+0x805): undefined reference to `xcb_setup_roots_iterator'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
make: *** [<builtin>: xoop] Error 1
This is due to the Makefile itself: The libaries are included in CFLAGS, but they should be listed in LDLIBS. The order of the parameters for cc
matters, and as you can see in the cc -Wall -Werror ...
line above, the libraries are listed before xoop.c, but would need to be listed after xoop.c .
@m-col I'll send you a PR ๐ Edit: Here it is: https://github.com/m-col/xoop/pull/4
And of course, thank you for this amazing tool!
When I run
make
rm -f xoop cc -Wall -Wextra -pedantic -lxcb -lxcb-randr -lxcb-xinput -lxcb-xfixes xoop.c -o xoop xoop.c:27:10: fatal error: xcb/randr.h: No such file or directory 27 | #include <xcb/randr.h> | ^: xoop] Error 1
~~~~ compilation terminated. make: *** [