[haiku-development] Re: Cross-compiling Haiku with jam under Freebsd: fails consistently on undefined references

  • From: "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 17 Aug 2017 10:56:08 +0000

17 août 2017 11:37 "Thomas Mueller" <mueller6723@xxxxxxx> a écrit:

I still see vestiges of configuration/support for Cygwin, OpenBSD, SunOS, and 
I guess Darwin is for
MacOS.

Time to clear out the deadwood, and remove references in configure script to 
bootstrap build and
--use-clang if these are broken?


That would only mean more work for people who want to restore them. However, we 
should probably hide them from ./configure --help if they are still mentionned 
there.

You just run "git diff" in your haiku checkout directory and it will list 
all the changes you made.
You can of course redirect stdout to a file to share the output with us.

That seems easy enough. Then I don't want to save .orig files in the same 
tree, but would want to
put them in another partial haiku-save tree.

Files you create are ignored by git, unless you use "git add" on them. So it is 
not a problem to have .orig files around.


In this command line I see a -lsupc++ but no -lstdc++, which is where I
would expect std::bad_alloc and other libstdc++ things to be. Are you
sure your setting for HOST_LIBSTDC++ is correct?

I have HOST_LIBSTDC++ = stdc++ ; and
HOST_LIBSUPC++ = supc++ ; (with spaces and semicolons).

Ok, I checked the Jamfile building this:
http://cgit.haiku-os.org/haiku/tree/src/tools/package/Jamfile

It looks like HOST_LIBSTDC++ is missing there. So we should add it.

You mean the last line?

libpackage_build.so $(HOST_LIBBE) $(HOST_LIBSUPC++)

Should there have been $(HOST_LIBSTDC++) at the end of that line?

But this particular Jamfile seems to be for all HOST_PLATFORMs.

It should be harmless to link in an extra library on other platforms.


How or why does this omission stop building Haiku from FreeBSD but not from 
Linux or Haiku?

Probably because they use different versions of libstdc++. In some, the 
std::bad_alloc::bad_alloc() method will be inline, or in libsupc++, but in 
others, it will be in libstdc++. Or maybe they have a compiler that detects C++ 
files and automatically adds -lstdc++ to the linker flags.

Anyway, it should be fine to force linking of -lstdc++ here by adding 
$(HOST_LIBSTDC++) before $(HOST_LIBSUPC++).

-- 
Adrien.

Other related posts: