Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

Build fails on ArchLinux #26

Closed
ghost opened this issue Jan 5, 2015 · 13 comments
Closed

Build fails on ArchLinux #26

ghost opened this issue Jan 5, 2015 · 13 comments

Comments

@ghost
Copy link

ghost commented Jan 5, 2015

When building i3-gaps-git from the AUR, the build process fails at ipc.c with the following error(s):

[i3] CC src/ipc.c
In file included from ../i3/src/ipc.c:13:0:
../i3/src/ipc.c: In function ‘handle_get_version’:
include/yajl_utils.h:17:53: error: expected expression before ‘)’ token
 #define y(x, ...) yajl_gen_ ## x (gen, ##__VA_ARGS__)
                                                     ^
../i3/src/ipc.c:741:5: note: in expansion of macro ‘y’
     y(integer, MAJOR_VERSION);
     ^
include/yajl_utils.h:17:53: error: expected expression before ‘)’ token
 #define y(x, ...) yajl_gen_ ## x (gen, ##__VA_ARGS__)
                                                     ^
../i3/src/ipc.c:744:5: note: in expansion of macro ‘y’
     y(integer, MINOR_VERSION);
     ^
src/i3.mk:36: recipe for target 'src/ipc.o' failed

The same occurs when building from a cloned repository.

@ninja-coding
Copy link

Same happens to me, on both branches i3-gaps and i3-gaps-next

@Airblader
Copy link
Owner

Two people on reddit reported the same. One of them could fix it again later, for no apparent reason (http://www.reddit.com/r/unixporn/comments/2qkdfm/i3_with_gaps_m_and_no_status_bar/cn7jeew).

Could you please try compiling vanilla i3? I have no clue on why this would be an issue of my fork. If you can't compile vanilla i3 either, it's an i3 issue.

cd /tmp && git clone git://code.i3wm.org/i3 && cd i3
make

It could be a compiler issue. You definitely need gcc to compile it. I've compiled it successfully on Manjaro before, haven't tried it on Arch yet.

@ninja-coding
Copy link

vanilla i3 compiles fine for me, trying to compile your branch gives me the same error as @skoftoby but the first line is this one:

fatal: No names found, cannot describe anything.

not sure if it's relevant, running gcc --version outputs

gcc (GCC) 4.9.2 20141224 (prerelease)

@ghost
Copy link
Author

ghost commented Jan 6, 2015

Vanilla i3 builds and runs perfectly fine, gcc version is the same as @ninja-coding's.

@Airblader
Copy link
Owner

I think this might have something to do with the fact that I deleted all tags. Can someone try adding a tag to the latest commit (just for the sake of having one) and building again?

@Airblader
Copy link
Owner

Removing all tags locally, I can reproduce the issue. You can fix it by running a dummy git tag 1.0 and then recompiling. I'll push a fix for this soon.

@magebeans
Copy link

Pardon my ignorance, but what exactly does adding the tags do that makes it compile alright?

@akolosov
Copy link

akolosov commented Jan 6, 2015

git tag 1.0 and make clean && make

@magebeans
Copy link

Yes, but why does that help? I can't see how adding tags makes it compile.

@ninja-coding
Copy link

It compiled fine adding a tag, this is so weird

@Airblader
Copy link
Owner

i3 compiles a version string and the like. For this it uses git describe --tags which will fail if there is no tag.

Now, the make process will set some (environment / compile?) variables which due to the failed command are empty. This causes the compilation of the macro to fail.

@Airblader
Copy link
Owner

I just merged and pushed all upstream tags. You should probably remove the fake tag again.

@sph432
Copy link

sph432 commented Mar 14, 2019

Ran into the same problem, the cause was that older (in my case, 1.8.3) git versions do not recognise the -C option.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants