Static linking with libpmem?

21 views
Skip to first unread message

steve

unread,
Jun 22, 2020, 11:07:37 PM6/22/20
to pmem
Hi all,

I've started to use libpmem for persistence assistance. It is going okay so far but I was surprised to find that I cannot run my executable in a
directory that doesn't contain libpmem.dll (on Windows). Can I link statically so I don't have to worry about this when I distribute my program?

Thanks.
------------
Steve Heller

Łukasz Plewa

unread,
Jun 23, 2020, 12:30:21 PM6/23/20
to st...@steveheller.org, pmem
Hi Steve,

We are not supporting static link on windows. You can add libpmem.dll to PATH environment variable, copy it to your program directory(as you did), or use vcpkg to install pmdk in your system (https://github.com/pmem/pmdk#pre-built-packages-for-windows)

Łukassz

--
You received this message because you are subscribed to the Google Groups "pmem" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pmem+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pmem/bcs2ffdkotst955h5dg1u44ptmvbec373b%404ax.com.

steve

unread,
Jun 23, 2020, 12:32:11 PM6/23/20
to ?ukasz Plewa, pmem
On Tue, 23 Jun 2020 18:29:53 +0200, ?ukasz Plewa <plankt...@gmail.com> wrote:

>Hi Steve,
>
>We are not supporting static link on windows. You can add libpmem.dll to
>PATH environment variable, copy it to your program directory(as you did),
>or use vcpkg to install pmdk in your system (
>https://github.com/pmem/pmdk#pre-built-packages-for-windows)

That's unfortunate. Do you have any plans to do this? I can't imagine I'm the only one who is concerned about distribution issues.

>?ukassz
>
>wt., 23 cze 2020 o 05:07 steve <st...@steveheller.org> napisa?(a):
>
>> Hi all,
>>
>> I've started to use libpmem for persistence assistance. It is going okay
>> so far but I was surprised to find that I cannot run my executable in a
>> directory that doesn't contain libpmem.dll (on Windows). Can I link
>> statically so I don't have to worry about this when I distribute my program?
>>
>> Thanks.
>> ------------
>> Steve Heller
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "pmem" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to pmem+uns...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pmem/bcs2ffdkotst955h5dg1u44ptmvbec373b%404ax.com
>> .
>>
------------
Steve Heller

Łukasz Plewa

unread,
Jun 23, 2020, 12:40:06 PM6/23/20
to st...@steveheller.org, pmem
TBH we dropped static linking during windows port as according to Microsoft is not recommended to release static libraries.

Łukasz

steve

unread,
Jun 23, 2020, 12:59:06 PM6/23/20
to ?ukasz Plewa, pmem
On Tue, 23 Jun 2020 18:39:39 +0200, ?ukasz Plewa <plankt...@gmail.com> wrote:

>TBH we dropped static linking during windows port as according to Microsoft
>is not recommended to release static libraries.

Do you have a reference for that? Many people use static libraries so they don't have to worry about DLL mismatches.
------------
Steve Heller

st...@steveheller.org

unread,
Jun 28, 2020, 8:26:39 AM6/28/20
to pmem
in the Ubuntu install instructions on https://github.com/pmem/pmdk/, it
says this:

"You will need to install the following required packages on the build
system:

autoconf
pkg-config
libndctl-devel (v63 or later)1
libdaxctl-devel (v63 or later)"

but apt-get can't find any packages named libndctl-devel or
libaxctl-devel:

apt-get install libndctl-devel
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libndctl-devel

apt-get install libaxctl-devel
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libaxctl-devel

Any assistance would be appreciated.

ppbb...@gmail.com

unread,
Jun 28, 2020, 8:31:15 AM6/28/20
to pmem
Different distros name their packages differently. Ubuntu/Debian devel packages are usually suffixed with `-dev`, so in your case, you'd have to  install `libndctl-dev` and `libdactl-dev`.

Jim Harris

unread,
Jun 28, 2020, 11:40:30 AM6/28/20
to ppbb...@gmail.com, pmem
You can usually use apt-cache search to find the package name if you know what you are looking for:

apt-cache search ndctl 



--
You received this message because you are subscribed to the Google Groups "pmem" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pmem+uns...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages