[Dune] problem with alberta, cannot find "ldunealbertagrid_0d"

Martin Nolte nolte at mathematik.uni-freiburg.de
Tue Feb 2 10:13:42 CET 2010


Hi Oli,

I'm afraid there is no perfect long-term solution. The problem is this: The 
Alberta library can be compiled for different world dimensions. But the 
exported symbols are always the same. So we have to choose the correct version 
of -lalberta_nd. Similar thing with -ldunealbertagrid_nd: It libtool-depends 
on -lalberta_nd. There are the following possibilities (maybe there are more):

(a) don't include ALBERTA_CPPFLAGS in ALL_PKG_CPPFLAGS (solves the problem if 
you're never using ALBERTA.

(b) provide a fix (like 2) default for ALBERTA_DIM (which is currently 
$(WORLDDIM)). This would disable the preprocessor magic for ALBERTA.

(c) provide a fix default for WORLDDIM (which is currently $(GRIDDIM)). Again, 
this influences the preprocessor magic

(d) provide a nonzero default for GRIDDIM (currently 0). This would fix the 
problem, but the user gets no warning if he does not specify GRIDDIM.

(e) add a libdunealbertagrid_0d and remove -lalberta_nd from the 
ALBERTA_CPPFLAGS. Then, -lalberta_nd should still be included through libtool, 
but I consider this a very dirty hack. I even doubt that it will be reliable.

(f) move all calls to -lalberta_nd into the libalbertagrid_nd (and add 
libalbertagrid_0d). This way, the libtool problem does not occur, but the code 
gets a lot slower (due to the added indirection in the ALBERTA calls).

(g) leave it as it is and let the user provide a feasable default for 
ALBERTA_DIM (which is the variable you actually meant).

For me, (b) to (d) are not an option, because the destroy the preprocessor 
magic. (e) and (f) are no options for the explained problems. This leave (a) 
and (g). Personally, I don't favor either one. In both cases, the user has to 
be aware of the ALBERTA specific problem.

Maybe, the other developers could also comment on this?

Oliver Sander wrote:
> Hi Martin!
> Is this the official long-term solution?  I do not find it satisfactory.
> 
> I installed Alberta a few month ago to test something once, and then
> forgot about it.  Now all of a sudden I get these
> 
> /usr/bin/ld: cannot find -ldunealbertagrid_0d
> 
> errors all over the place.  Putting GRIDDIM=2 in my Makefile makes
> it go away alright, but who is going to figure that one out?
> Why can't it just work?
> 
> best,
> Oliver
> 
> Martin Drohmann schrieb:
>> Dear Wolfgang Giese,
>>
>> It seems like the "GRIDDIM" macro is set to zero. If you use
>> ALL_PKG_CPPFLAGS in your Makefile.am it should be enough to add a line
>>
>>   GRIDDIM=2 # or whatever is true
>>
>> to your Makefile.am. Otherwise add -DGRIDDIM=2 to your CPPFLAGS.
>>
>> Martin
>>
>>
>> On 28 January 2010 19:16,  <giese at math.hu-berlin.de> wrote:
>>   
>>> Dear Dune-Developers,
>>>
>>> I was wondering if you could help me out with this error message. I've
>>> downloaded the latest revision of dune-common, dune-pdelab,
>>> dune-localfunctions, dune-grid, dune-istl and I am using ALBERTA 2.0.1.
>>> When executing dunecontrol, dune is looking for the file
>>> "ldunealbertagrid_0d", which atually does not exist... The end of the
>>> error message looks as follows:
>>>
>>> libtool: link: warning: library
>>> `/home/basar/Personal/Wolfgang_Giese/Dune/alberta/lib/libalberta_util.la'
>>> was moved.
>>> libtool: link: warning: library
>>> `/home/basar/Personal/Wolfgang_Giese/Dune/alberta/lib/libalberta_util.la'
>>> was moved.
>>> libtool: link: g++ -std=c++0x -g -O2 -o dune_yeastdg
>>> dune_yeastdg-dune_yeastdg.o
>>> -L/home/basar/Personal/Wolfgang_Giese/Dune/dune-grid/lib
>>> -L/home/basar/Personal/Wolfgang_Giese/Dune/dune-common/lib
>>> -ldunealbertagrid_0d
>>> -L/home/basar/Personal/Wolfgang_Giese/Dune/alberta/lib -lalberta_0d
>>> /home/basar/Personal/Wolfgang_Giese/Dune/alberta/lib/libalberta_util.a -lm
>>> /home/basar/Personal/Wolfgang_Giese/Dune/dune-grid/lib/.libs/libdunegrid.a
>>> /home/basar/Personal/Wolfgang_Giese/Dune/dune-common/lib/.libs/libdunecommon.a
>>> /usr/bin/ld: cannot find -ldunealbertagrid_0d
>>> collect2: ld returned 1 exit status
>>> make[3]: *** [dune_yeastdg] Error 1
>>> make[3]: Leaving directory
>>> `/home/basar/Personal/Wolfgang_Giese/Dune/dune-yeastdg/src'
>>> make[2]: *** [all-recursive] Error 1
>>> make[2]: Leaving directory
>>> `/home/basar/Personal/Wolfgang_Giese/Dune/dune-yeastdg/src'
>>> make[1]: *** [all-recursive] Error 1
>>> make[1]: Leaving directory
>>> `/home/basar/Personal/Wolfgang_Giese/Dune/dune-yeastdg'
>>> make: *** [all] Error 2
>>> --- Failed to build dune-yeastdg ---
>>> Execution of dunecontrol terminated due to errors!
>>>
>>>
>>> I would be very grateful if you could help me!
>>>
>>> Best wishes,
>>> Wolfgang Giese
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Dune mailing list
>>> Dune at dune-project.org
>>> http://lists.dune-project.org/mailman/listinfo/dune
>>>
>>>     
>> _______________________________________________
>> Dune mailing list
>> Dune at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune
>>   
> 
> 

-- 
Martin Nolte <nolte at mathematik.uni-freiburg.de>

Universität Freiburg                                   phone: +49-761-203-5642
Abteilung für angewandte Mathematik                    fax:   +49-761-203-5632
Hermann-Herder-Straße 10
79104 Freiburg, Germany




More information about the Dune mailing list