[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Conflicts between 4.1 and 4.2 toolchains

Wookey and several others are aware of the acute problems I had with gcc
at DebConf7. Incredibly frustrating at the time. The problem first
arose when trying to build a reverse_cross of gcc: 
build = amd64|powerpc|i386 
host = arm
target = arm

It resurfaced today, trying to finalise the patch that will enable
reverse_cross support in gcc-4.2.

With considerable help and assistance, I did manage to create a working
solution on a separate machine but I could not fix the problem on my
powerpc laptop. I incorrectly blamed the toolchain built by emchain
and/or the limited RAM of my particular powerpc laptop for some weird
compiling error.

For the record, it was something else entirely. The error report is:
Checking how to run the C preprocessor... arm-linux-gnu-cpp
configure: error: C preprocessor "arm-linux-gnu-cpp" fails sanity check

I was unable to find any information on this and gcc maintainers at
DebConf had not seen this error before. The same error occurs with
a normal Emdebian build of libglib-2.0 - which built fine with the 4.1

After setting up my amd64 machine at home for gcc-4.2, I got exactly
the same error! The working machine was amd64 too and the toolchain was
the same.

After a few double-takes, the fix is:

$ sudo apt-get remove --purge cpp-4.1-arm-linux-gnu

cpp-4.1-arm-linux-gnu is incompatible with cpp-4.2-arm-linux-gnu.


The working amd64 machine (c/o Wookey) was a fresh install inside a
chroot so only the 4.2 toolchain is installed. This box is my main
build machine and still had the 4.1 toolchain installed. So far, I've
left gcc-4.1-arm-linux-gnu and other parts of the 4.1 toolchain

Before installing the new 4.2 toolchains, please consider uninstalling
the cross 4.1 C preprocessor for the relevant architecture. In
practise, this may mean that the entire 4.1 toolchain will have to
conflict with the 4.2 toolchain as gcc-4.1 might not be happy with
only cpp-4.2 instead of cpp-4.1 and cpp-4.2. Gyrosgeier? Zumbi? 

Alternatively, consider using empdebuild and chroots to isolate the
toolchain from the rest of the build machine.

(I'll add a line to empdebuild to remove cpp-4.1-$ARCHTYPE if
cpp-4.2-$ARCHTYPE needs to be installed inside a chroot. A future
version of empdebuild will use the underlying pbuilder code to support
more than one chroot on the command line too. Initially, it uses a
default to speed up development.)

It doesn't appear to matter if cpp-4.1-mips-linux-gnu remains
installed, etc.



Neil Williams

Attachment: pgpKCkCcFek7X.pgp
Description: PGP signature

Reply to: