Author Topic: Noob help - compiling the latest DW bundle  (Read 3504 times)

Offline ereshkigal

  • Acquaintance
  • *
  • Posts: 2
    • View Profile
Noob help - compiling the latest DW bundle
« on: April 14, 2009, 11:35:45 AM »
Well, I played around with the windoze version of this bundle enough to get tired of its squirreliness (that can't really be a word...) to set up an Ubuntu VMware image to mess with it in a real OS.  I'm having some trouble compiling it, however, and I hope someone can help.  Here are my commands & outputs I'm getting:

Quote
user@desktop:/dw/fluffos-2.15-ds08$ sudo ./configure dw

Code: [Select]
Option selected: dw
Preparing to build standard MudOS driver ...
Trying out some stuff to see what works; ignore errors ...
./build.FluffOS: 176: gmake: not found
make: Nothing to be done for `nothing'.
Using standard a.out for compiler default executable
./build.FluffOS: 199: xlc: not found
CC: gcc
mkdir: cannot create directory `tmp': File exists
install: invalid option -- 'f'
Try `install --help' for more information.
rm: cannot remove `tmp/insttest': No such file or directory
./build.FluffOS: 344: bison: not found
***************** Configuration completed **************
Installing MudOS on Linux

Using install -c to install binaries in ../bin.
Using gcc -E  for preprocessing.
Using gcc -D__USE_FIXED_PROTOTYPES__            -O2 to compile.
Using byacc -d  to make the compiler.
Edit GNUmakefile if this is not what you want

Otherwise, type 'make' to build MudOS, then 'make install'.
Moving around some DS specific files...
Copying local_options.dw to local_options
No MinGW config needed.
No Wolfpaw config needed.
Configuration script complete.

Quote
user@desktop:/dw/fluffos-2.15-ds08$ sudo make

Code: [Select]
rm -f cc.h
echo "/* this file automatically generated by the Makefile */" > cc.h
echo '#define COMPILER "gcc"' >> cc.h
echo '#define OPTIMIZE "-O2"' >> cc.h
echo '#define CFLAGS   "-D__USE_FIXED_PROTOTYPES__ -O2"' >> cc.h
echo '#define OBJDIR   "obj"' >> cc.h
gcc -D__USE_FIXED_PROTOTYPES__ -o obj/edit_source.o -c edit_source.c
gcc -D__USE_FIXED_PROTOTYPES__ -O2 -o obj/hash.o -c hash.c
byacc -d  make_func.y
rm -f make_func.tab.c
mv y.tab.c make_func.tab.c
gcc -D__USE_FIXED_PROTOTYPES__ -o obj/make_func.tab.o -c make_func.tab.c
gcc -D__USE_FIXED_PROTOTYPES__ obj/edit_source.o obj/hash.o obj/make_func.tab.o -o edit_source
if test \( ! -r configure.h \) -o \( ! -r configuration \); then \
    rm -f configuration; \
    touch configuration; \
fi
if test "Machine `uname -a` Configure version 5" = "`cat configuration`"; then \
    echo "Skipping configuration ..."; \
else \
    ./edit_source -configure; \
    echo "Machine `uname -a` Configure version 5" > configuration; \
fi
Checking for include file <stdlib.h> ... exists
Checking for include file <unistd.h> ... exists
Checking for include file <time.h> ... exists
Checking for include file <sys/times.h> ... exists
Checking for include file <fcntl.h> ... exists
Checking for include file <sys/time.h> ... exists
Checking for include file <dos.h> ... does not exist
Checking for include file <usclkc.h> ... does not exist
Checking for include file <limits.h> ... exists
Checking for include file <locale.h> ... exists
Checking for include file <netinet/in.h> ... exists
Checking for include file <arpa/inet.h> ... exists
Checking for include file <sys/types.h> ... exists
Checking for include file <sys/ioctl.h> ... exists
Checking for include file <sys/socket.h> ... exists
Checking for include file <netdb.h> ... exists
Checking for include file <arpa/telnet.h> ... exists
Checking for include file <sys/sema.h> ... does not exist
Checking for include file <sys/socketvar.h> ... exists
Checking for include file <socket.h> ... does not exist
Checking for include file <resolve.h> ... does not exist
Checking for include file <sys/stat.h> ... exists
Checking for include file <dirent.h> ... exists
Checking for include file <sys/dirent.h> ... does not exist
Checking for include file <sys/filio.h> ... does not exist
Checking for include file <sys/sockio.h> ... does not exist
Checking for include file <sys/mkdev.h> ... does not exist
Checking for include file <sys/resource.h> ... exists
Checking for include file <sys/rusage.h> ... does not exist
Checking for include file <sys/wait.h> ... exists
Checking for include file <sys/crypt.h> ... does not exist
Checking for include file <crypt.h> ... exists
Checking for include file <my_malloc.h> ... does not exist
Checking for include file <mach/mach.h> ... does not exist
Checking for include file <mach.h> ... does not exist
Checking for include file <sys/sysmacros.h> ... exists
Checking for include file <dlfcn.h> ... exists
Checking for missing INADDR_NONE ... ok
Checking for random number generator ... using drand48()
Using BSD signals.
Checking if signal() returns SIG_ERR on error ... yes
Not Checking for inline ...(usage in driver code all broken anyway) const ...
Checking for strerror() ... exists
Checking for POSIX getcwd() ... exists
Checking for getrusage() ... exists
Checking for times() ... exists
Checking for gettimeofday() ... exists
Checking for fchmod() ... exists
Checking for big or little endian ... little
Checking for memmove() ... exists
Checking for library -lresolv ... exists
Checking for library -lbsd ... does not exist
Checking for library -lBSD ... does not exist
Checking for library -ly ... does not exist
Checking for library -lcrypt ... exists
Checking for library -lsocket ... does not exist
Checking for library -linet ... does not exist
Checking for library -lnsl ... exists
Checking for library -lnsl_s ... does not exist
Checking for library -lseq ... does not exist
Checking for library -lm ... exists
Checking for library -lz ... does not exist
Checking for library -lrt ... exists
Checking for flaky Linux systems ...

./edit_source -options -malloc -build_func_spec 'gcc -E -D__USE_FIXED_PROTOTYPES__' \
              -process grammar.y.pre
Using 'local_options' file ...
Writing build options to option_defs.c ...
Using memory allocation package: sysmalloc.c
Building compiler files ...
Creating 'grammar.y' from 'grammar.y.pre' ...

./edit_source -process packages/Makefile.pre
Creating 'packages/Makefile' from 'packages/Makefile.pre' ...

./edit_source -process packages/GNUmakefile.pre
Creating 'packages/GNUmakefile' from 'packages/GNUmakefile.pre' ...

./edit_source -build_efuns -build_applies
Building efun tables ...

touch mallocwrapper.c
touch malloc.c
touch files
make main_build2
make[1]: Entering directory `/dw/fluffos-2.15-ds08'
make -C packages 'CC=gcc' 'CFLAGS=-D__USE_FIXED_PROTOTYPES__ -O2' 'OBJDIR=../obj' 'RANLIB=ranlib' 'A=a' 'O=o'
make[2]: Entering directory `/dw/fluffos-2.15-ds08/packages'
gcc -I../obj -I.. -D__USE_FIXED_PROTOTYPES__ -O2 -o ../obj/uids.o -c uids.c
gcc -I../obj -I.. -D__USE_FIXED_PROTOTYPES__ -O2 -o ../obj/compress.o -c compress.c
compress.c:16:18: error: zlib.h: No such file or directory
compress.c: In function ‘f_compress_file’:
compress.c:33: error: ‘gzFile’ undeclared (first use in this function)
compress.c:33: error: (Each undeclared identifier is reported only once
compress.c:33: error: for each function it appears in.)
compress.c:33: error: expected ‘;’ before ‘out_file’
compress.c:96: error: ‘out_file’ undeclared (first use in this function)
compress.c: In function ‘f_uncompress_file’:
compress.c:129: error: ‘gzFile’ undeclared (first use in this function)
compress.c:129: error: expected ‘;’ before ‘in_file’
compress.c:187: error: ‘in_file’ undeclared (first use in this function)
compress.c:205: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
compress.c: In function ‘f_compress’:
compress.c:224: error: ‘uLongf’ undeclared (first use in this function)
compress.c:224: error: expected ‘;’ before ‘new_size’
compress.c:238: error: ‘new_size’ undeclared (first use in this function)
compress.c: In function ‘f_uncompress’:
compress.c:263: error: ‘z_stream’ undeclared (first use in this function)
compress.c:263: error: ‘compressed’ undeclared (first use in this function)
compress.c:279: error: expected expression before ‘)’ token
compress.c:290: error: ‘Z_OK’ undeclared (first use in this function)
compress.c:300: error: ‘Z_STREAM_END’ undeclared (first use in this function)
make[2]: *** [../obj/compress.o] Error 1
make[2]: Leaving directory `/dw/fluffos-2.15-ds08/packages'
make[1]: *** [packages/packages.a] Error 2
make[1]: Leaving directory `/dw/fluffos-2.15-ds08'
make: *** [main_build] Error 2

Quote
user@desktop:/dw/fluffos-2.15-ds08$ sudo make install

Code: [Select]
make main_build2
make[1]: Entering directory `/dw/fluffos-2.15-ds08'
make -C packages 'CC=gcc' 'CFLAGS=-D__USE_FIXED_PROTOTYPES__ -O2' 'OBJDIR=../obj' 'RANLIB=ranlib' 'A=a' 'O=o'
make[2]: Entering directory `/dw/fluffos-2.15-ds08/packages'
gcc -I../obj -I.. -D__USE_FIXED_PROTOTYPES__ -O2 -o ../obj/compress.o -c compress.c
compress.c:16:18: error: zlib.h: No such file or directory
compress.c: In function ‘f_compress_file’:
compress.c:33: error: ‘gzFile’ undeclared (first use in this function)
compress.c:33: error: (Each undeclared identifier is reported only once
compress.c:33: error: for each function it appears in.)
compress.c:33: error: expected ‘;’ before ‘out_file’
compress.c:96: error: ‘out_file’ undeclared (first use in this function)
compress.c: In function ‘f_uncompress_file’:
compress.c:129: error: ‘gzFile’ undeclared (first use in this function)
compress.c:129: error: expected ‘;’ before ‘in_file’
compress.c:187: error: ‘in_file’ undeclared (first use in this function)
compress.c:205: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
compress.c: In function ‘f_compress’:
compress.c:224: error: ‘uLongf’ undeclared (first use in this function)
compress.c:224: error: expected ‘;’ before ‘new_size’
compress.c:238: error: ‘new_size’ undeclared (first use in this function)
compress.c: In function ‘f_uncompress’:
compress.c:263: error: ‘z_stream’ undeclared (first use in this function)
compress.c:263: error: ‘compressed’ undeclared (first use in this function)
compress.c:279: error: expected expression before ‘)’ token
compress.c:290: error: ‘Z_OK’ undeclared (first use in this function)
compress.c:300: error: ‘Z_STREAM_END’ undeclared (first use in this function)
make[2]: *** [../obj/compress.o] Error 1
make[2]: Leaving directory `/dw/fluffos-2.15-ds08/packages'
make[1]: *** [packages/packages.a] Error 2
make[1]: Leaving directory `/dw/fluffos-2.15-ds08'
make: *** [main_build] Error 2

