Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yabar: fix build #42346

Merged
merged 1 commit into from Jun 22, 2018
Merged

yabar: fix build #42346

merged 1 commit into from Jun 22, 2018

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Jun 21, 2018

Motivation for this change

The stable build for yabar is currently broken: https://hydra.nixos.org/build/75989172

Main reason is that the inline function ya_setup_prefix_suffix is
supposed to be an inline function, but was insufficiently declared as
such which broke the compiler recently with the following message:

gcc -std=c99 -Iinclude -pedantic -Wall -Os `pkg-config --cflags pango pangocairo libconfig` -DVERSION=\"0.4.0\" -D_POSIX_C_SOURCE=199309L -DYA_INTERNAL -DYA_DYN_COL -DYA_ENV_VARS -DYA_INTERNAL_EWMH  -c -o src/intern_blks/ya_intern.o src/intern_blks/ya_intern.c
gcc -o yabar src/ya_main.o src/ya_draw.o src/ya_exec.o src/ya_parse.o src/intern_blks/ya_intern.o -lxcb -lpthread -lxcb-randr -lxcb-ewmh `pkg-config --libs pango pangocairo libconfig`
src/intern_blks/ya_intern.o: In function `ya_int_date':
ya_intern.c:(.text+0x49): undefined reference to `ya_setup_prefix_suffix'
src/intern_blks/ya_intern.o: In function `ya_int_uptime':
ya_intern.c:(.text+0xf4): undefined reference to `ya_setup_prefix_suffix'
src/intern_blks/ya_intern.o: In function `ya_int_brightness':
ya_intern.c:(.text+0x1d8): undefined reference to `ya_setup_prefix_suffix'
src/intern_blks/ya_intern.o: In function `ya_int_bandwidth':
ya_intern.c:(.text+0x377): undefined reference to `ya_setup_prefix_suffix'
src/intern_blks/ya_intern.o: In function `ya_int_cpu':
ya_intern.c:(.text+0x6de): undefined reference to `ya_setup_prefix_suffix'
src/intern_blks/ya_intern.o:ya_intern.c:(.text+0x924): more undefined references to `ya_setup_prefix_suffix' follow
collect2: error: ld returned 1 exit status
make: *** [Makefile:18: yabar] Error 1

This issue has been fixed on master (see
geommer/yabar@9779a5e)
which is why nixos.yabar-unstable remained functional.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

The stable build for `yabar` is currently broken: https://hydra.nixos.org/build/75989172

Main reason is that the inline function `ya_setup_prefix_suffix` is
supposed to be an inline function, but was insufficiently declared as
such which broke the compiler recently with the following message:

```
gcc -std=c99 -Iinclude -pedantic -Wall -Os `pkg-config --cflags pango pangocairo libconfig` -DVERSION=\"0.4.0\" -D_POSIX_C_SOURCE=199309L -DYA_INTERNAL -DYA_DYN_COL -DYA_ENV_VARS -DYA_INTERNAL_EWMH  -c -o src/intern_blks/ya_intern.o src/intern_blks/ya_intern.c
gcc -o yabar src/ya_main.o src/ya_draw.o src/ya_exec.o src/ya_parse.o src/intern_blks/ya_intern.o -lxcb -lpthread -lxcb-randr -lxcb-ewmh `pkg-config --libs pango pangocairo libconfig`
src/intern_blks/ya_intern.o: In function `ya_int_date':
ya_intern.c:(.text+0x49): undefined reference to `ya_setup_prefix_suffix'
src/intern_blks/ya_intern.o: In function `ya_int_uptime':
ya_intern.c:(.text+0xf4): undefined reference to `ya_setup_prefix_suffix'
src/intern_blks/ya_intern.o: In function `ya_int_brightness':
ya_intern.c:(.text+0x1d8): undefined reference to `ya_setup_prefix_suffix'
src/intern_blks/ya_intern.o: In function `ya_int_bandwidth':
ya_intern.c:(.text+0x377): undefined reference to `ya_setup_prefix_suffix'
src/intern_blks/ya_intern.o: In function `ya_int_cpu':
ya_intern.c:(.text+0x6de): undefined reference to `ya_setup_prefix_suffix'
src/intern_blks/ya_intern.o:ya_intern.c:(.text+0x924): more undefined references to `ya_setup_prefix_suffix' follow
collect2: error: ld returned 1 exit status
make: *** [Makefile:18: yabar] Error 1
```

This issue has been fixed on master (see
geommer/yabar@9779a5e)
which is why `nixos.yabar-unstable` remained functional.
@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: yabar

Partial log (click to expand)

glibPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/32pp4fyar8srlch0zggvw67d992xy6iy-yabar-0.4.0
shrinking /nix/store/32pp4fyar8srlch0zggvw67d992xy6iy-yabar-0.4.0/bin/yabar
gzipping man pages under /nix/store/32pp4fyar8srlch0zggvw67d992xy6iy-yabar-0.4.0/share/man/
strip is /nix/store/min150lkigznaayzpwvf8d4jdl1dqvx6-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/32pp4fyar8srlch0zggvw67d992xy6iy-yabar-0.4.0/bin
patching script interpreter paths in /nix/store/32pp4fyar8srlch0zggvw67d992xy6iy-yabar-0.4.0
checking for references to /build in /nix/store/32pp4fyar8srlch0zggvw67d992xy6iy-yabar-0.4.0...
/nix/store/32pp4fyar8srlch0zggvw67d992xy6iy-yabar-0.4.0

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: yabar

Partial log (click to expand)

glibPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/ll23f180rfyi5wgfy8na2ndycvkrbp8k-yabar-0.4.0
shrinking /nix/store/ll23f180rfyi5wgfy8na2ndycvkrbp8k-yabar-0.4.0/bin/yabar
gzipping man pages under /nix/store/ll23f180rfyi5wgfy8na2ndycvkrbp8k-yabar-0.4.0/share/man/
strip is /nix/store/4mf2xm9p32lzrim927yk92xhx35yaz62-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/ll23f180rfyi5wgfy8na2ndycvkrbp8k-yabar-0.4.0/bin
patching script interpreter paths in /nix/store/ll23f180rfyi5wgfy8na2ndycvkrbp8k-yabar-0.4.0
checking for references to /build in /nix/store/ll23f180rfyi5wgfy8na2ndycvkrbp8k-yabar-0.4.0...
/nix/store/ll23f180rfyi5wgfy8na2ndycvkrbp8k-yabar-0.4.0

@pSub pSub merged commit 11a0d13 into NixOS:master Jun 22, 2018
@Ma27 Ma27 deleted the fix-yabar branch June 22, 2018 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants