All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Julien Olivain <ju.o@free.fr>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 4/5] package/openmpi-examples: new package
Date: Tue, 21 Feb 2023 10:12:33 +0100	[thread overview]
Message-ID: <20230221101233.039af4c5@windsurf> (raw)
In-Reply-To: <20230207220941.58066-4-ju.o@free.fr>

Hello Julien,

On Tue,  7 Feb 2023 23:09:40 +0100
Julien Olivain <ju.o@free.fr> wrote:

> diff --git a/package/openmpi-examples/Config.in b/package/openmpi-examples/Config.in
> new file mode 100644
> index 0000000000..caaa02d802
> --- /dev/null
> +++ b/package/openmpi-examples/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_OPENMPI_EXAMPLES
> +	bool "openmpi-examples"
> +	select BR2_PACKAGE_OPENMPI
> +	help
> +	  This package includes the hello_c example from openmpi. It
> +	  is mainly used as a simple openmpi program to test the
> +	  libraries. It is also a recipe example for cross compiling
> +	  an openmpi program with the mpicc wrappers.
> diff --git a/package/openmpi-examples/openmpi-examples.hash b/package/openmpi-examples/openmpi-examples.hash
> new file mode 120000
> index 0000000000..b8afe5e2d9
> --- /dev/null
> +++ b/package/openmpi-examples/openmpi-examples.hash
> @@ -0,0 +1 @@
> +../openmpi/openmpi.hash
> \ No newline at end of file
> diff --git a/package/openmpi-examples/openmpi-examples.mk b/package/openmpi-examples/openmpi-examples.mk
> new file mode 100644
> index 0000000000..be679333c7
> --- /dev/null
> +++ b/package/openmpi-examples/openmpi-examples.mk
> @@ -0,0 +1,29 @@
> +################################################################################
> +#
> +# openmpi-examples
> +#
> +################################################################################
> +
> +OPENMPI_EXAMPLES_VERSION = $(OPENMPI_VERSION)
> +OPENMPI_EXAMPLES_SOURCE = $(OPENMPI_SOURCE)
> +OPENMPI_EXAMPLES_DL_SUBDIR = openmpi
> +OPENMPI_EXAMPLES_SITE = $(OPENMPI_SITE)
> +OPENMPI_EXAMPLES_LICENSE = $(OPENMPI_LINCENSE)
> +OPENMPI_EXAMPLES_LICENSE_FILES = $(OPENMPI_LICENSE_FILES)

Why is this a separate package? If those examples come with openmpi,
then building the examples should be a suboption of the openmpi package.

> +OPENMPI_EXAMPLES_DEPENDENCIES = openmpi
> +
> +define OPENMPI_EXAMPLES_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) PATH=$(STAGING_DIR)/usr/bin:$(BR_PATH) OPAL_DESTDIR=$(STAGING_DIR)/usr \

Adding $(STAGING_DIR)/usr/bin in the PATH is a bad idea, as it contains
a lot of tools/binaries cross-compiled for the target.

> +	mpicc \
> +		$(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
> +		-o $(@D)/examples/hello_c \
> +		$(@D)/examples/hello_c.c

So either, we need to change things so that mpicc is installed to
$(HOST_DIR), or you need to invoke it as $(STAGING_DIR)/usr/bin/mpicc.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-02-21  9:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07 22:09 [Buildroot] [PATCH 1/5] DEVELOPERS: add Julien Olivain for package/openmpi Julien Olivain
2023-02-07 22:09 ` [Buildroot] [PATCH 2/5] package/openmpi: bump to version 4.1.4 Julien Olivain
2023-02-21 20:06   ` Thomas Petazzoni via buildroot
2023-02-07 22:09 ` [Buildroot] [PATCH 3/5] package/openmpi: enable mpi compiler wrapper scripts Julien Olivain
2023-02-21  9:10   ` Thomas Petazzoni via buildroot
2023-08-10 21:16   ` Thomas Petazzoni via buildroot
2023-02-07 22:09 ` [Buildroot] [PATCH 4/5] package/openmpi-examples: new package Julien Olivain
2023-02-21  9:12   ` Thomas Petazzoni via buildroot [this message]
2023-02-07 22:09 ` [Buildroot] [PATCH 5/5] support/testing: add test for openmpi Julien Olivain
2023-02-21  8:57 ` [Buildroot] [PATCH 1/5] DEVELOPERS: add Julien Olivain for package/openmpi Thomas Petazzoni via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230221101233.039af4c5@windsurf \
    --to=buildroot@buildroot.org \
    --cc=ju.o@free.fr \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.