libltdl doesn't compile when using mpich

Bug #414248 reported by Dion Weatherley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ESyS-Particle
Fix Released
Medium
Unassigned

Bug Description

When compiling against mpich, the appropriate toplevel configure command is:

./configure CC=mpicc CXX=mpicxx [+ other configure arguments]

however during compilation of libltdl/ directory, a large number of errors are reported similar to:
<quote>
In file included from loaders/dlopen.c:32:
libltdl/lt__private.h:35:23: error: #include expects "FILENAME" or <FILENAME>
In file included from libltdl/lt__private.h:52,
                 from loaders/dlopen.c:32:
libltdl/lt__dirent.h:35:23: error: #include expects "FILENAME" or <FILENAME>
In file included from libltdl/lt__private.h:52,
                 from loaders/dlopen.c:32:
libltdl/lt__dirent.h:84: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘-’ token
</quote>

This appears to be because mpicc/mpicxx doesn't play nicely with libltdl. To compile libltdl, use gcc/g++ instead, by doing the following:

cd libltdl
./configure [+ other configure arguments]
make
cd ..

Then continue to make ESyS-Particle ("make" in the toplevel source code directory).

This bug does not occur when compiling against OpenMPI or SGIMPT.

Action: Need to modify build configuration to detect mpich and configure libltdl/ correctly for this case.

Revision history for this message
M K SINGH (mrityunjay111) wrote :

Hi,
I am getting also the same error when I am trying to install on my laptop with ubuntu 9.04 os. I tried the remedy given but did not work. Some more observation or suggestion in this regard will be very helpful for me.

Revision history for this message
Dion Weatherley (d-weatherley) wrote :

Hi MK,

I have tried this work around many times and it works well. You need to ensure that when you execute 'configure' in the 'libltdl' directory you should remove the arguments 'CC=mpicc CXX=mpic++' so that your default compiler will be used to compile the libltdl tools.

Cheers,

Dion.

Revision history for this message
M K SINGH (mrityunjay111) wrote :

Dear Dion,
Thanks for the reply. I tried only ./configure in 'libltdl' directory after that i used the command make:
the list of actions are as follows
=======================================
DIR libltdl ----> ./configure
                           make

cd ...
./configure
make
========================================
But when I am using make command I am getting following error
----------------------------------------------------------------------------------------------------
make all-recursive
make[1]: Entering directory `/home/msingh/DEM/ESyS-Particle-2.0'
Making all in libltdl
make[2]: Entering directory `/home/msingh/DEM/ESyS-Particle-2.0/libltdl'
make all-am
make[3]: Entering directory `/home/msingh/DEM/ESyS-Particle-2.0/libltdl'
make[3]: Leaving directory `/home/msingh/DEM/ESyS-Particle-2.0/libltdl'
make[2]: Leaving directory `/home/msingh/DEM/ESyS-Particle-2.0/libltdl'
Making all in Foundation
make[2]: Entering directory `/home/msingh/DEM/ESyS-Particle-2.0/Foundation'
/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. "-I.." -pthread -I/usr/include -g -O2 -MT Timer.lo -MD -MP -MF .deps/Timer.Tpo -c -o Timer.lo Timer.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I.. -pthread -I/usr/include -g -O2 -MT Timer.lo -MD -MP -MF .deps/Timer.Tpo -c Timer.cpp -fPIC -DPIC -o .libs/Timer.o
In file included from Timer.cpp:13:
Timer.h:17:17: error: mpi.h: No such file or directory
Timer.cpp: In member function ‘MpiWTimer& MpiWTimers::findOrCreateTimer(const std::string&)’:
Timer.cpp:174: error: ‘MPI_Wtime’ was not declared in this scope
Timer.cpp: In member function ‘void MpiWTimers::start(const std::string&)’:
Timer.cpp:186: error: ‘MPI_Wtime’ was not declared in this scope
Timer.cpp: In member function ‘void MpiWTimers::stop(const std::string&, bool)’:
Timer.cpp:191: error: ‘MPI_Wtime’ was not declared in this scope
Timer.cpp: In member function ‘void MpiWTimers::pause(const std::string&)’:
Timer.cpp:211: error: ‘MPI_Wtime’ was not declared in this scope
Timer.cpp: In member function ‘void MpiWTimers::resume(const std::string&)’:
Timer.cpp:217: error: ‘MPI_Wtime’ was not declared in this scope
make[2]: *** [Timer.lo] Error 1
make[2]: Leaving directory `/home/msingh/DEM/ESyS-Particle-2.0/Foundation'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/msingh/DEM/ESyS-Particle-2.0'
make: *** [all] Error 2
----------------------------------------------------------------------------------------------------------

Could you please help me in this regard?
With best regards.
M K

Revision history for this message
Dion Weatherley (d-weatherley) wrote :

Hi MK,

It would appear that you have managed to successfully compile the code in the libltdl directory so that's a start. Here is what I suggest you do from here:

1) cd /home/msingh/DEM/ESyS-Particle-2.0/
2) make distclean
3) sh autogen.sh
4) ./configure CC=mpicc CXX=mpic++
5) cd libltdl
6) ./configure
7) cd ..
8) make
9) make install (if you receive no compilation errors in step 8)

If you have any further problems with the installation, could you please send details in a new question on the ESyS-Particle answers page:
https://answers.launchpad.net/esys-particle

Cheers,

Dion.

Changed in esys-particle:
status: Confirmed → Won't Fix
Changed in esys-particle:
status: Won't Fix → Triaged
Changed in esys-particle:
status: Triaged → Fix Released
status: Fix Released → Fix Committed
Revision history for this message
Anton Gladky (gladky-anton) wrote :

Dion, I still have to configure libltdl directory independently. Is it correct, or not?

Revision history for this message
Dion Weatherley (d-weatherley) wrote :

Hi Anton,

Yes, manual configuration of libltdl is still required when using mpich. Since there is an easy workaround described in this bug, I'm calling this bug a "feature" for now. Perhaps we'll try to fix configure.ac for v2.1 to auto-detect mpich (but only if/when the rest of the features/bugfixes are done).

Sorry, I guess changing the status of this bug was confusing. There is no "workaround found" status option and I don't think any of the other status options apply either. I don't find it that annoying to work around this bug now that I know what it is. Happy to be convinced otherwise though. ;)

Cheers,

Dion.

Revision history for this message
Anton Gladky (gladky-anton) wrote : Re: [Bug 414248] Re: libltdl doesn't compile when using mpich

Ok, thank you!

I was just thinking, that it is now no necessity to use the workaround :)

PS By the way, I would recommend you to look at "scons" instead of
autotools. YADE is using it. It seems a very convenient and powerful thing
which allows to automatize almost all processes during the building.
______________________________

Anton Gladkyy

2010/2/5 Dion Weatherley <email address hidden>

> Hi Anton,
>
> Yes, manual configuration of libltdl is still required when using mpich.
> Since there is an easy workaround described in this bug, I'm calling
> this bug a "feature" for now. Perhaps we'll try to fix configure.ac for
> v2.1 to auto-detect mpich (but only if/when the rest of the
> features/bugfixes are done).
>
> Sorry, I guess changing the status of this bug was confusing. There is
> no "workaround found" status option and I don't think any of the other
> status options apply either. I don't find it that annoying to work
> around this bug now that I know what it is. Happy to be convinced
> otherwise though. ;)
>
> Cheers,
>
> Dion.
>
> --
> libltdl doesn't compile when using mpich
> https://bugs.launchpad.net/bugs/414248
> You received this bug notification because you are subscribed to ESyS-
> Particle.
>
> Status in ESyS-Particle: HPC Discrete Element Modelling Software: Fix
> Committed
>
> Bug description:
> When compiling against mpich, the appropriate toplevel configure command
> is:
>
> ./configure CC=mpicc CXX=mpicxx [+ other configure arguments]
>
> however during compilation of libltdl/ directory, a large number of errors
> are reported similar to:
> <quote>
> In file included from loaders/dlopen.c:32:
> libltdl/lt__private.h:35:23: error: #include expects "FILENAME" or
> <FILENAME>
> In file included from libltdl/lt__private.h:52,
> from loaders/dlopen.c:32:
> libltdl/lt__dirent.h:35:23: error: #include expects "FILENAME" or
> <FILENAME>
> In file included from libltdl/lt__private.h:52,
> from loaders/dlopen.c:32:
> libltdl/lt__dirent.h:84: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘-’ token
> </quote>
>
> This appears to be because mpicc/mpicxx doesn't play nicely with libltdl.
> To compile libltdl, use gcc/g++ instead, by doing the following:
>
> cd libltdl
> ./configure [+ other configure arguments]
> make
> cd ..
>
> Then continue to make ESyS-Particle ("make" in the toplevel source code
> directory).
>
> This bug does not occur when compiling against OpenMPI or SGIMPT.
>
> Action: Need to modify build configuration to detect mpich and configure
> libltdl/ correctly for this case.
>
>
>

Revision history for this message
Dion Weatherley (d-weatherley) wrote :

Hi Anton,

Scons vs. autotools has been a topic of discussion multiple times. Our sister project Escript-Finley (https://launchpad.net/escript-finley) uses Scons because it plays fair with other operating systems. Steffen and I debated a switch to scons a while ago (pre v2.0 release) and decided to stick with autotools for v2.0. Our rationale was not to fix something that isn't completely broken. Unfortunately we've had to make tough decisions like that at times because of lack of time/resources. I'll add it to my list of candidate features for later version releases. If we decide to change the build process, we might also need to consider a major change to version numbering. It seems a bit early to release v3.0! ;)

Right now I'm focused on getting v2.1 released asap so users can benefit from the many improvements since v2.0. Those improvements are in large part due to feedback from users like yourself. Thanks for suggestions like this one. Your input and opinions about improving ESyS-Particle are most welcome and appreciated. Please keep the good suggestions flowing!

Cheers,

Dion

Changed in esys-particle:
milestone: none → 2.3.1
Changed in esys-particle:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.