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

Make failure #1

Closed
dmcdougall opened this issue Sep 28, 2013 · 4 comments
Closed

Make failure #1

dmcdougall opened this issue Sep 28, 2013 · 4 comments

Comments

@dmcdougall
Copy link

$ make install PREFIX=$HOME/yetris SCOREDIR=$HOME/yetris
# Compiling src/engine.c...
# Compiling src/piece.c...
# Compiling src/game.c...
# Compiling src/main.c...
# Compiling src/timer.c...
src/timer.c:70: error: conflicting types for ‘timer_delta_us’
src/timer.h:72: error: previous declaration of ‘timer_delta_us’ was here
make: *** [obj/timer.o] Error 1
@alexdantas
Copy link
Owner

Hello, dmcdougall! So sorry for taking this long to answer you :(

I've tried to replicate this error on three different machines but to no avail.
Have you downloaded the latest version from github?
Could you post the verbose output of $ make V=1?

@dmcdougall
Copy link
Author

$ make install PREFIX=$HOME/yetris SCOREDIR=$HOME/yetris V=1
# Compiling src/engine.c...
gcc  -Wall -Wextra -O2  src/engine.c -c -o obj/engine.o -DVERSION=\""1.6"\" -DPACKAGE=\""yetris"\" -DDATE=\""December2013"\" -DSCORE_FILE=\""yetris.scores"\" -DCONFIG_FILE=\""config.ini"\"
# Compiling src/piece.c...
gcc  -Wall -Wextra -O2  src/piece.c -c -o obj/piece.o -DVERSION=\""1.6"\" -DPACKAGE=\""yetris"\" -DDATE=\""December2013"\" -DSCORE_FILE=\""yetris.scores"\" -DCONFIG_FILE=\""config.ini"\"
# Compiling src/game.c...
gcc  -Wall -Wextra -O2  src/game.c -c -o obj/game.o -DVERSION=\""1.6"\" -DPACKAGE=\""yetris"\" -DDATE=\""December2013"\" -DSCORE_FILE=\""yetris.scores"\" -DCONFIG_FILE=\""config.ini"\"
# Compiling src/main.c...
gcc  -Wall -Wextra -O2  src/main.c -c -o obj/main.o -DVERSION=\""1.6"\" -DPACKAGE=\""yetris"\" -DDATE=\""December2013"\" -DSCORE_FILE=\""yetris.scores"\" -DCONFIG_FILE=\""config.ini"\"
# Compiling src/timer.c...
gcc  -Wall -Wextra -O2  src/timer.c -c -o obj/timer.o -DVERSION=\""1.6"\" -DPACKAGE=\""yetris"\" -DDATE=\""December2013"\" -DSCORE_FILE=\""yetris.scores"\" -DCONFIG_FILE=\""config.ini"\"
src/timer.c:69:13: error: conflicting types for ‘timer_delta_us’
 suseconds_t timer_delta_us (timer_s* t)
             ^
In file included from src/timer.c:33:0:
src/timer.h:72:6: note: previous declaration of ‘timer_delta_us’ was here
 long timer_delta_us(timer_s* t);
      ^
make: *** [obj/timer.o] Error 1

alexdantas added a commit that referenced this issue Dec 25, 2013
@alexdantas
Copy link
Owner

Alright, sorry for taking this long to answer! I found out the error, real dumb mistake of mine.

It should be fixed now, can you confirm? If so, close this issue please.

Btw, credited you on the README :)

@dmcdougall
Copy link
Author

No need to apologise. I know how it is. I tried again and the compilation succeeds, but the linking fails:

