Game Development Community

Linux make problem

by Nick Carnevalino · in Torque Game Engine · 04/20/2002 (10:25 am) · 24 replies

useing redhat 7.2 with gcc 2.97 ... after setting up my os build and compiler options i ran make .. it goes for a little while then runs in this

Creating library out.GCC2.DEBUG/lpng_DEBUG.a
--> Compiling zlib/compress.c
make[1]: *** [out.GCC2.DEBUG/zlib/compress.obj] Aborted
make: *** [default] Error 2

and ideas? .. i'm awful at figuring out gcc make errors.

almost forgot .. this is the head as of this morning ( april 20th about 2am )
Page «Previous 1 2
#1
04/20/2002 (11:03 am)
In mk/conf.GCC.mk, try changing DO.COMPILE.C to the following:

define DO.COMPILE.C
@echo "--> Compiling $(<)"
@echo $(COMPILER.c) $(CFLAGS) -I. $(PATH.H.SYS) -c -o $(@) $(<)
@$(COMPILER.c) $(CFLAGS) -I. $(PATH.H.SYS) -c -o $(@) $(<)
endef

This will cause the build to echo the gcc command line.
Then do
make clean
make

And post the command line its using when it fails.
#2
04/20/2002 (12:56 pm)
John,

I think it'd be a good idea to take out the option that causes GCC to be silent. It's useful to see that data, no matter how messy it can get.

- rjp
#3
04/20/2002 (1:39 pm)
Ryan, I agree. I just don't know how to do it. I'm a make bonehead. :)
#4
04/20/2002 (2:19 pm)
ok this is a bit long now :-) ... looks like basicly the same error ... and note how make clean didnt seem to work .. i'll fiddle around a bit more and see if i can get gcc to be a bit more verbose ... like i said before this is just the head .. i havent updated because of a "exceded daily limit" on the cvs for today :-)

[root@lucindrea torque]# make clean
targets.map2dif.mk:9: *** commands commence before first target. Stop.
make: *** [clean] Error 2
[root@lucindrea torque]# make
--> Compiling lpng/png.c
gcc -DX86UNIX -DLINUX -DUSEASSEMBLYTERRBLEND -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Ilpng -Izlib -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME -I. -c -o out.GCC2.DEBUG/lpng/png.obj lpng/png.c
--> Compiling lpng/pngerror.c
gcc -DX86UNIX -DLINUX -DUSEASSEMBLYTERRBLEND -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Ilpng -Izlib -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME -I. -c -o out.GCC2.DEBUG/lpng/pngerror.obj lpng/pngerror.c
--> Compiling lpng/pnggccrd.c
gcc -DX86UNIX -DLINUX -DUSEASSEMBLYTERRBLEND -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Ilpng -Izlib -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME -I. -c -o out.GCC2.DEBUG/lpng/pnggccrd.obj lpng/pnggccrd.c
--> Compiling lpng/pngget.c
gcc -DX86UNIX -DLINUX -DUSEASSEMBLYTERRBLEND -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Ilpng -Izlib -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME -I. -c -o out.GCC2.DEBUG/lpng/pngget.obj lpng/pngget.c
--> Compiling lpng/pngmem.c
gcc -DX86UNIX -DLINUX -DUSEASSEMBLYTERRBLEND -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Ilpng -Izlib -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME -I. -c -o out.GCC2.DEBUG/lpng/pngmem.obj lpng/pngmem.c
--> Compiling lpng/pngpread.c
gcc -DX86UNIX -DLINUX -DUSEASSEMBLYTERRBLEND -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Ilpng -Izlib -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME -I. -c -o out.GCC2.DEBUG/lpng/pngpread.obj lpng/pngpread.c
--> Compiling lpng/pngread.c
gcc -DX86UNIX -DLINUX -DUSEASSEMBLYTERRBLEND -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Ilpng -Izlib -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME -I. -c -o out.GCC2.DEBUG/lpng/pngread.obj lpng/pngread.c
--> Compiling lpng/pngrio.c
gcc -DX86UNIX -DLINUX -DUSEASSEMBLYTERRBLEND -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Ilpng -Izlib -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME -I. -c -o out.GCC2.DEBUG/lpng/pngrio.obj lpng/pngrio.c
--> Compiling lpng/pngrtran.c
gcc -DX86UNIX -DLINUX -DUSEASSEMBLYTERRBLEND -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Ilpng -Izlib -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME -I. -c -o out.GCC2.DEBUG/lpng/pngrtran.obj lpng/pngrtran.c
--> Compiling lpng/pngrutil.c
gcc -DX86UNIX -DLINUX -DUSEASSEMBLYTERRBLEND -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Ilpng -Izlib -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME -I. -c -o out.GCC2.DEBUG/lpng/pngrutil.obj lpng/pngrutil.c
--> Compiling lpng/pngset.c
gcc -DX86UNIX -DLINUX -DUSEASSEMBLYTERRBLEND -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Ilpng -Izlib -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME -I. -c -o out.GCC2.DEBUG/lpng/pngset.obj lpng/pngset.c
--> Compiling lpng/pngtrans.c
gcc -DX86UNIX -DLINUX -DUSEASSEMBLYTERRBLEND -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Ilpng -Izlib -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME -I. -c -o out.GCC2.DEBUG/lpng/pngtrans.obj lpng/pngtrans.c
--> Compiling lpng/pngvcrd.c
gcc -DX86UNIX -DLINUX -DUSEASSEMBLYTERRBLEND -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Ilpng -Izlib -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME -I. -c -o out.GCC2.DEBUG/lpng/pngvcrd.obj lpng/pngvcrd.c
--> Compiling lpng/pngwio.c
gcc -DX86UNIX -DLINUX -DUSEASSEMBLYTERRBLEND -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Ilpng -Izlib -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME -I. -c -o out.GCC2.DEBUG/lpng/pngwio.obj lpng/pngwio.c
--> Compiling lpng/pngwrite.c
gcc -DX86UNIX -DLINUX -DUSEASSEMBLYTERRBLEND -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Ilpng -Izlib -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME -I. -c -o out.GCC2.DEBUG/lpng/pngwrite.obj lpng/pngwrite.c
--> Compiling lpng/pngwtran.c
gcc -DX86UNIX -DLINUX -DUSEASSEMBLYTERRBLEND -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Ilpng -Izlib -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME -I. -c -o out.GCC2.DEBUG/lpng/pngwtran.obj lpng/pngwtran.c
--> Compiling lpng/pngwutil.c
gcc -DX86UNIX -DLINUX -DUSEASSEMBLYTERRBLEND -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Ilpng -Izlib -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME -I. -c -o out.GCC2.DEBUG/lpng/pngwutil.obj lpng/pngwutil.c
Creating library out.GCC2.DEBUG/lpng_DEBUG.a
--> Compiling zlib/adler32.c
gcc -DX86UNIX -DLINUX -DUSEASSEMBLYTERRBLEND -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -MD -march=i586 -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Izlib -I. -c -o out.GCC2.DEBUG/zlib/adler32.obj zlib/adler32.c
make[1]: *** [out.GCC2.DEBUG/zlib/adler32.obj] Aborted
make: *** [default] Error 2
#5
04/20/2002 (2:37 pm)
What version of make are you using? Its GNU make, right? ("make --version")

Was your configure command something like this?

make -f mk/configure.mk OS=LINUX COMPILER=GCC2 BUILD=DEBUG
#6
04/20/2002 (2:38 pm)
a quick update : .. i was able to update the head ( only looks like a enitor.cc was replaced ) and got rid of the dir torq and replaced it with the updated one , i'm running the cvs off of windows and transfering it to linux and i'm wondering if permissions or capitals are getting lost somewhere ... anyone have an idea where i could get the command line to checkout the sdk via linux's cvs?
#7
04/20/2002 (2:48 pm)
Your problem is probably due to the copy from the windows partition. Not only does the case get mangled but the files usually need to be newline converted. There's a script in the tools/linux directory that does this,
although you may need to newline convert it first before it will run (use dos2unix to do this).

For general unix compilation setup, check out:

www.garagegames.com/docs/torque.sdk/gstarted/compilers.unix.html

For a guide to cvs, check:

www.garagegames.com/docs/torque.sdk/gstarted/cvs.unix.html
#8
04/20/2002 (3:07 pm)
ok well

#gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)


i'm currently watching the dos2unix command write a ton of c's accross my ssh console ... i'll try to un a make afterwards and if not then i'll see if i can get the cvs ( thanks for the link ) today or if i have to wait for my bandwidth
#9
04/20/2002 (3:14 pm)
Its probably the case of some file that got mangled. Make sure that "torque/lib/zlib" has exactly that case. You might run in to other case problems as well.

Really the best solution is to pull down the cvs tree on linux so that the case and the newlines are preserved.
#10
04/20/2002 (3:33 pm)
pulled it from the cvs directly to linux .. same error message
--> Compiling zlib/adler32.c
gcc -w -DX86UNIX -DLINUX -I/usr/X11R6/include/ -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Izlib -I. -c -o out.GCC2.DEBUG/zlib/adler32.obj zlib/adler32.c
make[1]: *** [out.GCC2.DEBUG/zlib/adler32.obj] Aborted
make: *** [default] Error 2


all i wanted the linux build for is to be a stand alone server .. i can do windows work for awhile untill my head stops hurting
#11
04/20/2002 (3:45 pm)
Hmm well if you got a full clean head version with unix cvs, it should work. It might be your make version. I'm on RH 7.2 as well, and my make version is this:

john ~ localhost $ make -v
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.

The best bet is try to to get make to tell you why it is aborting. The -d flag to make might indicate this although it also produces a lot of useless information.
#12
04/20/2002 (4:24 pm)
WTF?!?

