[petsc-users] [Slepc 3.7.1][macOS] install name is set to build folder instead of prefix
Denis Davydov
davydden at gmail.com
Sun Jul 10 17:48:26 CDT 2016
Hi Jose,
so here is what happens. The issue appears when SLEPC_DIR is set to a symlink (the one with “stage below) of a build folder (the one with “private” below).
During configure there is a warning that SLEPC_DIR is not the same as current dir (string comparison),
but one is symlink of another, so all but install_name_tool work. The latter leads to the following values of variables:
oldname =/private/var/folders/5k/sqpp24tx3ylds4fgm13pfht00000gn/T/davydden/spack-stage/spack-stage-MziaMV/slepc-3.7.1/installed-arch-darwin-c-opt/lib/libslepc.3.7.dylib
installName=/private/var/folders/5k/sqpp24tx3ylds4fgm13pfht00000gn/T/davydden/spack-stage/spack-stage-MziaMV/slepc-3.7.1/installed-arch-darwin-c-opt/lib/libslepc.3.7.dylib
archDir =/Users/davydden/spack/var/spack/stage/slepc-3.7.1-gimrzhb4mozeus3i2hdmrtjp3tha5pgr/slepc-3.7.1/installed-arch-darwin-c-opt
installDir =/Users/davydden/spack/opt/spack/darwin-elcapitan-x86_64/clang-7.3.0-apple/slepc-3.7.1-gimrzhb4mozeus3i2hdmrtjp3tha5pgr
dst =/Users/davydden/spack/opt/spack/darwin-elcapitan-x86_64/clang-7.3.0-apple/slepc-3.7.1-gimrzhb4mozeus3i2hdmrtjp3tha5pgr/lib/libslepc.3.7.1.dylib
As you see, installName wasn’t changed from oldname.
Since the python code rely on SLEPC_DIR be pwd(), i would suggest to through an error instead of the warning to make
sure that users won’t get in the situation above. Alternative is to make this part of the code more robust.
When SLEPC_DIR==pwd() the patch you referred works.
Kind regards,
Denis
> On 11 Jul 2016, at 00:29, Denis Davydov <davydden at gmail.com> wrote:
>
> Hi Jose,
>
> Please, disregard my last email. The order of arguments is correct.
> I still have an issue, though. I will debug it further and try to find what’s the cause...
>
> Kind regards,
> Denis
>
>> On 10 Jul 2016, at 22:26, Denis Davydov <davydden at gmail.com> wrote:
>>
>> I debuged a bit your code, install_name should be used as follows:
>>
>> install_name_tool -id <new_name> <library_file_to_change>
>>
>> That is, you need to change around “installName” variable and “dst” and then it works as expected.
>>
>> Kind regards,
>> Denis
>>
>>> On 10 Jul 2016, at 18:56, Denis Davydov <davydden at gmail.com> wrote:
>>>
>>> Hi Jose,
>>>
>>> the patch you mentioned does not solve the problem (i tried it):
>>>
>>> $ otool -D libslepc.dylib
>>> libslepc.dylib:
>>> /private/var/folders/5k/sqpp24tx3ylds4fgm13pfht00000gn/T/davydden/spack-stage/spack-stage-jqcVVv/slepc-3.7.1/installed-arch-darwin-c-opt/lib/libslepc.3.7.dylib
>>>
>>> Kind regards,
>>> Denis
>>>
>>>> On 10 Jul 2016, at 18:47, Jose E. Roman <jroman at dsic.upv.es> wrote:
>>>>
>>>> I think this is already fixed in this commit:
>>>> https://bitbucket.org/slepc/slepc/commits/7489a3f3d569e2fbf5513ac9dcd769017d9f7eb7
>>>> Version 7.3.2 containing this patch will be released in a week or so.
>>>> Thanks for reporting this.
>>>> Jose
>>>>
>>>>
>>>>> El 10 jul 2016, a las 18:36, Denis Davydov <davydden at gmail.com> escribió:
>>>>>
>>>>> Dear developers,
>>>>>
>>>>> Slepc 3.6.3 used to produce the following result of install names:
>>>>>
>>>>> $ otool -lv libslepc.dylib | grep slepc
>>>>> libslepc.dylib:
>>>>> name /Users/davydden/spack/opt/spack/darwin-elcapitan-x86_64/clang-7.3.0-apple/slepc-3.6.3-b35zhzknp4lrt5r2iksagql2jkya2vfl/lib/libslepc.3.6.3.dylib (offset 24)
>>>>> path /Users/davydden/spack/opt/spack/darwin-elcapitan-x86_64/clang-7.3.0-apple/slepc-3.6.3-b35zhzknp4lrt5r2iksagql2jkya2vfl/lib (offset 12)
>>>>> path /Users/davydden/spack/opt/spack/darwin-elcapitan-x86_64/clang-7.3.0-apple/slepc-3.6.3-b35zhzknp4lrt5r2iksagql2jkya2vfl/lib64 (offset 12)
>>>>>
>>>>> same for libslepc.3.6.dylib and libslepc.3.6.3.dylib
>>>>>
>>>>>
>>>>> Since [3.7.1] the installed libraries have
>>>>>
>>>>> $ otool -lv libslepc.dylib | grep slepc
>>>>> libslepc.dylib:
>>>>> name /private/var/folders/5k/sqpp24tx3ylds4fgm13pfht00000gn/T/davydden/spack-stage/spack-stage-JwBNAx/slepc-3.7.1/installed-arch-darwin-c-opt/lib/libslepc.3.7.dylib (offset 24)
>>>>> path /Users/davydden/spack/opt/spack/darwin-elcapitan-x86_64/clang-7.3.0-apple/slepc-3.7.1-gimrzhb4mozeus3i2hdmrtjp3tha5pgr/lib (offset 12)
>>>>> path /Users/davydden/spack/opt/spack/darwin-elcapitan-x86_64/clang-7.3.0-apple/slepc-3.7.1-gimrzhb4mozeus3i2hdmrtjp3tha5pgr/lib64 (offset 12)
>>>>>
>>>>>
>>>>> That is, the “name” is wrong as it corresponds to the path in the temporary build folder.
>>>>>
>>>>> Kind regards,
>>>>> Denis
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160711/6e634aa1/attachment.html>
More information about the petsc-users
mailing list