$ make install PREFIX=$HOME/yetris SCOREDIR=$HOME/yetris V=1
# Compiling src/engine.c...
gcc  -Wall -Wextra -O2  src/engine.c -c -o obj/engine.o -DVERSION=\""1.6"\" -DPACKAGE=\""yetris"\" -DDATE=\""December2013"\" -DSCORE_FILE=\""yetris.scores"\" -DCONFIG_FILE=\""config.ini"\"
# Compiling src/piece.c...
gcc  -Wall -Wextra -O2  src/piece.c -c -o obj/piece.o -DVERSION=\""1.6"\" -DPACKAGE=\""yetris"\" -DDATE=\""December2013"\" -DSCORE_FILE=\""yetris.scores"\" -DCONFIG_FILE=\""config.ini"\"
# Compiling src/game.c...
gcc  -Wall -Wextra -O2  src/game.c -c -o obj/game.o -DVERSION=\""1.6"\" -DPACKAGE=\""yetris"\" -DDATE=\""December2013"\" -DSCORE_FILE=\""yetris.scores"\" -DCONFIG_FILE=\""config.ini"\"
# Compiling src/main.c...
gcc  -Wall -Wextra -O2  src/main.c -c -o obj/main.o -DVERSION=\""1.6"\" -DPACKAGE=\""yetris"\" -DDATE=\""December2013"\" -DSCORE_FILE=\""yetris.scores"\" -DCONFIG_FILE=\""config.ini"\"
# Compiling src/timer.c...
gcc  -Wall -Wextra -O2  src/timer.c -c -o obj/timer.o -DVERSION=\""1.6"\" -DPACKAGE=\""yetris"\" -DDATE=\""December2013"\" -DSCORE_FILE=\""yetris.scores"\" -DCONFIG_FILE=\""config.ini"\"
# Compiling src/board.c...
gcc  -Wall -Wextra -O2  src/board.c -c -o obj/board.o -DVERSION=\""1.6"\" -DPACKAGE=\""yetris"\" -DDATE=\""December2013"\" -DSCORE_FILE=\""yetris.scores"\" -DCONFIG_FILE=\""config.ini"\"
# Compiling src/block.c...
gcc  -Wall -Wextra -O2  src/block.c -c -o obj/block.o -DVERSION=\""1.6"\" -DPACKAGE=\""yetris"\" -DDATE=\""December2013"\" -DSCORE_FILE=\""yetris.scores"\" -DCONFIG_FILE=\""config.ini"\"
# Compiling src/globals.c...
gcc  -Wall -Wextra -O2  src/globals.c -c -o obj/globals.o -DVERSION=\""1.6"\" -DPACKAGE=\""yetris"\" -DDATE=\""December2013"\" -DSCORE_FILE=\""yetris.scores"\" -DCONFIG_FILE=\""config.ini"\"
# Compiling src/arguments.c...
gcc  -Wall -Wextra -O2  src/arguments.c -c -o obj/arguments.o -DVERSION=\""1.6"\" -DPACKAGE=\""yetris"\" -DDATE=\""December2013"\" -DSCORE_FILE=\""yetris.scores"\" -DCONFIG_FILE=\""config.ini"\"
# Compiling src/config.c...
gcc  -Wall -Wextra -O2  src/config.c -c -o obj/config.o -DVERSION=\""1.6"\" -DPACKAGE=\""yetris"\" -DDATE=\""December2013"\" -DSCORE_FILE=\""yetris.scores"\" -DCONFIG_FILE=\""config.ini"\"
# Compiling src/hscore.c...
gcc  -Wall -Wextra -O2  src/hscore.c -c -o obj/hscore.o -DVERSION=\""1.6"\" -DPACKAGE=\""yetris"\" -DDATE=\""December2013"\" -DSCORE_FILE=\""yetris.scores"\" -DCONFIG_FILE=\""config.ini"\"
# Compiling iniparser...
gcc -O2 -fPIC -Wall -ansi -pedantic -Wextra src/iniparser/iniparser.c  -c -o obj/iniparser.o
gcc -O2 -fPIC -Wall -ansi -pedantic -Wextra src/iniparser/dictionary.c -c -o obj/inidictionary.o
# Linking...
gcc obj/engine.o     obj/piece.o obj/game.o   obj/main.o obj/timer.o      obj/board.o obj/block.o     obj/globals.o obj/arguments.o obj/config.o obj/hscore.o obj/iniparser.o obj/inidictionary.o -o bin/yetris  -lncurses
# Build successful!
# Installing...
install -d --mode=755 /Users/damon/yetris/games
install: illegal option -- -
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 file2
       install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 ... fileN directory
       install -d [-v] [-g group] [-m mode] [-o owner] directory ...
make: *** [install] Error 64

I have a patch for you incoming...

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

Successfully merging a pull request may close this issue.

2 participants