Thanks very much Jeff. Sorry, I have had power outage for some length of time. I had earlier linked signal.h in "/usr/include/x86_64-linux-gnu/asm". The NSIG error went away but other errors came, which suggested it was the wrong signal.h. I will work along the lines you suggest and let you know how it goes. Thanks and regards.
On Wed, Sep 28, 2022 at 8:34 PM Jeff Squyres (jsquyres) <jsquy...@cisco.com> wrote: > Looking at the detailed compile line in the "make" output that you sent, I > don't see anything too unusual (e.g., in -I or other preprocessor > directives). > > You might want to look around your machine and see if there's an alternate > signal.h that is somehow getting found and included. > > If that doesn't yield anything interesting, then perhaps copy the > "/usr/bin/gcc ..." command for compiling signal.c from your make.out file, > and add in a -E so that you can see the preprocessor output. Then you can > probably track down exactly which signal.h is being used. For example, > this is the command I see in your make.out (with line breaks added for > readability): > > /usr/bin/gcc -DHAVE_CONFIG_H -I. \ > > -I../../../../../../opal/mca/event/libevent2022/libevent \ > > -I../../../../../../opal/mca/event/libevent2022/libevent/compat \ > > -I../../../../../../opal/mca/event/libevent2022/libevent/include \ > > -I./include -I/home/zmumba/LIBS/src/openmpi-4.1.4 \ > > -I/home/zmumba/LIBS/src/openmpi-4.1.4/build \ > > -I/home/zmumba/LIBS/src/openmpi-4.1.4/opal/include \ > > -I/home/zmumba/LIBS/src/openmpi-4.1.4/build/opal/mca/hwloc/hwloc201/hwloc/include > \ > > -I/home/zmumba/LIBS/src/openmpi-4.1.4/opal/mca/hwloc/hwloc201/hwloc/include > \ > > -DNDEBUG -Drandom=opal_random -O -fPIC -D_XOPEN_SOURCE=500 -Wall \ > > -fno-strict-aliasing -pthread -MT signal.lo -MD -MP -MF \ > > .deps/signal.Tpo -c \ > > ../../../../../../opal/mca/event/libevent2022/libevent/signal.c -fPIC \ > > -DPIC -o .libs/signal.o > > > If you remove the -o .libs/signal.o and instead put in a -E, you can > redirect that and see the source code that came out of the preprocessor, > and do a little backwards digging to figure out which signal.h was used: > > /usr/bin/gcc -DHAVE_CONFIG_H -I. \ > > -I../../../../../../opal/mca/event/libevent2022/libevent \ > > -I../../../../../../opal/mca/event/libevent2022/libevent/compat \ > > -I../../../../../../opal/mca/event/libevent2022/libevent/include \ > > -I./include -I/home/zmumba/LIBS/src/openmpi-4.1.4 \ > > -I/home/zmumba/LIBS/src/openmpi-4.1.4/build \ > > -I/home/zmumba/LIBS/src/openmpi-4.1.4/opal/include \ > > -I/home/zmumba/LIBS/src/openmpi-4.1.4/build/opal/mca/hwloc/hwloc201/hwloc/include > \ > > -I/home/zmumba/LIBS/src/openmpi-4.1.4/opal/mca/hwloc/hwloc201/hwloc/include > \ > > -DNDEBUG -Drandom=opal_random -O -fPIC -D_XOPEN_SOURCE=500 -Wall \ > > -fno-strict-aliasing -pthread -MT signal.lo -MD -MP -MF \ > > .deps/signal.Tpo -c \ > > ../../../../../../opal/mca/event/libevent2022/libevent/signal.c -fPIC \ > > -DPIC -E > signal-preprocessed.c > > -- > Jeff Squyres > jsquy...@cisco.com > ------------------------------ > *From:* Zilore Mumba <zmu...@gmail.com> > *Sent:* Wednesday, September 28, 2022 1:50 AM > *To:* Jeff Squyres (jsquyres) <jsquy...@cisco.com> > *Cc:* users@lists.open-mpi.org <users@lists.open-mpi.org> > *Subject:* Re: [OMPI users] openmpi compile failure > > Thanks once again for that insight Jeff. Indeed it is my configuration. > When I run the code snippet you sent I get exactly the result you have " > NSIG is 65". > So I have to ensure my configure is pointing to the right libraries. > > On Wed, Sep 28, 2022 at 2:02 AM Jeff Squyres (jsquyres) < > jsquy...@cisco.com> wrote: > > I'm not sure why that would happen; it does sound like some kind of > misconfiguration on your system. > > If I compile this trivial application on Ubuntu 18.04: > > #include <signal.h> > > #include <stdio.h> > > > int main() { > > printf("NSIG is %d\n", NSIG); > > return 0; > > } > > Like this: > > $ gcc foo.c -o foo && ./foo > > NSIG is 65 > > You can see that NSIG is definitely defined for me. > > It's likely that until the above trivial program can compile properly, > Open MPI won't compile properly, either. > > -- > Jeff Squyres > jsquy...@cisco.com > ------------------------------ > *From:* Zilore Mumba <zmu...@gmail.com> > *Sent:* Tuesday, September 27, 2022 2:51 PM > *To:* Jeff Squyres (jsquyres) <jsquy...@cisco.com> > *Cc:* users@lists.open-mpi.org <users@lists.open-mpi.org> > *Subject:* Re: [OMPI users] openmpi compile failure > > Thanks Jeff, > I have tried with openmpi-4.1.4, but I still get the same error. The main > error being > ../../../../../../opal/mca/event/libevent2022/libevent/signal.c:135:14: > error: ‘NSIG’ undeclared (first use in this function); did you mean ‘_NSIG’? > int ncaught[NSIG]; > ^~~~ > _NSIG > But I notice that inthe file "/usr/include/x86_64-linux-gnu/asm/signal.h" > there is some definition of NSIG > #define NSIG 32 > typedef unsigned long sigset_t; > .... > .... > /* These should not be considered constants from userland. */ > #define SIGRTMIN 32 > #define SIGRTMAX _NSIG > > So I am wondering if it is my system which is not picking up the correct > version of signal.h > I have a attached a new zipped file ompi-output-tar.bz2, which is also on > dropbox, link > https://www.dropbox.com/s/ps49xqximjnn8oy/ompi-output.tar.bz2?dl=0 > > > On Tue, Sep 27, 2022 at 2:19 PM Jeff Squyres (jsquyres) < > jsquy...@cisco.com> wrote: > > Can you re-try with the latest Open MPI v4.1.x release (v4.1.4)? There > have been many bug fixes since v4.1.0. > > -- > Jeff Squyres > jsquy...@cisco.com > > ------------------------------ > *From:* users <users-boun...@lists.open-mpi.org> on behalf of Zilore > Mumba via users <users@lists.open-mpi.org> > *Sent:* Tuesday, September 27, 2022 5:10 AM > *To:* users@lists.open-mpi.org <users@lists.open-mpi.org> > *Cc:* Zilore Mumba <zmu...@gmail.com> > *Subject:* Re: [OMPI users] openmpi compile failure > > I am seeking help compiling openmpi. My compilation and installation > output is in dropbox at the link below > https://www.dropbox.com/s/1a9tv5lnwicnhds/ompi-output.tar.bz2?dl=0 > Help will be appreciated. > >