[Dune] Linking with OS X 10.9 Mavericks
Benedikt Oswald
benedikt.oswald at lspr.ch
Wed Jan 29 17:35:58 CET 2014
Hello
yes I agree, a wonderful mess of a very high order!
I think it is …acceptable… to compile with some degree of optimisation by default,
in fact, we always compile with -O2. I think it is still far better than to patch system
based header files. I have some hope that Apple will soon make sure to clean it up.
Greetings and thanks for the support! Benedikt
On 29 Jan 2014, at 17:26, Steffen Müthing <steffen.muething at iwr.uni-heidelberg.de> wrote:
>
> Am 29.01.2014 um 16:46 schrieb Steffen Müthing <steffen.muething at iwr.uni-heidelberg.de>:
>
>> Am 29.01.2014 um 16:42 schrieb Benedikt Oswald <benedikt.oswald at lspr.ch>:
>>
>>> amazing, using on my system:
>>>
>>> CMAKE_FLAGS="--enable-experimental-grid-extensions --enable-shared --enable-static -DCMAKE_CXX_FLAGS=\"-O2\" -DCMAKE_PREFIX_PATH=\"$HOME/extlib/alugrid/1.96/openmpi/1.6.5/gcc/4.8.1;$HOME/extlib/metis/5.1.0/gcc/4.8.1;$HOME/extlib/parmetis/4.0.3/openmpi/1.6.5/gcc/4.8.1\" "
>>>
>>>
>>> in the opts file, it links the dune-grid-howto examples…and runs through…what a nasty difference this makes!
>>
>> Yes, the Stackoverflow thread suggests that -Ox (x > 0) triggers inlining of toupper(), which
>> makes the whole problem at the linker stage go away…
>>
>> But for some reason, the autotools-based build works (and the resulting programs work). Unfortunately,
>> there’s all kinds of OS X linker magic in the command line, like flat vs. nested library namespaces…
>
> Seems like that conclusion was a little too early, a complete new checkout and build from scratch causes
> autotools to fail as well with -O0. The main difference is that the autotools-generated binaries crash at
> run time instead of triggering a link time failure because libtool sets -Wl,-undefined,dynamic_lookup
> which defers lookup of unknown symbols to the dynamic linker.
>
> So it looks like the only ways around this problem are to either use at least -O1 or patch a system header.
> What a mess…
>
> Steffen
>
>
>>
>> Steffen
>>
>>
>>>
>>> Greetings, Benedikt
>>>
>>>
>>> On 29 Jan 2014, at 16:34, Steffen Müthing <steffen.muething at iwr.uni-heidelberg.de> wrote:
>>>
>>>> Looking at the link Christoph posted earlier, I realized that my build was setup
>>>> with optimization (-O3), which avoids the problem as well. So I rebuilt everything
>>>> from scratch with -O0, and now my CMake build fails with the same error as
>>>> Benedikt’s.
>>>>
>>>> I’m running an -O0 build with autotools right now…
>>>>
>>>> Steffen
>>>>
>>>> Am 29.01.2014 um 16:19 schrieb Markus Blatt <markus at dr-blatt.de>:
>>>>
>>>>> On Wed, Jan 29, 2014 at 03:04:39PM +0100, Benedikt Oswald wrote:
>>>>>> one more point to consider:
>>>>>>
>>>>>> the compilation does not run unto this problem when using the autotools based build.
>>>>>> what could be the reason for this ?
>>>>>
>>>>> that is indeed interesting. Maybe libtool is very smart. Could you
>>>>> please provide the linker lines when using autotools.
>>>>>
>>>>> --
>>>>> Do you need more support with DUNE or HPC in general?
>>>>>
>>>>> Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
>>>>> Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
>>>>> Tel.: +49 (0) 160 97590858 Fax: +49 (0)322 1108991658
>>>>> _______________________________________________
>>>>> 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
>>>
>>
>> _______________________________________________
>> Dune mailing list
>> Dune at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20140129/853316aa/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20140129/853316aa/attachment.sig>
More information about the Dune
mailing list