[haiku] Re: Proceedure to build from Linux?

  • From: "Thomas Stover" <cts@xxxxxxxxxxxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Sun, 23 Aug 2015 19:43:21 -0500 (CDT)



On Sunday, August 23, 2015 10:19am, "Urias McCullough" said:

On Sun, Aug 23, 2015 at 7:08 AM, Thomas Stover wrote:

If the "cc" in the jam output is the same as the host's, then it's clearly
not
using the right tool chain.

Why not? It's building the packaging tools using your host toolchain.
Without those, your linux box won't be able to create Haiku packages
during the build process.

Ok, that's believable. ... and it turns out my libcurl was too old. So after
fixing that a clean build appears to be successful.

Now, about that cross compiler...

]$ find -name *gcc*
...
./generated/cross-tools-x86/i586-pc-haiku/bin/gcc
...
./generated/cross-tools-x86/bin/i586-pc-haiku-gcc
...

Those two look like a maybe.

[devros@jdc-user haiku]$ ./generated/cross-tools-x86/bin/i586-pc-haiku-gcc
../../test.c
../../test.c:1:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.

[devros@jdc-user haiku]$ ./generated/cross-tools-x86/i586-pc-haiku/bin/gcc
../../test.c
gcc: error trying to exec 'cc1': execvp: No such file or directory

definitely not that one. How about C++ instead?

[devros@jdc-user haiku]$ ./generated/cross-tools-x86/bin/i586-pc-haiku-g++
../../test.cpp
In file included from
/home/devros/src/haiku/generated/cross-tools-x86/i586-pc-haiku/include/c++/4.8.5/bits/postypes.h:40:0,
from
/home/devros/src/haiku/generated/cross-tools-x86/i586-pc-haiku/include/c++/4.8.5/iosfwd:40,
from
/home/devros/src/haiku/generated/cross-tools-x86/i586-pc-haiku/include/c++/4.8.5/ios:38,
from
/home/devros/src/haiku/generated/cross-tools-x86/i586-pc-haiku/include/c++/4.8.5/ostream:38,
from
/home/devros/src/haiku/generated/cross-tools-x86/i586-pc-haiku/include/c++/4.8.5/iostream:39,
from ../../test.cpp:1:
/home/devros/src/haiku/generated/cross-tools-x86/i586-pc-haiku/include/c++/4.8.5/cwchar:44:19:
fatal error: wchar.h: No such file or directory
#include <wchar.h>
^
compilation terminated.

Hmm. Maybe if just go fully manual on the include paths...


[devros@jdc-user haiku]$ ./generated/cross-tools-x86/bin/i586-pc-haiku-gcc -I
./headers/ -I ./headers/posix/ -I ./headers/os/ ../../test.c

/home/devros/src/haiku/generated/cross-tools-x86/lib/gcc/i586-pc-haiku/4.8.5/../../../../i586-pc-haiku/bin/ld:
cannot find crti.o: No such file or directory
/home/devros/src/haiku/generated/cross-tools-x86/lib/gcc/i586-pc-haiku/4.8.5/../../../../i586-pc-haiku/bin/ld:
cannot find start_dyn.o: No such file or directory
/home/devros/src/haiku/generated/cross-tools-x86/lib/gcc/i586-pc-haiku/4.8.5/../../../../i586-pc-haiku/bin/ld:
cannot find init_term_dyn.o: No such file or directory
/home/devros/src/haiku/generated/cross-tools-x86/lib/gcc/i586-pc-haiku/4.8.5/../../../../i586-pc-haiku/bin/ld:
cannot find -lroot
/home/devros/src/haiku/generated/cross-tools-x86/lib/gcc/i586-pc-haiku/4.8.5/../../../../i586-pc-haiku/bin/ld:
cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status

Ok maybe. What about separating compilation and linking?

[devros@jdc-user haiku]$ ./generated/cross-tools-x86/bin/i586-pc-haiku-gcc -I
./headers/ -I ./headers/posix/ -I ./headers/os/ ../../test.c -c -o test.o

Looks promising.

[devros@jdc-user haiku]$ ./generated/cross-tools-x86/bin/i586-pc-haiku-gcc
test.o ./generated/objects/haiku/x86/release/system/glue/arch/x86/crti.o
/home/devros/src/haiku/generated/cross-tools-x86/lib/gcc/i586-pc-haiku/4.8.5/../../../../i586-pc-haiku/bin/ld:
cannot find crti.o: No such file or directory
...
collect2: error: ld returned 1 exit status

Well that was a fail. Maybe try the mailing list again...




Other related posts: