Forum Navigation
Getting started with GDC and Tango - build-gdc.sh fails with apparent bug
Posted: 06/14/08 02:18:37I'm trying to follow the tango build directions, have checked out tango 0.99.6 and tried to run lib/build-gdc.sh.
The script fails, here is the tail of the console transcript:
(I've inserted newlines into the preformatted transcript text below, because the wiki software widens everything in this post to the width of the longest preformatted line, making it quite hard to read without the added newlines.)
gmake[1]: Leaving directory `/big/Download/gdc/tango-src/0.99.6/lib/gc/basic' /usr/bin/gmake -C common/tango -fposix.mak lib CC=gcc DC=gdmd ADD_DFLAGS="-q,-nostdinc -I`pwd`/common -I`pwd`/.. -I`pwd`/compiler/gdc" ADD_CFLAGS="" gmake[1]: Entering directory `/big/Download/gdc/tango-src/0.99.6/lib/common/tango' gdmd -c -release -O -inline -w -nofloat -version=Posix -q,-nostdinc -I/home/parz/Download/gdc/tango-src/0.99.6/lib/common -I/home/parz/Download/gdc/tango-src/0.99.6/lib/.. -I/home/parz/Download/gdc/tango-src/0.99.6/lib/compiler/gdc -Hfcore/BitManip.di core/BitManip.d -ofcore/BitManip.o gdmd -c -release -O -inline -w -nofloat -version=Posix -q,-nostdinc -I/home/parz/Download/gdc/tango-src/0.99.6/lib/common -I/home/parz/Download/gdc/tango-src/0.99.6/lib/.. -I/home/parz/Download/gdc/tango-src/0.99.6/lib/compiler/gdc -Hfcore/Exception.di core/Exception.d -ofcore/Exception.o gdmd -c -release -O -inline -w -nofloat -version=Posix -q,-nostdinc -I/home/parz/Download/gdc/tango-src/0.99.6/lib/common -I/home/parz/Download/gdc/tango-src/0.99.6/lib/.. -I/home/parz/Download/gdc/tango-src/0.99.6/lib/compiler/gdc -Hfcore/Memory.di core/Memory.d -ofcore/Memory.o gdmd -c -release -O -inline -w -nofloat -version=Posix -q,-nostdinc -I/home/parz/Download/gdc/tango-src/0.99.6/lib/common -I/home/parz/Download/gdc/tango-src/0.99.6/lib/.. -I/home/parz/Download/gdc/tango-src/0.99.6/lib/compiler/gdc -Hfcore/Runtime.di core/Runtime.d -ofcore/Runtime.o gdmd -c -release -O -inline -w -nofloat -version=Posix -q,-nostdinc -I/home/parz/Download/gdc/tango-src/0.99.6/lib/common -I/home/parz/Download/gdc/tango-src/0.99.6/lib/.. -I/home/parz/Download/gdc/tango-src/0.99.6/lib/compiler/gdc -Hfcore/Thread.di core/Thread.d -ofcore/Thread.o gcc -c -O core/ThreadASM.S -ocore/ThreadASM.o gcc -c -O stdc/wrap.c -ostdc/wrap.o gdmd -c -release -O -inline -w -nofloat -version=Posix -q,-nostdinc -I/home/parz/Download/gdc/tango-src/0.99.6/lib/common -I/home/parz/Download/gdc/tango-src/0.99.6/lib/.. -I/home/parz/Download/gdc/tango-src/0.99.6/lib/compiler/gdc stdc/posix/pthread_darwin.d -ofstdc/posix/pthread_darwin.o rm -f libtango-cc-tango.a ar -qsv libtango-cc-tango.a core/BitManip.o core/Exception.o core/Memory.o core/Runtime.o core/Thread.o core/ThreadASM.o stdc/wrap.o stdc/posix/pthread_darwin.o ar: creating libtango-cc-tango.a ar: core/BitManip.o: No such file or directory gmake[1]: *** [libtango-cc-tango.a] Error 1 gmake[1]: Leaving directory `/big/Download/gdc/tango-src/0.99.6/lib/common/tango' gmake: *** [lib] Error 2 [parz@lobsang lib]$It turns out that the gdmdcommand produces BitManip.o, but not in the core directory, rather the current make directory. The (makefile produced) gdmd command:
gdmd -c -release -O -inline -w -nofloat -version=Posix -q,-nostdinc -I/home/parz/Download/gdc/tango-src/0.99.6/lib/common -I/home/parz/Download/gdc/tango-src/0.99.6/lib/.. -I/home/parz/Download/gdc/tango-src/0.99.6/lib/compiler/gdc -Hfcore/BitManip.di core/BitManip.d -ofcore/BitManip.oexecutes the following gdc command:
/big/Download/gdc/bin/gdc -frelease -O3 -fomit-frame-pointer -fweb -finline-functions -Wall -fversion=Posix -nostdinc -I /home/parz/Download/gdc/tango-src/0.99.6/lib/common -I /home/parz/Download/gdc/tango-src/0.99.6/lib/.. -I /home/parz/Download/gdc/tango-src/0.99.6/lib/compiler/gdc -c core/BitManip.d -o BitManip.o -fintfc -fintfc-file=core/BitManip.diwith -o BitManip.o where it should have -o core/BitManip.o.
Further investigation showed that at line 333 of the gdmd script,
if ( ! $link && !$header && $output_file ) { $outf = $output_file; } else {the value of $header is 1, and therefore $outf is not set to $output_file, instead it is set to a file name, without directory, derived from the source file.
$header became 1 because of the assignment that was added by the patch (at line 190)
} elsif ( $arg =~ m/^-Hf(.*)$/ ) { $header = 1; $header_file = $1; } elsif ( $arg eq '--help' ) {given in the build directions. So, as far as I can tell, the patch introduces a bug that causes the build to fail. Of course it would also fail without the patch. And, since others have built tango with the patch, there is actually no bug, and I am hallucinating the build failure.
So can someone de-hallucinate me past this problem?