Offline Ebersar

  • Acquaintance
  • *
  • Posts: 10
    • View Profile
Re: Noob help - compiling the latest DW bundle
« Reply #1 on: April 14, 2009, 11:47:45 AM »
I a noob too.. but I think you have to install the bison package.

sudo apt-get install bison

Offline Raudhrskal

  • BFF
  • ***
  • Posts: 214
  • The MUD community needs YOUR help!
    • View Profile
Re: Noob help - compiling the latest DW bundle
« Reply #2 on: April 14, 2009, 12:03:52 PM »
Nah, his system is using byacc instead (not that i know if that substitue will work). This specific error means that you forgot to add " -lz" to the end of the sole line in the system_libs file, and/or don't have the zlib headers.

libz-dev in debian and ubuntu. Try also zlib- and/or -devel combinations.

Now, when we're at it, better install bison if you can ;)

I think, therefore i may be wrong.
Please note that if you met a Raudhrskal in a place that's not related to muds, it wasn't me. *sigh*... back when I started there was zero hits on google for that name...

Offline ereshkigal

  • Acquaintance
  • *
  • Posts: 2
    • View Profile
Re: Noob help - compiling the latest DW bundle
« Reply #3 on: April 14, 2009, 12:24:01 PM »
Excellent...the combination of sudo apt-get install bison and sudo apt-get install libz-dev did the trick!  Thanks for your help! ;D

Offline Ajandurah

  • Acquaintance
  • *
  • Posts: 22
    • View Profile
Re: Noob help - compiling the latest DW bundle
« Reply #4 on: April 14, 2009, 01:30:35 PM »
byacc will work fine for the grammer compilation, bison is run in byacc emulation mode anyway when building.