Skip to content

Improved build documentation when building dependencies #47631

@smartalecH

Description

@smartalecH

I've been working on building Julia (release 1.8.2) on some rather complicated internal infrastructure. Throughout my journey (discussed a bit in this discourse thread), I've realized there are some important details missing in the build documentation that would probably help others. For example...

  1. patchelf effectively clobbers the user-specified LDFLAGS, and instead uses CXXLDFLAGS:

$(dir $<)/configure $(CONFIGURE_COMMON) LDFLAGS="$(CXXLDFLAGS)" CPPFLAGS="$(CPPFLAGS)"

  1. Some libraries, like gmp, effectively ignore LDFLAGS altogether, and instead expect the user to pass important parameters, like runtime paths, to the CFLAGS and CXXFLAGS (as discussed here).
  2. Perhaps the most difficult issue to navigate is the infamous libstdc++ loading problem (discussed here). While there was a recent fix intended to help mitigate this issue (Probe and dlopen() the correct libstdc++ #46976) it's not clear to what extent it does. Furthermore, it appears that PR wasn't percolated to the recent 1.8.3 release, or even the 1.9-alpha release. While a minimum gcc version is documented, there is no maximum version documented for any of the releases.

I'm still trying to work through issue 3 myself. When I build LLVM, it uses my compiler's libstdc++. When the build script moves to building Julia (and loads some LLVM libraries), the linker references Julia's libstdc++ rather than the version LLVM was built with. I'm assuming this is only a problem because my compiler's version is newer (a recently patched version of gcc11.2) but I'm still working through this...

I'm happy to add a PR that describes these details more thoroughly, but I want to make sure I'm not missing something obvious first.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildingBuild system, or building Julia or its dependenciesdocsThis change adds or pertains to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions