Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] trunk - non-portable examples/Makefie
From: Paul Hargrove (phhargrove_at_[hidden])
Date: 2014-01-09 01:14:18

With Ralph's fix for opal/util/path.c, I can build the trunk on
However, building the examples fails with:

$ cp -r $SRCDIR/examples .
$ cd examples
$ make
mpicc -g hello_c.c -o hello_c
mpicc -g ring_c.c -o ring_c
mpicc -g connectivity_c.c -o connectivity_c
shmemcc -g -o hello_oshmem
/usr/lib/crt1.o: In function `_start':
crt1.c:(.text+0x8a): undefined reference to `main'
*** [hello_oshmem] Error code 1

Stop in /usr/home/phargrov/OMPI/openmpi-trunk-freebsd9-amd64/BLD/examples.
*** [mpi] Error code 1

Stop in /usr/home/phargrov/OMPI/openmpi-trunk-freebsd9-amd64/BLD/examples.

Notice the lack of a source file on the failing shmemcc command line!!

The commands for SHMEM and Java examples all use "$^", which is NOT
supported by FreeBSD's make.
I can work-around this by explicitly using gmake, but a portable Makefile
would be a better fix.
Since all uses of "$^" are for targets having *exactly* one dependency, it
is safe/correct to substitute "$?".


Paul H. Hargrove                          PHHargrove_at_[hidden]
Future Technologies Group
Computer and Data Sciences Department     Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900