Errors running `configure`

Hello; I am running into some difficulty in my Haiku x86_64 dev environment today.

I am running a setup with directories;

  • /build/generated (blank)
  • /build/haiku (fresh copy)
  • /built/buildtools (fresh copy)

I’m in the generated directory and run the usual ../haiku/configure .... command that usually works and am getting;

...
checking for x86_64-unknown-haiku-gcc... /build/generated/cross-tools-x86_64-build/gcc/./gcc/xgcc -B/build/generated/cross-tools-x86_64-build/gcc/./gcc/ -B/build/generated/cross-tools-x86_64/x86_64-unknown-haiku/bin/ -B/build/generated/cross-tools-x86_64/x86_64-unknown-haiku/lib/ -isystem /build/generated/cross-tools-x86_64/x86_64-unknown-haiku/include -isystem /build/generated/cross-tools-x86_64/x86_64-unknown-haiku/sys-include   
checking for suffix of object files... configure: error: in `/build/generated/cross-tools-x86_64-build/gcc/x86_64-unknown-haiku/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
make[1]: *** [Makefile:14890: configure-target-libgcc] Error 1
make[1]: Leaving directory '/build/generated/cross-tools-x86_64-build/gcc'
make: *** [Makefile:1044: all] Error 2
ERROR: Building gcc failed.

Looking into the log file for the compile I can see;

configure:3549: /build/generated/cross-tools-x86_64-build/gcc/./gcc/xgcc -B/build/generated/cross-tools-x86_64-build/gcc/./gcc/ -B/build/generated/cross-tools-x86_64/x86_64-unknown-haiku/bin/ -B/build/generated/cross-tools-x86_64/x86_64-unknown-haiku/lib/ -isystem /build/generated/cross-tools-x86_64/x86_64-unknown-haiku/include -isystem /build/generated/cross-tools-x86_64/x86_64-unknown-haiku/sys-include    -V >&5
xgcc: error: unrecognized command-line option '-V'
xgcc: fatal error: no input files
compilation terminated.

…but then later…

configure:3814: /build/generated/cross-tools-x86_64-build/gcc/./gcc/xgcc -B/build/generated/cross-tools-x86_64-build/gcc/./gcc/ -B/build/generated/cross-tools-x86_64/x86_64-unknown-haiku/bin/ -B/build/generated/cross-tools-x86_64/x86_64-unknown-haiku/lib/ -isystem /build/generated/cross-tools-x86_64/x86_64-unknown-haiku/include -isystem /build/generated/cross-tools-x86_64/x86_64-unknown-haiku/sys-include    -c -g -O2  conftest.c >&5
Assembler messages:
Internal error (Segmentation violation).
Please report this bug.
configure:3818: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
....

A segmentation violation doesn’t look good. I am guessing that it is working on the build agents but that they would have the configure step pre-warmed. Is anybody else having difficulty with this before I try more things?

Do you wants/needs to build haiku from/for a different target (cross compile from Linux for instance) or just build from haiku for the same target than the current haiku one?

If it’s the later, usually the generated folder is created at top level of the haiku source root.

cd build/haiku
mkdir generated
cd generated
…/configure

Edit: just figure out you’re an haiku developer, so never mind about this reply, I’m way rusty about haiku build, most probably what I used to know is no more valid.

I arrange it like this for the reason that I can more easily sync code between my virtual env and host env. It works fine like this usually.

Are you on r1beta5?

There is no reason to put the generated folder inside (or outside) the source folder. Both configurations are suppomted.

I think the builders run everything from scratch everytime. But they only test one âersion of Linux (and gcc) as the host.

It would help to know what your host environment is, since the crash is on the host. Is it Linux or Haiku? If linux, which distribution and version? If Haiku, which hrev and are all your packages up to date?

Also maybe share your complete configure command line in case there’s anything specific in there.

The host is Linux Debian Bookworm x86_64 but the build environment is in VirtualBox running Haiku hrev58838 which is updated from http://eu.hpkg.haiku-os.org/haiku/master/x86_64/current.

The full command line is;

../haiku/configure --cross-tools-source ../buildtools --build-cross-tools x86_64

After the update system, I too get this error when building buildtools while configuring a Haiku build. If I roll back the Haiku revision (e.g. to 58810) everything goes without error. Apparently it is some kind of regression in the system.

I just tried running configure with the crosstools here on hrev58841 and it got far past this point. There’s some crashes later on while running gcc configure in as which I’m looking at now, but that’s very long after this.

Figured it out, fixed that problem in hrev58844.

Well, what I’m trying to do is make a Haiku for ARM (32-bit) and to try to mess around with it on an old tablet running Android 4.1

Additional issue that I have encountered is that it doesn’t want to build the tool chain.

Blockquote

Thanks @waddlesplash – I’ll pick that up once it comes through on the update and try again…