Issues compiling on Ubuntu 11.10...

Posted by Eriseth on Mon 05 Dec 2011 01:28 AM — 8 posts, 34,574 views.

#0
Hello all,

I'm trying to get SmaugFUSS 1.9 compiled without much success.

Here is the output...


eriseth@antares:/opt/smaugfuss19/src$ make
make -s smaug
  Compiling o/imc.o....
imc.c: In function ‘void imclog(const char*, ...)’:
imc.c:212:10: error: variable ‘strtime’ set but not used [-Werror=unused-but-set-variable]
imc.c: In function ‘void imcbug(const char*, ...)’:
imc.c:236:10: error: variable ‘strtime’ set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors

make[1]: *** [o/imc.o] Error 1
make: *** [all] Error 2


eriseth@antares:/opt/smaugfuss19/src$ gcc --version
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
Copyright (C) 2011 Free Software Foundation, Inc.



I'm sure it's something silly but after playing with it for a while I just couldn't figure it out. Any suggestions would be greatly appreciated.

Thanks :)

-E
USA #1
You can just disable unused-but-set-variable in the Makefile.

Or you can fix that strtime warning in that code. If you show the lines I can help.
#2
How do I go about disabling unused-but-set-variable ?

I presume that's the least time-consuming fix :)
Australia Forum Administrator #3
Add the suggested warning-disable:


-Wno-unused-but-set-variable


to the flags in the Makefile.
Amended on Mon 05 Dec 2011 02:38 AM by Nick Gammon
#4
Thanks so much for the help so far, guys. That fixed the warning error, but the code is still not compiling. See errors below:



In file included from comm.c:30:0:
mccp.h:18:18: fatal error: zlib.h: No such file or directory
compilation terminated.
make[1]: *** [o/comm.o] Error 1
In file included from hotboot.c:38:0:
mccp.h:18:18: fatal error: zlib.h: No such file or directory
compilation terminated.
make[1]: *** [o/hotboot.o] Error 1
In file included from mccp.c:48:0:
mccp.h:18:18: fatal error: zlib.h: No such file or directory
compilation terminated.
make[1]: *** [o/mccp.o] Error 1
make[1]: Target `smaug' not remade because of errors.
make: *** [all] Error 2



So obviously I'm missing something but I don't know what it is :/

Thoughts?

-E
Amended on Mon 05 Dec 2011 02:37 PM by Eriseth
#5
Ok, fixed it. In case someone else comes along with the same issue:

I was just missing some library. Installed it right off the Ubuntu repository. Just do:


sudo apt-get install zlib1g-dev


I'm sure I'll be back with another issue soon...

Thanks again :)

-E
USA #6
Good deal.

I had a similar issue on OpenSUSE 11.4 and last night, downloading the zlib-devel library solved it for me.

Already had zlib installed, but the -devel lib was what was needed.




#7
This thread was very helpful to me, thanks -Flex