ok i added the -d flag to the command in the make file and re-ran make ..
Creating library out.GCC2.DEBUG/lpng_DEBUG.a
--> Compiling zlib/adler32.c
gcc -d -w -DX86UNIX -DLINUX -I/usr/X11R6/include/ -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Izlib -I. -c -o out.GCC2.DEBUG/zlib/adler32.obj zlib/adler32.c
--> Compiling zlib/compress.c
gcc -d -w -DX86UNIX -DLINUX -I/usr/X11R6/include/ -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Izlib -I. -c -o out.GCC2.DEBUG/zlib/compress.obj zlib/compress.c
make[1]: *** [out.GCC2.DEBUG/zlib/compress.obj] Aborted
make: *** [default] Error 2

now my head really hurts

my make is also
# make -v
GNU Make version 3.79.1,
#13
04/20/2002 (6:41 pm)
no, don't add the -d to the gcc command line, instead run
"make -d" to build.

I don't know why it would sometimes compile adler32 and sometimes not. Very weird.
#14
04/20/2002 (7:00 pm)
Change the -w on the CFLAGS.GENERAL in conf.GCC2.LINUX.mk to -Wall instead of -w. Note that the W in -Wall is uppercase.

- rjp
#15
04/20/2002 (10:12 pm)
ok i removed that torque dir and put a clean one in ( i keep a untouched copy of the cvs in another dir now as i have tried to compile this wayy too much ) ...
i ran
make -f mk/configure.mk OS=LINUX COMPILER=GCC2 BUILD=DEBUG
then changed the DO.COMPILE.C as stated above .. then replaed -w with -Wall at CFLAGS.GENERAL in conf.GCC2.LINUX.mk
ran
make -d >> debug.txt
good lord that makes a huge amount of information ... anyway because the thing is sooo big i'm not posting it here but rather i put the file on my site www.lucindrea.com/debug.txt ( i hope i did that link correctly )

on the console i got about 3 screens of
Child access: user 0 (real 0), group 0 (real 0)
Child access: user 0 (real 0), group 0 (real 0)
Child access: user 0 (real 0), group 0 (real 0)
Child access: user 0 (real 0), group 0 (real 0)

followed by

make[1]: *** [out.GCC2.DEBUG/zlib/adler32.obj] Aborted
make: *** [default] Error 2


this is now gone beyond my scope of knowleage as the output in the debug.txt doenst make any sence to me anymore.

on a side note ( and i dont think this has anything to do with it ) my system runs a nightly up2date script and grabs the latest rpm's off of redhat .. so i can safely say all my libs etc. are up to date as of yesterday.

I also want to say that i'm supprized that my message has stayed on top of the fourm ( i'm usted to getting pushed down very quickly on other fourms ) and i would like to thank all the help i'm getting :-)

edit: *grumbles somthing about messing up the link*
#16
04/20/2002 (10:42 pm)
Well, the debug output says a lot and nothing at the same time. I'm still at a loss. I suggest going in to the lib directory and try running the gcc command directly:

gcc -Wall -DX86UNIX -DLINUX -I/usr/X11R6/include/ -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Izlib -I. -c -o out.GCC2.DEBUG/zlib/adler32.obj zlib/adler32.c

Perhaps this will tell you what is really going on.
#17
04/20/2002 (10:57 pm)
[root@lucindrea lib]# gcc -d -Wall -DX86UNIX -DLINUX -I/usr/X11R6/include/ -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Izlib -I. -c -o out.GCC2.DEBUG/zlib/adler32.obj zlib/adler32.c
Aborted
[root@lucindrea lib]#


*sigh*
#18
04/20/2002 (11:57 pm)
You might want to check out the permissions on the out.GCC2.DEBUG directory and the adler32.obj files (if any) to make sure that nothing weird is set. Also, it might sound dumb but make sure there is free space on the drive "df -m".
#19
04/21/2002 (12:52 am)
i'm running make as root so....

drwxr-xr-x 6 root root 4096 Apr 21 02:21 out.GCC2.DEBUG
[root@lucindrea out.GCC2.DEBUG]# ls -l
total 812
drwxr-xr-x 2 root root 4096 Apr 21 02:21 ljpeg
drwxr-xr-x 2 root root 4096 Apr 21 02:21 lpng
-rw-r--r-- 1 root root 809208 Apr 21 02:21 lpng_DEBUG.a
drwxr-xr-x 2 root root 4096 Apr 21 02:21 lungif
drwxr-xr-x 2 root root 4096 Apr 21 02:21 zlib

and

[root@lucindrea out.GCC2.DEBUG]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 37G 4.1G 30G 12% /
#20
04/21/2002 (10:29 am)
You should remove that -d option to gcc, hopefully its not getting confused by it. You might want to add a -v option, which tells you what commands gcc is running.

gcc -v -Wall -DX86UNIX -DLINUX -I/usr/X11R6/include/ -g -DDEBUG -DTGE_DEBUG -DENABLE_ASSERTS -Izlib -I. -c -o out.GCC2.DEBUG/zlib/adler32.obj zlib/adler32.c

It looks like it stores temporary files in /tmp, so you might want to check out that directory as well and make sure there is nothing wrong with it (permissions and disk space).

Check the syslog too to see if there are any messages there that might be related.

You could try compiling some other the other zlib files directly with the command above, and see if they all give you trouble or if it is just adler32.
Page «Previous 1 2