Building current llvm-gcc-4.0 TOT fails on darwin x86

Hi all,
building current llvm-gcc-4.0 TOT(Revision: 42128) with current llvm (Revision: 42128) on 8.10.1 Darwin (x86) fails with the following message. Is that a just a temporary inconsistency or should i file a bug?

/Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/gcc/xgcc -B/Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/gcc/ -B/Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/../install/i686-apple-darwin8/bin/ -B/Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/../install/i686-apple-darwin8/lib/ -isystem /Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/../install/i686-apple-darwin8/include -isystem /Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/../install/i686-apple-darwin8/sys-include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../llvm-gcc-4.0/gcc -I../../llvm-gcc-4.0/gcc/. -I../../llvm-gcc-4.0/gcc/../include -I./../intl -I../../llvm-gcc-4.0/gcc/../libcpp/include -I/Users/arnold/Desktop/testing/vanilla-gcc-4.0/llvm/include -I/Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/../build/include -DL_divxc3 -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc-4.0/gcc/libgcc2.c -o libgcc/./_divxc3.o
../../llvm-gcc-4.0/gcc/llvm-convert.cpp:4421: failed assertion `0 && "Unknown FP type!"'
../../llvm-gcc-4.0/gcc/libgcc2.c: In function '__divxc3':
../../llvm-gcc-4.0/gcc/libgcc2.c:1722: internal compiler error: Abort trap#

It seems to be related to the following function getting the wrong typeid:

Value *TreeToLLVM::EmitBuiltinUnaryFPOp(Value *Amt, const char *F32Name,
                                         const char *F64Name) {
   const char *Name = 0;

   switch (Amt->getType()->getTypeID()) {
   default: assert(0 && "Unknown FP type!");
   case Type::FloatTyID: Name = F32Name; break;
   case Type::DoubleTyID: Name = F64Name; break;
   }

   return Builder.CreateCall(cast<Function>(
     TheModule->getOrInsertFunction(Name, Amt->getType(), Amt->getType(), NULL)),
                             Amt, "tmp");
}

my configures:
../llvm-gcc-4.0/configure --prefix=/Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/../install --ena
ble-llvm=/Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/../build --with-arch=nocona --with-tune=generi
c --with-gxx-include-dir=/usr/include/c++/4.0.0 --build=i686-apple-darwin8 --host=i686-apple-darwin8 --ta
rget=i686-apple-darwin8 --enable-checking --program-prefix=llvm- --with-gcc-version-trigger=/Users/arnold
/Desktop/testing/vanilla-gcc-4.0/llvm-gcc-4.0/gcc/version.c --enable-languages=c,c++

../llvm/configure --prefix=/Users/arnold/Desktop/
testing/vanilla-gcc-4.0/build/../local --enable-debug-runtime --disable-optimized

The same setup used to work 2-3 days ago, so i don't think it is related to my setup (but you never know ;). I cleaned obj and build before configuring.

regards arnold

Hi all,
building current llvm-gcc-4.0 TOT(Revision: 42128) with current llvm
(Revision: 42128) on 8.10.1 Darwin (x86) fails with the following
message. Is that a just a temporary inconsistency or should i file a
bug?

I think I broke this with long double. I'll get it fixed shortly.

Okay dokey, thanks :slight_smile:

I think the build should work now, could you try? You need both
llvm and llvm-gcc.
There are still codegen issues, but I don't think they'll affect code that
doesn't use long double.

I now get:
/Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/gcc/xgcc -B/Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/gcc/ -B/Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/../install/i686-apple-darwin8/bin/ -B/Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/../install/i686-apple-darwin8/lib/ -isystem /Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/../install/i686-apple-darwin8/include -isystem /Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/../install/i686-apple-darwin8/sys-include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../llvm-gcc-4.0/gcc -I../../llvm-gcc-4.0/gcc/. -I../../llvm-gcc-4.0/gcc/../include -I./../intl -I../../llvm-gcc-4.0/gcc/../libcpp/include -I/Users/arnold/Desktop/testing/vanilla-gcc-4.0/llvm/include -I/Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/../build/include -m64 -DL_fixxfdi -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc-4.0/gcc/libgcc2.c -o libgcc/x86_64/_fixxfdi.o
Formal argument #0 has unhandled type f80
../../llvm-gcc-4.0/gcc/libgcc2.c:1235: internal compiler error: Abort trap

will disable multilib (./configure --disable-multilib ...) and try again and post the results

regards

Ups just saw i forgot to delete libstdc++. will try again without.

regards

Ups just saw i forgot to delete libstdc++. will try again without.

That won't help.

I now get:
/Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/gcc/xgcc -B/Users/
arnold/Desktop/testing/vanilla-gcc-4.0/obj/gcc/ -B/Users/arnold/
Desktop/testing/vanilla-gcc-4.0/obj/../install/i686-apple-darwin8/
bin/ -B/Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/../install/
i686-apple-darwin8/lib/ -isystem /Users/arnold/Desktop/testing/
vanilla-gcc-4.0/obj/../install/i686-apple-darwin8/include -isystem /
Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/../install/i686-
apple-darwin8/sys-include -O2 -DIN_GCC -W -Wall -Wwrite-strings -
Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -
isystem ./include -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -
D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../llvm-gcc-4.0/gcc -I../../
llvm-gcc-4.0/gcc/. -I../../llvm-gcc-4.0/gcc/../include -I./../intl -
I../../llvm-gcc-4.0/gcc/../libcpp/include -I/Users/arnold/Desktop/
testing/vanilla-gcc-4.0/llvm/include -I/Users/arnold/Desktop/testing/
vanilla-gcc-4.0/obj/../build/include -m64 -DL_fixxfdi -
fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc-4.0/gcc/libgcc2.c
-o libgcc/x86_64/_fixxfdi.o
Formal argument #0 has unhandled type f80
../../llvm-gcc-4.0/gcc/libgcc2.c:1235: internal compiler error: Abort
trap

will disable multilib (./configure --disable-multilib ...) and try
again and post the results

Yeah, that should work.

Indeed it did. llvm-gcc now builds fine. (llvm and llvm-gcc at Revision: 42148) haven't run the test-suite or test yet
- need sleep - good night

my configure flags in case anyone wonders:
../llvm/configure --prefix=`pwd`/../local --enable-debug-runtime --disable-optimized
../llvm-gcc-4.0/configure --prefix=`pwd`/../install --enable-llvm=`pwd`/../build --with-arch=pentium-m --with-tune=prescott --disable-multilib --with-gxx-include-dir=/usr/include/c++/4.0.0 --build=i686-apple-darwin8 --host=i686-apple-darwin8 --target=i686-apple-darwin8 --enable-checking --enable-languages=c,c++ --program-prefix=llvm-

regards

Hi Arnold,

deleting that is a bit rude, and svn will recover it
when doing "svn up" next time.

A better solution is to

cd llvm-gcc
svn switch libstdc++ missing

This permanently tells svn to see an empty dir instead of
the c++ lib.

Sabre wanted to put this into the README, dunno if this happened.

Cheers,

  Gabor

Arnold Schwaighofer wrote:

Thanks Gabor! I was looking for something like this. (But never actually looked it up in the svn docs;)

Hi Arnold,

deleting that is a bit rude, and svn will recover it
when doing "svn up" next time.

Yes very annoying indeed :slight_smile:

A better solution is to
cd llvm-gcc
svn switch libstdc++ missing

This permanently tells svn to see an empty dir instead of
the c++ lib.

Sabre wanted to put this into the README, dunno if this happened.

I can find no mention of this nice "trick" in llvm-gcc-4.0/README.LLVM or llvm-gcc-4.0/README.Apple

regards

Building multilib works again (at least for me ;). The test report nigthly had 38 failed cases (grep FAILED! report.nightly.raw.out | wc -l) which is around the 30something i had a few days ago.

thanks Dale

Revision: 42159
my flags:
../llvm-gcc-4.0/configure --prefix=/Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/../install --enable-llvm=/Users/arnold/Desktop/testing/vanilla-gcc-4.0/obj/../build --with-arch=nocona --with-tune=generic --with-gxx-include-dir=/usr/include/c++/4.0.0 --build=i686-apple-darwin8 --host=i686-apple-darwin8 --target=i686-apple-darwin8 --enable-checking --program-prefix=llvm- --with-gcc-version-trigger=/Users/arnold/Desktop/testing/vanilla-gcc-4.0/llvm-gcc-4.0/gcc/version.c --enable-languages=c,c++

Thanks Gabor! I was looking for something like this. (But never
actually looked it up in the svn docs;)

In addition, I believe that configure has been modified to handle this for you, so post 2.1 you shouldn't need to delete it.

Thanks,
Tanya

Hi Arnold,

deleting that is a bit rude, and svn will recover it
when doing "svn up" next time.

A better solution is to

cd llvm-gcc
svn switch libstdc++ missing

I added "emptydir" here just for this:

  http://llvm.org/svn/llvm-project/llvm-gcc-4.0/emptydir
  http://llvm.org/svn/llvm-project/llvm-gcc-4.2/emptydir

This permanently tells svn to see an empty dir instead of
the c++ lib.

Sabre wanted to put this into the README, dunno if this happened.

It would be a good idea to do this, I think.

-bw