2.0-prerelease build errors

Hi all,

I'm building the LLVM 2.0 pre-release on a brand new FreeBSD 6.2
install. Without the bison package installed, the build breaks:

$ tar zxf llvm-2.0.tar.gz
$ mkdir objdir
$ cd objdir
$ ../llvm-2.0/configure
$ gmake
[...]
gmake[2]: Entering directory `/usr/home/emil/objdir/utils/TableGen'
llvm[2]: Compiling AsmWriterEmitter.cpp for Release build
llvm[2]: Compiling CallingConvEmitter.cpp for Release build
llvm[2]: Compiling CodeEmitterGen.cpp for Release build
llvm[2]: Compiling CodeGenTarget.cpp for Release build
llvm[2]: Compiling DAGISelEmitter.cpp for Release build
llvm[2]: Flexing FileLexer.l
llvm[2]: Bison of FileParser.y SKIPPED -- bison not found
llvm[2]: Compiling FileLexer.cpp for Release build
/usr/home/emil/llvm-2.0/utils/TableGen/FileLexer.l:34:24: FileParser.h: No such file or directory

Is this a packaging issue where FileParser.h was omitted
from the tarball, or does LLVM *need* bison in order to build?

If it's the latter case, then should the configure script error out when
it can't find bison? e.g. It already errors out quite gracefully if it
can't find GNU Make.

I see the tarball contains a FileParser.h.cvs but not a FileParser.h

llvm[2]: Flexing FileLexer.l
llvm[2]: Bison of FileParser.y SKIPPED -- bison not found
llvm[2]: Compiling FileLexer.cpp for Release build
/usr/home/emil/llvm-2.0/utils/TableGen/FileLexer.l:34:24: FileParser.h: No such file or directory

Is this a packaging issue where FileParser.h was omitted
from the tarball, or does LLVM *need* bison in order to build?

No, bison should not be required. You have found a bug in our Makefiles.

With bison installed, the build gets past TableGen but breaks later:
gmake[2]: Entering directory `/usr/home/emil/objdir/tools/opt'
/usr/home/emil/llvm-2.0/Makefile.rules:1021: *** multiple target patterns. Stop.

This is because $(ProjLibsPaths) contains:
"/usr/home/emil/objdir/Release/bin/llvm-config llvm-config: Perl not
found so llvm-config could not be generated"

Should configure also error out if perl isn't installed?

Yes. Reid has changed this so that perl is now required.

Thanks so much for reporting these!

-Tanya

> llvm[2]: Flexing FileLexer.l
> llvm[2]: Bison of FileParser.y SKIPPED -- bison not found
> llvm[2]: Compiling FileLexer.cpp for Release build
> /usr/home/emil/llvm-2.0/utils/TableGen/FileLexer.l:34:24: FileParser.h: No such file or directory
>
> Is this a packaging issue where FileParser.h was omitted
> from the tarball, or does LLVM *need* bison in order to build?

No, bison should not be required. You have found a bug in our Makefiles.

That bug has now been fixed on the release_20 branch and on mainline.
Its only been tested on Linux. I would appreciate some verification on
other hosts.

Thanks,

Reid.

You're welcome!

I'm still working on the "method four" testing that you requested.

The "make check" is done, results are here:
http://goanna.cs.rmit.edu.au/~emil/llvm-2.0-make-check.txt

Summary:
Native configuration is i386-unknown-freebsd6.2
# of expected passes 1988
# of expected failures 3

> > Should configure also error out if perl isn't installed?
>
> Yes. Reid has changed this so that perl is now required.
>
> Thanks so much for reporting these!

You're welcome!

I'm still working on the "method four" testing that you requested.

The "make check" is done, results are here:
http://goanna.cs.rmit.edu.au/~emil/llvm-2.0-make-check.txt

Looks perfect to me.

Summary:
Native configuration is i386-unknown-freebsd6.2
# of expected passes 1988
# of expected failures 3

-=-

I'm currently stuck on the nightly report, at this point:
/usr/home/emil/llvm-test/RunSafely.sh 500 0 /dev/null Output/tramp3d-v4.out-nat Output/tramp3d-v4.native --cartvis 1.0 0.0 --rhomin 1e-8 -n 25

Ctrl-T tells me that tramp3d-v4.native has by now consumed 50,000
seconds of CPU time. Somehow I don't think it's going to stop anytime
soon -- what can I do to break out of this cleanly and get the whole
report built?

The "500" on that command line is supposed to stop it after 500 seconds
of CPU time. 50,000 is WAY too much. You should just kill the
"tramp3d-v4.native" process and it will carry on from there.

BTW, Obviously RunSafely.sh is not working well on freebsd. Could you do
me a favor?

I could fix this if I had:
1. the output of "uname -s" on your system
2. A description of the ulimit (man page?) command for your
shell/system. Specifically,
   is the -t option supported to limit cpu time and what are the units?

-=-

Other than that, llvm and llvm-gcc seem to build and work quite nicely
on FreeBSD 6.2-RELEASE. I'm hoping to eventually get a FreeBSD port for
llvm-gcc added, after LLVM 2.0 is officially released.

Very nice, that would be much appreciated and would make some of our
FreeBSD users happy :slight_smile:

Best Regards,

Reid.