{"action":"created","issue":{"url":"https://api.github.com/repos/akozadaev/dwm-statusbar/issues/3","labels_url":"https://api.github.com/repos/akozadaev/dwm-statusbar/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/akozadaev/dwm-statusbar/issues/3/comments","events_url":"https://api.github.com/repos/akozadaev/dwm-statusbar/issues/3/events","html_url":"https://github.com/akozadaev/dwm-statusbar/issues/3","id":120619612,"number":3,"title":"Unable to compile on ubuntu.","user":{"login":"jamie-pate","id":682658,"avatar_url":"https://avatars.githubusercontent.com/u/682658?v=3","gravatar_id":"","url":"https://api.github.com/users/jamie-pate","html_url":"https://github.com/jamie-pate","followers_url":"https://api.github.com/users/jamie-pate/followers","following_url":"https://api.github.com/users/jamie-pate/following{/other_user}","gists_url":"https://api.github.com/users/jamie-pate/gists{/gist_id}","starred_url":"https://api.github.com/users/jamie-pate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamie-pate/subscriptions","organizations_url":"https://api.github.com/users/jamie-pate/orgs","repos_url":"https://api.github.com/users/jamie-pate/repos","events_url":"https://api.github.com/users/jamie-pate/events{/privacy}","received_events_url":"https://api.github.com/users/jamie-pate/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"akozadaev","id":578528,"avatar_url":"https://avatars.githubusercontent.com/u/578528?v=3","gravatar_id":"","url":"https://api.github.com/users/akozadaev","html_url":"https://github.com/akozadaev","followers_url":"https://api.github.com/users/akozadaev/followers","following_url":"https://api.github.com/users/akozadaev/following{/other_user}","gists_url":"https://api.github.com/users/akozadaev/gists{/gist_id}","starred_url":"https://api.github.com/users/akozadaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akozadaev/subscriptions","organizations_url":"https://api.github.com/users/akozadaev/orgs","repos_url":"https://api.github.com/users/akozadaev/repos","events_url":"https://api.github.com/users/akozadaev/events{/privacy}","received_events_url":"https://api.github.com/users/akozadaev/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-12-06T08:57:54Z","updated_at":"2015-12-07T03:57:41Z","closed_at":"2015-12-06T22:19:01Z","body":"It seems like the LFLAGS isn't quite in the correct spot for newer gcc? \r\n\r\n```\r\ngcc -Wall -std=c99 -pedantic -O3 -c statusbar.c\r\ngcc -lX11 -o statusbar statusbar.o\r\nstatusbar.o: In function `set_status':\r\nstatusbar.c:(.text+0x25): undefined reference to `XStoreName'\r\nstatusbar.o: In function `close_display':\r\nstatusbar.c:(.text+0x4c): undefined reference to `XCloseDisplay'\r\nstatusbar.o: In function `set_status':\r\nstatusbar.c:(.text+0x37): undefined reference to `XSync'\r\nstatusbar.o: In function `main':\r\nstatusbar.c:(.text.startup+0x92): undefined reference to `XOpenDisplay'\r\nstatusbar.c:(.text.startup+0x3be): undefined reference to `XStoreName'\r\nstatusbar.c:(.text.startup+0x3cc): undefined reference to `XSync'\r\ncollect2: error: ld returned 1 exit status\r\nMakefile:62: recipe for target 'statusbar' failed\r\nmake: *** [statusbar] Error 1\r\n```\r\nThis seems to fix the issue:\r\n```\r\ndiff --git a/Makefile b/Makefile\r\nindex 08945c8..7354c99 100644\r\n--- a/Makefile\r\n+++ b/Makefile\r\n@@ -59,7 +59,7 @@ install: release\r\n        @echo \"DONE\"\r\n \r\n ${TARGET}: build_host.h ${OBJ}\r\n-       ${CC} ${LFLAGS} -o $@ ${OBJ}\r\n+       ${CC} -o $@ ${OBJ} ${LFLAGS}\r\n \r\n %.o: %.c\r\n        ${CC} ${CFLAGS} -c $?\r\n```"},"comment":{"url":"https://api.github.com/repos/akozadaev/dwm-statusbar/issues/comments/162403422","html_url":"https://github.com/akozadaev/dwm-statusbar/issues/3#issuecomment-162403422","issue_url":"https://api.github.com/repos/akozadaev/dwm-statusbar/issues/3","id":162403422,"user":{"login":"jamie-pate","id":682658,"avatar_url":"https://avatars.githubusercontent.com/u/682658?v=3","gravatar_id":"","url":"https://api.github.com/users/jamie-pate","html_url":"https://github.com/jamie-pate","followers_url":"https://api.github.com/users/jamie-pate/followers","following_url":"https://api.github.com/users/jamie-pate/following{/other_user}","gists_url":"https://api.github.com/users/jamie-pate/gists{/gist_id}","starred_url":"https://api.github.com/users/jamie-pate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamie-pate/subscriptions","organizations_url":"https://api.github.com/users/jamie-pate/orgs","repos_url":"https://api.github.com/users/jamie-pate/repos","events_url":"https://api.github.com/users/jamie-pate/events{/privacy}","received_events_url":"https://api.github.com/users/jamie-pate/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T03:57:41Z","updated_at":"2015-12-07T03:57:41Z","body":"For reference: https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html says:\n\"It makes a difference where in the command you write this option; the\nlinker searches and processes libraries and object files in the order they\nare specified. Thus, ‘foo.o -lz bar.o’ searches library ‘z’ after\nfile foo.o but before bar.o. If bar.o refers to functions in ‘z’, those\nfunctions may not be loaded\"\n\nOn Sun, Dec 6, 2015, 2:19 PM Alex Kozadaev <notifications@github.com> wrote:\n\n> hmm... looks like that is correct. What a silly requirement. Oh well...\n> fixed anyway.\n> Thanks for reporting.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/akozadaev/dwm-statusbar/issues/3#issuecomment-162353866>\n> .\n>\n"}}