Giter VIP home page Giter VIP logo

Comments (6)

garlick avatar garlick commented on May 29, 2024

On the more mundane task of just getting ngrm building again, I added a new pkg-config file called flux-core-srctree in pull request #74 that is not installed, and can be accessed from the GNU Makefile of a project checked out beside it like this:

topdir := $(dir $(lastword $(MAKEFILE_LIST)))
abs_topdir := $(abspath $(topdir))
flux_top_builddir := $(abspath $(abs_topdir)/../flux-core)
flux_top_srcdir := $(abspath $(abs_topdir)/../flux-core)

FLUX_CFLAGS := $(shell PKG_CONFIG_PATH=$(flux_top_builddir)/etc \
        pkg-config --cflags flux-core-srctree)
FLUX_LIBS := $(shell PKG_CONFIG_PATH=$(flux_top_builddir)/etc \
        pkg-config --libs flux-core-srctree)

This provides a relatively simple way to export the information needed to find lua, json-c, zmq, czmq, and to link against -lflux-core and #include <flux/core.h> in a manner such that code will not need to be changed to build against installed vs source tree flux-core.

The utility code duplication problem could be solved by breaking liblsd out to its own installed package and maybe adding optparse and nodeset to it. LSD code would need to be built without the exit-on-error handlers compiled in, and nodset etc would need to not call xzmalloc() and oom() internally. Alternatively, this code could be compiled as a git subpackage in its own repo and shared between flux-core, ngrm, and whatever else needs it. Posponing this decision, I created an ngrm branch ngrm-builds-against-flux-core which simply pulls in any utility bits it needs with vpath, thus it only builds against the checked out source tree, e.g.

# Borrow some source from flux-core source tree that was not
# intended to be exported (FIXME)
#
vpath %.c $(flux_top_srcdir)/src/bindings/lua
vpath %.c $(flux_top_srcdir)/src/common/liblsd
vpath %.c $(flux_top_srcdir)/src/common/libutil

from flux-core.

garlick avatar garlick commented on May 29, 2024

We changed the approach in ngrm-builds-against-core slightly. IInstead of the flux-core-srctree pkg-config file, now we generate a Makefile.inc in flux-core that can be included in ngrm. In ngrm, run ./config ../flux-core (relative path to flux-core's build directory). This allows more info, such as the srctree locaiton, to be exported from flux-core to other projects, and eliminates the need to edit ngrm's Makefile.inc, which could be a hassle.

from flux-core.

trws avatar trws commented on May 29, 2024

Just for an example, I created a quick CMake based build setup for the flux-barrier repo here: https://github.com/trws/flux-barrier

If we were to go that way, I would probably suggest including a FindFluxCore.cmake or similar in the main project that can populate all of the necessary stuff in any branch project. That way people are free to use a flux-like tree or not as they like. To get this to work now, all it needs is cmake -D FLUX_CORE_PATH=<path to installed flux core> where it will pull in the pkg-config from the current setup and use that to build the xbarrier libraries and module.

It's pretty minimal at the moment, but it should at least give an idea of what the full system would look like.

from flux-core.

garlick avatar garlick commented on May 29, 2024

@trws: sorry, I have not had time to really focus on this. Would you be willing to submit a pull request to flux-core to add the needed cmake bits?

from flux-core.

lipari avatar lipari commented on May 29, 2024

Here is a nice comparison of some of the options - albeit one promoting a commercial solution.
http://www.perforce.com/blog/121025/managing-projects-across-git-repositories

from flux-core.

garlick avatar garlick commented on May 29, 2024

I think we've reached a fairly stable arrangement at least with regard to flux-core and flux-sched. Any further issues can be opened separately.

from flux-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.