Giter Club home page Giter Club logo

Comments (17)

milgra avatar milgra commented on August 15, 2024

Can you please try https://github.com/milgra/sov/releases/tag/0.62 ? popen should be in stdio.h so I explicitly import it in every file where it is needed, I hope that it solves this problem.

from sov.

milgra avatar milgra commented on August 15, 2024

for PATH_MAX errors please try to include <linux/limits.h> where <limits.h> is included, that should help, it seems that on void it's not in it's standard place.

from sov.

brihadeesh avatar brihadeesh commented on August 15, 2024

Can you please try https://github.com/milgra/sov/releases/tag/0.62 ? popen should be in stdio.h so I explicitly import it in every file where it is needed, I hope that it solves this problem.

I did but it persists for fontconfig.c

from sov.

brihadeesh avatar brihadeesh commented on August 15, 2024

for PATH_MAX errors please try to include <linux/limits.h> where <limits.h> is included, that should help, it seems that on void it's not in it's standard place.

I just checked with some of the package maintainers over at #xbps and they were fairly certain limits.h should work fine.

from sov.

putchar avatar putchar commented on August 15, 2024

Hello
I am trying to package sov in nix and i am facing the same issue with the same error log

I was not sure so I decided to try a build in a fresh ubuntu22.04 virtual machine and I got the same error

putchar@ubuntu22:~/sov$ ninja -C build
ninja: Entering directory `build'
[17/60] Compiling C object sov.p/src_sov_config_fontconfig.c.o
../src/sov/config/fontconfig.c: In function ‘fontconfig_new_path’:
../src/sov/config/fontconfig.c:23:21: warning: implicit declaration of function ‘popen’; did you mean ‘fopen’? [-Wimplicit-function-declaration]
   23 |     FILE* pipe    = popen(command, "r");                                    // CLOSE 0
      |                     ^~~~~
      |                     fopen
../src/sov/config/fontconfig.c:23:21: warning: initialization of ‘FILE *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
../src/sov/config/fontconfig.c:27:5: warning: implicit declaration of function ‘pclose’; did you mean ‘fclose’? [-Wimplicit-function-declaration]
   27 |     pclose(pipe); // CLOSE 0
      |     ^~~~~~
      |     fclose
../src/sov/config/fontconfig.c:33:22: warning: initialization of ‘FILE *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   33 |         FILE* pipe = popen(command, "r");                                   // CLOSE 1
      |                      ^~~~~
../src/sov/config/fontconfig.c:43:26: warning: initialization of ‘FILE *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   43 |             FILE* pipe = popen(command, "r");                    // CLOSE 2
      |                          ^~~~~
[21/60] Compiling C object sov.p/src_modules_storage_kvlines.c.o
FAILED: sov.p/src_modules_storage_kvlines.c.o 
cc -Isov.p -I. -I.. -I../src/sov/config -I../src/sov/tree -I../src/modules/json -I../src/modules/storage -I../src/modules/zen_core -I../src/modules/zen_text -I/usr/include/freetype2 -I/usr/include/libpng16 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c99 -g '-DSOV_VERSION="0.62"' -DDEBUG -MD -MQ sov.p/src_modules_storage_kvlines.c.o -MF sov.p/src_modules_storage_kvlines.c.o.d -o sov.p/src_modules_storage_kvlines.c.o -c ../src/modules/storage/kvlines.c
../src/modules/storage/kvlines.c: In function ‘kvlines_write’:
../src/modules/storage/kvlines.c:102:34: error: ‘PATH_MAX’ undeclared (first use in this function)
  102 |     char* path = cstr_new_format(PATH_MAX + NAME_MAX, "%snew", libpath); // REL 0
      |                                  ^~~~~~~~
../src/modules/storage/kvlines.c:102:34: note: each undeclared identifier is reported only once for each function it appears in
../src/modules/storage/kvlines.c:102:45: error: ‘NAME_MAX’ undeclared (first use in this function)
  102 |     char* path = cstr_new_format(PATH_MAX + NAME_MAX, "%snew", libpath); // REL 0
      |                                             ^~~~~~~~
[23/60] Compiling C object sov.p/src_modules_zen_core_zc_bitmap.c.o
ninja: build stopped: subcommand failed.

from sov.

brihadeesh avatar brihadeesh commented on August 15, 2024

Looks like there are some includes missing. It's definitely odd that the AUR package seems to be building fine.

from sov.

hissssst avatar hissssst commented on August 15, 2024

Experiencing exactly the same issue

from sov.

putchar avatar putchar commented on August 15, 2024

doing this sed on the following files fixed it for me

sed -i '/^#include <limits.h>/a#include <linux/limits.h>' \
      src/sov/main.c \
      src/sov/config/config.c \
      src/sov/tree_test.c \
      src/modules/zen_core/zc_cstrpath.c \
      src/modules/storage/kvlines.c

from sov.

milgra avatar milgra commented on August 15, 2024

I don't want to use linux/limits.h but I can add "linux" as an include directory if exists, I will try it on ubuntu/void.

from sov.

brihadeesh avatar brihadeesh commented on August 15, 2024

@putchar does it run after the sed? Just tried with Void and sov segfaults if run.

from sov.

putchar avatar putchar commented on August 15, 2024

@putchar does it run after the sed? Just tried with Void and sov segfaults if run.

Hello
I am doing the sed during the packaging in nix (just before the build) https://gitlab.com/putchar/dotnix/-/blob/main/Home-Manager/modules/sway/sov.nix
I can confirm sov works when i use it in nixos

from sov.

brihadeesh avatar brihadeesh commented on August 15, 2024

I am doing the sed during the packaging in nix (just before the build) https://gitlab.com/putchar/dotnix/-/blob/main/Home-Manager/modules/sway/sov.nix

Same, I've added a patch that runs prior to packaging on Void.

from sov.

brihadeesh avatar brihadeesh commented on August 15, 2024

@milgra Two things I wanted to add:

  1. Some people over at #xbps (IRC for Void Linux package maintainers) suggested not to use <linux/limits.h> as opposed to just <limits.h> although as I said before build and packaging runs fine when I do as you'd suggested earlier
  2. On replacing <limits.h> with <linux/limits.h> and installing the package generated, sov seems to segfault with the following error
swayoverview v0.62 by Milan Toth ( www.milgra.com )
listens on standard input for '0' - hide panel '1' - show panel '2' - quit
1651475406.854064 DEBUG ../src/modules/zen_core/zc_log.c:145: Set log level to DEBUG
1651475406.854800 INFO  ../src/sov/main.c:737: Using config file : /usr/share/sov/config

Segmentation fault

Any suggestions?

from sov.

milgra avatar milgra commented on August 15, 2024

Hi, I will install a void linux this week and figure this out.

from sov.

brihadeesh avatar brihadeesh commented on August 15, 2024

Great thanks! Hope this isn't too much trouble.

from sov.

milgra avatar milgra commented on August 15, 2024

Okay, please try the latest version ( 0.63 ), it worked for me on Void. There were two issues : on some linux distros the standard limits.h doesn't contain PATH_MAX so I had to add linux/limits.h - which is the part of the linux-headers package usually. The other thing is that GCC needs an exact _POSIX_C_SOURCE version definition to be able to compile pipe in stdio.h and CLANG - that I use - doesn't need it so I added it to the code. Hope it works.

from sov.

brihadeesh avatar brihadeesh commented on August 15, 2024

Great, this fixes it! Closing.

from sov.

Related Issues (20)

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.