Ompi: Make failed on Alpine Linux: unknown type name 'uid_t'

Created on 1 Jul 2016  Ā·  11Comments  Ā·  Source: open-mpi/ompi

Hi
I can't build OpenMPI (from master branch) on Alpine Linux. Please help! Thanks.
Also, what is the best supported Linux distros that you mainly test on?

make[3]: Entering directory '/tmp/ompi-master/opal/mca/pmix/pmix2x/pmix'
make[4]: Entering directory '/tmp/ompi-master/opal/mca/pmix/pmix2x/pmix'
  CC       src/event/pmix_event_registration.lo
In file included from src/event/pmix_event_registration.c:17:0:
/tmp/ompi-master/opal/mca/pmix/pmix2x/pmix/include/pmix_server.h:446:43: error: unknown type name 'uid_t'
                                           uid_t uid, gid_t gid,
                                           ^
/tmp/ompi-master/opal/mca/pmix/pmix2x/pmix/include/pmix_server.h:446:54: error: unknown type name 'gid_t'
                                           uid_t uid, gid_t gid,
                                                      ^
Makefile:1368: recipe for target 'src/event/pmix_event_registration.lo' failed
make[4]: *** [src/event/pmix_event_registration.lo] Error 1
make[4]: Leaving directory '/tmp/ompi-master/opal/mca/pmix/pmix2x/pmix'
Makefile:1619: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/tmp/ompi-master/opal/mca/pmix/pmix2x/pmix'
Makefile:2035: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/tmp/ompi-master/opal/mca/pmix/pmix2x'
Makefile:2382: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/tmp/ompi-master/opal'
Makefile:1901: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Most helpful comment

@rhc54
it seems alpine defines uid_t in unistd.h and not in sys/types.h
by any chance, would pmix only #include the latter ?

@NLKNguyen is ssh installed in the docker image ? is it in the $PATH ?
you can try
mpirun --mca plm_rsh_agent /usr/bin/ssh ...
or edit the etc/openmpi-mca-params.conf (please double check the name)
and add/replace
pml_rsh_agent = /usr/bin/ssh

All 11 comments

Can you tell me what header contains uid_t on Alpine? Just do a ā€œman getuidā€ and it should tell us.

We generally test on RHEL/Fedora, CentOS, Ubuntu, SLES, and OSX (and probably others that I’m overlooking).

On Jun 30, 2016, at 8:29 PM, Nguyen Nguyen [email protected] wrote:

Hi
I can't build OpenMPI (from master branch) on Alpine Linux. Please help! Thanks.
Also, what is the best supported Linux distros that you mainly test on?

make[3]: Entering directory '/tmp/ompi-master/opal/mca/pmix/pmix2x/pmix'
make[4]: Entering directory '/tmp/ompi-master/opal/mca/pmix/pmix2x/pmix'
CC src/event/pmix_event_registration.lo
In file included from src/event/pmix_event_registration.c:17:0:
/tmp/ompi-master/opal/mca/pmix/pmix2x/pmix/include/pmix_server.h:446:43: error: unknown type name 'uid_t'
uid_t uid, gid_t gid,
^
/tmp/ompi-master/opal/mca/pmix/pmix2x/pmix/include/pmix_server.h:446:54: error: unknown type name 'gid_t'
uid_t uid, gid_t gid,
^
Makefile:1368: recipe for target 'src/event/pmix_event_registration.lo' failed
make[4]: ** [src/event/pmix_event_registration.lo] Error 1
make[4]: Leaving directory '/tmp/ompi-master/opal/mca/pmix/pmix2x/pmix'
Makefile:1619: recipe for target 'all-recursive' failed
make[3]: *
* [all-recursive] Error 1
make[3]: Leaving directory '/tmp/ompi-master/opal/mca/pmix/pmix2x/pmix'
Makefile:2035: recipe for target 'all-recursive' failed
make[2]: ** [all-recursive] Error 1
make[2]: Leaving directory '/tmp/ompi-master/opal/mca/pmix/pmix2x'
Makefile:2382: recipe for target 'all-recursive' failed
make[1]: *
* [all-recursive] Error 1
make[1]: Leaving directory '/tmp/ompi-master/opal'
Makefile:1901: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/open-mpi/ompi/issues/1838, or mute the thread https://github.com/notifications/unsubscribe/ACU-4PdhbszNhM5JQqoD-2aKd-GhlUtnks5qRImWgaJpZM4JCyeZ.

It would probably be better to send all the build information listed here:

