GithubHelp home page GithubHelp logo

dwm-statusbar's People

Contributors

segordon avatar snobb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dwm-statusbar's Issues

Segmentation fault whenever I run statusbar

Whenever I run statusbar it suffers a segmentation fault and ends abruptely. Everything is using the default configuration except the wireless interface name (set to wlp1s0), the compiler (set to cc) and the installation path (set to /usr/bin).

the "build_host.h" file generates the following:
#define BUILD_HOST "arch" #define BUILD_OS "Linux" #define BUILD_PLATFORM "x86_64" #define BUILD_KERNEL "4.15.15-1-ARCH" #define BUILD_VERSION "37.a855ee7" #define BAT_NOW "/charge_now" #define BAT_FULL "/charge_full" #define BAT_STAT "/status" #define LNK_PATH "/sys/class/net/wlp1s0/operstate"

Unable to compile on ubuntu.

It seems like the LFLAGS isn't quite in the correct spot for newer gcc?

gcc -Wall -std=c99 -pedantic -O3 -c statusbar.c
gcc -lX11 -o statusbar statusbar.o
statusbar.o: In function `set_status':
statusbar.c:(.text+0x25): undefined reference to `XStoreName'
statusbar.o: In function `close_display':
statusbar.c:(.text+0x4c): undefined reference to `XCloseDisplay'
statusbar.o: In function `set_status':
statusbar.c:(.text+0x37): undefined reference to `XSync'
statusbar.o: In function `main':
statusbar.c:(.text.startup+0x92): undefined reference to `XOpenDisplay'
statusbar.c:(.text.startup+0x3be): undefined reference to `XStoreName'
statusbar.c:(.text.startup+0x3cc): undefined reference to `XSync'
collect2: error: ld returned 1 exit status
Makefile:62: recipe for target 'statusbar' failed
make: *** [statusbar] Error 1

This seems to fix the issue:

diff --git a/Makefile b/Makefile
index 08945c8..7354c99 100644
--- a/Makefile
+++ b/Makefile
@@ -59,7 +59,7 @@ install: release
        @echo "DONE"

 ${TARGET}: build_host.h ${OBJ}
-       ${CC} ${LFLAGS} -o $@ ${OBJ}
+       ${CC} -o $@ ${OBJ} ${LFLAGS}

 %.o: %.c
        ${CC} ${CFLAGS} -c $?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.