https://www.open-mpi.org/community/help/

Thanks you two for quick responses! I attached the zip of *.out files according to the help doc.
ompi-output.zip

Since Alpine is a very minimal Linux distro (5MB), many things are not included by default. I installed man and man-pages, but man command is not functional.

I use Docker's official Alpine image. Although my host OS is Windows, my Docker is running in a Linux VM. It's not going to be Windows issue here.

If we can manage to make this work, I'll publish on DockerHub an Alpine image with OpenMPI-ready so that it only takes seconds for people to try out OpenMPI on an extremely lightweight image. If possible, I can help package OpenMPI for Alpine's package repository. Currently there is no MPI or OpenMPI there.

There is an Alpine image with OpenMPI https://hub.docker.com/r/qnib/alpn-openmpi/~/dockerfile/ (which is based on this https://hub.docker.com/r/qnib/alpn-infiniband/~/dockerfile/), but I couldn't run the provided hello_mpi program even though it was compiled. Their parameter for ./configure is different from what OpenMPI Installation doc uses. That's why I attempted to rebuild with the parameter that the doc suggests.
This is the message I got when I tried to run the program. I don't have any experience with OpenMPI, so I wonder whether this is somewhat expected because of a simple missing step?

/usr/local/bin # mpirun --allow-run-as-root -np 2 ./hello_mpi
-----------------------------------------------------------------------
The value of the MCA parameter "plm_rsh_agent" was set to a path
that could not be found:

  plm_rsh_agent: ssh : rsh

Please either unset the parameter, or check that the path is correct

P.S.: Out of curiosity, if you were to teach a Distributed Systems class in university, would you choose MPI for students to practice the concepts?

Thanks again!

@rhc54
it seems alpine defines uid_t in unistd.h and not in sys/types.h
by any chance, would pmix only #include the latter ?

@NLKNguyen is ssh installed in the docker image ? is it in the $PATH ?
you can try
mpirun --mca plm_rsh_agent /usr/bin/ssh ...
or edit the etc/openmpi-mca-params.conf (please double check the name)
and add/replace
pml_rsh_agent = /usr/bin/ssh

Ahh, I overlooked ssh. After installing it, the hello_mpi program works. Didn't think that ssh would be necessary for running on a single host. Thanks for pointing out.

/usr/local/bin # mpirun --allow-run-as-root -np 1 ./hello_mpi
Hello world from processor 7cfb799c9e79, rank 0 out of 1 processors

So, it seems like that qnib/alpn-openmpi Docker image has OpenMPI working and is only missing ssh. I think I can learn from their dockerfiles to do a clean build again. I'll post the steps once I make it.

It isn’t required at all - just add ā€˜-mca plm isolated’ on your cmd line

On Jul 1, 2016, at 6:33 PM, Nguyen Nguyen [email protected] wrote:

Ahh, I overlooked ssh. After installing it, the hello_mpi program works. Didn't think that ssh would be necessary for running on a single host. Thanks for pointing out.

/usr/local/bin # mpirun --allow-run-as-root -np 1 ./hello_mpi
Hello world from processor 7cfb799c9e79, rank 0 out of 1 processors
So, it seems like that qnib/alpn-openmpi Docker image has OpenMPI working and is only missing ssh. I think I can learn from their dockerfiles to do a clean build again. I'll post the steps once I make it.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/open-mpi/ompi/issues/1838#issuecomment-230076600, or mute the thread https://github.com/notifications/unsubscribe/ACU-4L5fd7FRRhr2iSliz6GFunRo0wtnks5qRb_lgaJpZM4JCyeZ.

Can you please provide the link to the mca related section in the documentation for reference?

Great, thanks!

Unfortunately I can't build OpenMPI by following the steps in that Docker image. The download links they used were dead, and the build details on DockerHub shows that the last successful build was many months ago.

I think I will drop this and only use only one of the distros that you mainly test on, probably Ubuntu.

Thanks for the help!

@NLKNguyen you can download a fix at https://patch-diff.githubusercontent.com/raw/pmix/master/pull/111.patch

and then

cd opal/mca/pmix/pmix2x/pmix
patch -p1 < 111.patch

unless you are planning to do develop OpenMPI, you might want to use the latest stable version (1.10.3) available at https://www.open-mpi.org/software/ompi/v1.10/ instead of the master branch
note i had to add --disable-vt to the configure command line in order to build it under alpine linux

Was this page helpful?
0 / 5 - 0 ratings