Re: [zeromq-dev] Unsubscribe

2018-09-26 Thread Osiris Pedroso
Yes, I am sad to say so.
The problem is that I never really contributed.

I did attempt once in the very beginning when I naively wrote a Windows
Office document detailing how to get and build the several ZeroMQ projects
in the Windows environment, but my PR was rejected because it contained a
file in a DOC format. I remember I spent a day working on it, making sure
it was correct and looked good. I was very proud of my first submission...

Even though the C4 guidelines, which ZeroMQ projects are supposed to
adhere, say nothing of restricting Windows related contributions, that in
fact seems to me is what happens. Even though most questions on the mailing
list seem to come from Windows users, the ZeroMQ developers as a group seem
to be Windows bigots.

I always wanted to work on Linux, but my career was such that I stayed in
Windows for over 30 years (my first 4 years were using AT Unix System V,
a precursor even to BSD, then Windows).

The last couple of years I've watched the mailing list.
Last Hackathon I wanted to do something significant. One of the projects
Luca Bocassi said we're of interest was using AF sockets in Windows 10, now
that this is available. I looked at it, and at the time it was only
available on a Window Dev build (it is probably available in Windows 10
mainstream now).
Bottom line, I did not get anywhere. Plus I had the feeling that if I were
to ask any questions it would not be well received by the group,. This
discouraged me to pursue it any further.

This year my life has changed quite a bit.
I have moved to Nürnberg, Germany working for a database company. In
addition to starting a new job in a new country, I am learning German which
takes all of my free time. And since this company products are Linux based,
I am re-learning how to develop in this environment.

Funny that now when it would be much cheaper to attend the Hackathons, I
have decided that my contributions are not worth it.

Now that Microsoft embraced Open Source, making tools such as VSCode (the
Windows Development IDE) available as Open Source in all platforms (Linux,
MacOS, Windows), it would be a great thing if ZeroMQ could be
built/developed in this integrated environment (from my Windowzy point of
view), allowing for debugging in any of these platforms in a single way,
but I can already hear the cringe of some members just from hearing the
proposal.

Although I love the idea of participating in an Open Source project, it is
possible that ZeroMQ is not the best fit for my skill set.

But thank you for asking, Benjamin.
You seem to care, and I appreciate that.

On Wed, Sep 26, 2018, 18:36 Benjamin Henrion  wrote:

> Are we loosing you?
>
> On Wed, Sep 26, 2018, 17:55 Osiris Pedroso  wrote:
>
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Luca Boccassi
That said, I'll have a look and see if I can add a +draft to the
version number of draft builds in OBS so that they work out as higher.
Given they are in a separate repo it's reasonable to assume they are
intended to have priority.
On Wed, 26 Sep 2018 at 22:06, Luca Boccassi  wrote:
>
> The -X is added because this is how versioning in distribution works:
>
> https://www.debian.org/doc/debian-policy/ch-controlfields.html#version
>
> The reason for a separate build for draft APIs is that they can change
> at any moment without any warning in an incompatible way and break
> existing programs, so they are not suitable for distros and production
> use.
>
> On Wed, 26 Sep 2018 at 21:48, Stephan Opfer  wrote:
> >
> > Ah thx, for that option. I was just wondering, why the hell ubuntu is 
> > adding -1 to their version. Its probably the same version as your stable 
> > versionin your repo, right?
> >
> > The actual best solution in my opinion would be to have a libzmq3draft-dev 
> > and libzmq5draft in ubuntu as well...
> >
> > So I did switch to the rolling one and it finally works. :D
> >
> >
> > On 26.09.2018 18:47, Luca Boccassi wrote:
> >
> > Right, I thought you were using the rolling one, my bad.
> >
> > In that case you can add the following to /etc/apt/preferences.d/zmq
> >
> > Package: *
> > Pin: origin download.opensuse.org
> > Pin-Priority: 1000
> >
> > Priority of 1000 means that it will install packages from that origin
> > even if they are technically downgrades.
> >
> > On Wed, 2018-09-26 at 18:08 +0200, Stephan again wrote:
> >
> > Well... thats not the case for "release-draft". There it is 4.2.5
> > and
> > ubuntu provides 4.2.5-1.
> >
> > Doh!
> >
> >
> > On 26.09.2018 18:02, Luca Boccassi wrote:
> >
> > The packages from OBS have a higher version so they already have
> > priority:
> >
> > $ dpkg --compare-versions 4.2.5+git20180922 gt 4.2.5-1  && echo
> > true || echo false
> > true
> >
> > So either you haven't ran apt upgrade, or you have manually pinned
> > it down, check with:
> >
> > apt-cache policy libzmq5
> >
> > On Wed, 2018-09-26 at 17:42 +0200, Stephan again wrote:
> >
> > Update:
> >
> > I investigated my .so files with "readelf -Ws" and "objdump -T"
> > and
> > both
> > say that there are no draft api symbols. Nevertheless, when I
> > download
> > the deb package from zeromq's repo and investigate the libraries
> > in
> > there with the same tools, it matches.
> >
> > So regarding the dynamic library, there is definitely a wrong
> > version
> > installed. Leading to the question, why is that: "sudo apt-cache
> > showpkg
> > libzmq3-dev" says:
> >
> > Package: libzmq3-dev
> > Versions:
> > 4.2.5-1
> > (/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_uni
> > vers
> > e_binary-amd64_Packages)
> > (/var/lib/dpkg/status)
> >Description Language:
> >File:
> > /var/lib/apt/lists/download.opensuse.org_repositories_network:_me
> > ssag
> > ing:_zeromq:_release-draft_xUbuntu%5f18.04_._Packages
> > MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
> >Description Language:
> >File:
> > /var/lib/apt/lists/download.opensuse.org_repositories_network:_me
> > ssag
> > ing:_zeromq:_release-draft_xUbuntu%5f18.04_._Packages
> > MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
> >Description Language:
> >File:
> > /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_univ
> > erse
> > _binary-amd64_Packages
> > MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
> >Description Language:
> >File:
> > /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_univ
> > erse
> > _binary-i386_Packages
> > MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
> >Description Language: en_GB
> >File:
> > /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_univ
> > erse
> > _i18n_Translation-en%5fGB
> > MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
> >Description Language: en
> >File:
> > /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_univ
> > erse
> > _i18n_Translation-en
> > MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
> >
> > So in my opinion the zeromq repo should have priority over the
> > ubuntu
> > repo.
> >
> > Further investigating. Help is welcome.
> >
> > - Stephan
> >
> >
> > On 26.09.2018 17:21, Luca Boccassi wrote:
> >
> > And so does the shared library:
> >
> > $ objdump -T libzmq.so.5.1.5 | grep msg_group
> > 00075a60 gDF .text 0005  Base
> >   zmq_msg_group
> >
> > Make sure you have actually installed it from that repository
> > and
> > not
> > from Ubuntu's.
> >
> > On Wed, 2018-09-26 at 17:10 +0200, Stephan again wrote:
> >
> > And the static library installed from this repository seems
> > to
> > have
> > the
> > draft api included. Here is the test for that:
> >
> > nm -gC /usr/lib/x86_64-linux-gnu/libzmq.a | grep
> > 

Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Luca Boccassi
The -X is added because this is how versioning in distribution works:

https://www.debian.org/doc/debian-policy/ch-controlfields.html#version

The reason for a separate build for draft APIs is that they can change
at any moment without any warning in an incompatible way and break
existing programs, so they are not suitable for distros and production
use.

On Wed, 26 Sep 2018 at 21:48, Stephan Opfer  wrote:
>
> Ah thx, for that option. I was just wondering, why the hell ubuntu is adding 
> -1 to their version. Its probably the same version as your stable versionin 
> your repo, right?
>
> The actual best solution in my opinion would be to have a libzmq3draft-dev 
> and libzmq5draft in ubuntu as well...
>
> So I did switch to the rolling one and it finally works. :D
>
>
> On 26.09.2018 18:47, Luca Boccassi wrote:
>
> Right, I thought you were using the rolling one, my bad.
>
> In that case you can add the following to /etc/apt/preferences.d/zmq
>
> Package: *
> Pin: origin download.opensuse.org
> Pin-Priority: 1000
>
> Priority of 1000 means that it will install packages from that origin
> even if they are technically downgrades.
>
> On Wed, 2018-09-26 at 18:08 +0200, Stephan again wrote:
>
> Well... thats not the case for "release-draft". There it is 4.2.5
> and
> ubuntu provides 4.2.5-1.
>
> Doh!
>
>
> On 26.09.2018 18:02, Luca Boccassi wrote:
>
> The packages from OBS have a higher version so they already have
> priority:
>
> $ dpkg --compare-versions 4.2.5+git20180922 gt 4.2.5-1  && echo
> true || echo false
> true
>
> So either you haven't ran apt upgrade, or you have manually pinned
> it down, check with:
>
> apt-cache policy libzmq5
>
> On Wed, 2018-09-26 at 17:42 +0200, Stephan again wrote:
>
> Update:
>
> I investigated my .so files with "readelf -Ws" and "objdump -T"
> and
> both
> say that there are no draft api symbols. Nevertheless, when I
> download
> the deb package from zeromq's repo and investigate the libraries
> in
> there with the same tools, it matches.
>
> So regarding the dynamic library, there is definitely a wrong
> version
> installed. Leading to the question, why is that: "sudo apt-cache
> showpkg
> libzmq3-dev" says:
>
> Package: libzmq3-dev
> Versions:
> 4.2.5-1
> (/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_uni
> vers
> e_binary-amd64_Packages)
> (/var/lib/dpkg/status)
>Description Language:
>File:
> /var/lib/apt/lists/download.opensuse.org_repositories_network:_me
> ssag
> ing:_zeromq:_release-draft_xUbuntu%5f18.04_._Packages
> MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
>Description Language:
>File:
> /var/lib/apt/lists/download.opensuse.org_repositories_network:_me
> ssag
> ing:_zeromq:_release-draft_xUbuntu%5f18.04_._Packages
> MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
>Description Language:
>File:
> /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_univ
> erse
> _binary-amd64_Packages
> MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
>Description Language:
>File:
> /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_univ
> erse
> _binary-i386_Packages
> MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
>Description Language: en_GB
>File:
> /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_univ
> erse
> _i18n_Translation-en%5fGB
> MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
>Description Language: en
>File:
> /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_univ
> erse
> _i18n_Translation-en
> MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
>
> So in my opinion the zeromq repo should have priority over the
> ubuntu
> repo.
>
> Further investigating. Help is welcome.
>
> - Stephan
>
>
> On 26.09.2018 17:21, Luca Boccassi wrote:
>
> And so does the shared library:
>
> $ objdump -T libzmq.so.5.1.5 | grep msg_group
> 00075a60 gDF .text 0005  Base
>   zmq_msg_group
>
> Make sure you have actually installed it from that repository
> and
> not
> from Ubuntu's.
>
> On Wed, 2018-09-26 at 17:10 +0200, Stephan again wrote:
>
> And the static library installed from this repository seems
> to
> have
> the
> draft api included. Here is the test for that:
>
> nm -gC /usr/lib/x86_64-linux-gnu/libzmq.a | grep
> zmq_msg_group
>
> nm: src_libzmq_la-devpoll.o: no symbols
> nm: src_libzmq_la-gssapi_mechanism_base.o: no symbols
> nm: src_libzmq_la-gssapi_client.o: no symbols
> nm: src_libzmq_la-gssapi_server.o: no symbols
> nm: src_libzmq_la-kqueue.o: no symbols
> nm: src_libzmq_la-poll.o: no symbols
> nm: src_libzmq_la-pollset.o: no symbols
> nm: src_libzmq_la-precompiled.o: no symbols
> nm: src_libzmq_la-select.o: no symbols
> nm: src_libzmq_la-vmci.o: no symbols
> nm: src_libzmq_la-vmci_address.o: no symbols
> nm: src_libzmq_la-vmci_connecter.o: no symbols
> nm: src_libzmq_la-vmci_listener.o: no 

Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Stephan Opfer
Ah thx, for that option. I was just wondering, why the hell ubuntu is 
adding -1 to their version. Its probably the same version as your stable 
versionin your repo, right?


The actual best solution in my opinion would be to have a 
libzmq3draft-dev and libzmq5draft in ubuntu as well...


So I did switch to the rolling one and it finally works. :D


On 26.09.2018 18:47, Luca Boccassi wrote:

Right, I thought you were using the rolling one, my bad.

In that case you can add the following to /etc/apt/preferences.d/zmq

Package: *
Pin: origin download.opensuse.org
Pin-Priority: 1000

Priority of 1000 means that it will install packages from that origin
even if they are technically downgrades.

On Wed, 2018-09-26 at 18:08 +0200, Stephan again wrote:

Well... thats not the case for "release-draft". There it is 4.2.5
and
ubuntu provides 4.2.5-1.

Doh!


On 26.09.2018 18:02, Luca Boccassi wrote:

The packages from OBS have a higher version so they already have
priority:

$ dpkg --compare-versions 4.2.5+git20180922 gt 4.2.5-1  && echo
true || echo false
true

So either you haven't ran apt upgrade, or you have manually pinned
it down, check with:

apt-cache policy libzmq5

On Wed, 2018-09-26 at 17:42 +0200, Stephan again wrote:

Update:

I investigated my .so files with "readelf -Ws" and "objdump -T"
and
both
say that there are no draft api symbols. Nevertheless, when I
download
the deb package from zeromq's repo and investigate the libraries
in
there with the same tools, it matches.

So regarding the dynamic library, there is definitely a wrong
version
installed. Leading to the question, why is that: "sudo apt-cache
showpkg
libzmq3-dev" says:

Package: libzmq3-dev
Versions:
4.2.5-1
(/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_uni
vers
e_binary-amd64_Packages)
(/var/lib/dpkg/status)
    Description Language:
    File:
/var/lib/apt/lists/download.opensuse.org_repositories_network:_me
ssag
ing:_zeromq:_release-draft_xUbuntu%5f18.04_._Packages
     MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
    Description Language:
    File:
/var/lib/apt/lists/download.opensuse.org_repositories_network:_me
ssag
ing:_zeromq:_release-draft_xUbuntu%5f18.04_._Packages
     MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
    Description Language:
    File:
/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_univ
erse
_binary-amd64_Packages
     MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
    Description Language:
    File:
/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_univ
erse
_binary-i386_Packages
     MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
    Description Language: en_GB
    File:
/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_univ
erse
_i18n_Translation-en%5fGB
     MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
    Description Language: en
    File:
/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_univ
erse
_i18n_Translation-en
     MD5: 7b2c1e47f6d305566aebc0e65e04f5ee

So in my opinion the zeromq repo should have priority over the
ubuntu
repo.

Further investigating. Help is welcome.

- Stephan


On 26.09.2018 17:21, Luca Boccassi wrote:

And so does the shared library:

$ objdump -T libzmq.so.5.1.5 | grep msg_group
00075a60 gDF .text  0005  Base
   zmq_msg_group

Make sure you have actually installed it from that repository
and
not
from Ubuntu's.

On Wed, 2018-09-26 at 17:10 +0200, Stephan again wrote:

And the static library installed from this repository seems
to
have
the
draft api included. Here is the test for that:

nm -gC /usr/lib/x86_64-linux-gnu/libzmq.a | grep
zmq_msg_group

nm: src_libzmq_la-devpoll.o: no symbols
nm: src_libzmq_la-gssapi_mechanism_base.o: no symbols
nm: src_libzmq_la-gssapi_client.o: no symbols
nm: src_libzmq_la-gssapi_server.o: no symbols
nm: src_libzmq_la-kqueue.o: no symbols
nm: src_libzmq_la-poll.o: no symbols
nm: src_libzmq_la-pollset.o: no symbols
nm: src_libzmq_la-precompiled.o: no symbols
nm: src_libzmq_la-select.o: no symbols
nm: src_libzmq_la-vmci.o: no symbols
nm: src_libzmq_la-vmci_address.o: no symbols
nm: src_libzmq_la-vmci_connecter.o: no symbols
nm: src_libzmq_la-vmci_listener.o: no symbols
0fb0 T zmq_msg_group(zmq_msg_t*) <- matched

Kind Regards

  Stephan


On 26.09.2018 17:05, Stephan again wrote:

I Installed it from:

http://download.opensuse.org/repositories/network:/messagin
g:/z
erom
q:/release-draft/xUbuntu_18.04/

Hoping that it was compiled accordingly...

This:

g++ Discovery.cpp /usr/lib/x86_64-linux-gnu/libzmq.a
-lpthread
-DZMQ_BUILD_DRAFT_API=1 -DENABLE_DRAFTS=On -o test

makes it even worth:

/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-
socket_base.o):
In
function `zmq::socket_base_t::connect(char const*)':
(.text+0x4b26): undefined reference to `pgm_freeaddrinfo'
/tmp/cc62suQj.o: In function 

Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Bill Torpey
Luca:

All your points are well-taken; there are plenty of times I wish we were less 
strict, but in the long run it works for us — because it has to.

And you’re right that neither libsodium nor openpgm are part of core 
RedHat/CentOS — both are supplied by EPEL.  We make an exception for those 
packages in development, but still don’t allow them to be installed in 
production.

Bill


> On Sep 26, 2018, at 1:41 PM, Luca Boccassi  wrote:
> 
> The dependencies are added on OBS only when missing in the base system.
> As far as I'm aware RHEL was missing sodium, or at least it was the
> last time I checked. If that's not the case then just report it and we
> can remove the downstream build.
> 
> It's fine to have a corner case like yours, with specific needs. But
> it's a corner case - in the general case, like this thread, using the
> repositories is the preferred form of distribution (after using what's
> in the native distro ofc). Simply because having to manually build
> things is time consuming and error prone - which means more ticket get
> opened in case users are not 100% familiar with autotools/cmake, which
> means more time spent by maintainers.
> When talking about the average case, knowledge about adding third party
> repositories to a distro install is much more common than building from
> scratch N elements of a stack.
> 
> On Wed, 2018-09-26 at 11:58 -0400, Bill Torpey wrote:
>> Hi Luca:
>> 
>> The problem, for me at least, is that some of the library versions
>> required by the packaged ZeroMQ are not native for the target OS.  
>> 
>> For instance, the 4.2.5 distro for RH6 requires libsodium.so.18,
>> while the native version on RH6 is libsodium.so.4.  A similar
>> situation exists with openpgm, and to make things worse I don’t need
>> or want either of these on my production servers.
>> 
>> The policy in my shop is to avoid franken-OS’s at all costs — we do
>> not install *anything* that is not included as part of the base OS in
>> standard locations (e.g., /usr).  Anything of that sort that *does*
>> need to be installed is *always* built from source using the same
>> build/deploy infrastructure we use for our own applications and
>> deployed to /opt.  That provides a separation between OS and
>> application that we require for, among other things, ISO 27001
>> certification, which our customers demand.  (It also makes the SE’s
>> jobs at least tolerable, since they can always re-install the base OS
>> “from scratch” without needing to track custom packages/versions). 
>> 
>> So I guess my question is whether the newer versions of the dependent
>> libs are required for a particular reason?  If so, is that reason
>> documented somewhere?  Because if it is, I need to start building and
>> deploying that specific version.  If not, then I can stick with using
>> the native version supplied by the OS .
>> 
>> Thanks!
>> 
>> Bill
>> 
>> 
>>> On Sep 26, 2018, at 11:36 AM, Luca Boccassi >> m> wrote:
>>> 
>>> In case the base system is missing a dependency, everything that is
>>> needed is shipped in the same repository where the library can be
>>> found, and kept up to date.
>>> Please do not recommend to avoid repositories - it's the preferred
>>> form
>>> of distribution for Linux users.
>>> 
>>> On Wed, 2018-09-26 at 11:22 -0400, Bill Torpey wrote:
 So I guess you could use the static lib, but that may not be
 ideal.
 
 Personally I’ve had problems with the packaged builds — e.g., the
 RH
 builds require specific versions of dependent libs that are not
 native to the OS.  For that reason, among others, I build libzmq
 from
 source.  That’s not easy either, but at least you know what
 you’re
 getting.
 
 FWIW, here’s a snip from the build script that I use — you will
 obviously need to make changes for your environment, but it’s a
 start.  
 
 # delete old build
 rm -rf build
 mkdir build
 cd build
 
 # do the build
 cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX}
 -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DENABLE_DRAFTS=On \
-DBUILD_STATIC=Off \
-DWITH_OPENPGM=Off \
..
 rc=$?
 [[ $rc != 0 ]] && exit $rc
 
 make ${VERBOSE} && make ${VERBOSE} install
 rc=$?
 [[ $rc != 0 ]] && exit $rc
 
 
 # copy source to facilitate debugging
 mkdir -p ${INSTALL_PREFIX}/src
 cp -rp ../src ${INSTALL_PREFIX}/
 
 
> On Sep 26, 2018, at 11:10 AM, Stephan again  l.de
>> wrote:
> 
> And the static library installed from this repository seems to
> have
> the draft api included. Here is the test for that: 
> nm -gC /usr/lib/x86_64-linux-gnu/libzmq.a | grep zmq_msg_group
> 
> nm: src_libzmq_la-devpoll.o: no symbols
> nm: src_libzmq_la-gssapi_mechanism_base.o: no symbols
> nm: src_libzmq_la-gssapi_client.o: no symbols
> nm: 

Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Luca Boccassi
The dependencies are added on OBS only when missing in the base system.
As far as I'm aware RHEL was missing sodium, or at least it was the
last time I checked. If that's not the case then just report it and we
can remove the downstream build.

It's fine to have a corner case like yours, with specific needs. But
it's a corner case - in the general case, like this thread, using the
repositories is the preferred form of distribution (after using what's
in the native distro ofc). Simply because having to manually build
things is time consuming and error prone - which means more ticket get
opened in case users are not 100% familiar with autotools/cmake, which
means more time spent by maintainers.
When talking about the average case, knowledge about adding third party
repositories to a distro install is much more common than building from
scratch N elements of a stack.

On Wed, 2018-09-26 at 11:58 -0400, Bill Torpey wrote:
> Hi Luca:
> 
> The problem, for me at least, is that some of the library versions
> required by the packaged ZeroMQ are not native for the target OS.  
> 
> For instance, the 4.2.5 distro for RH6 requires libsodium.so.18,
> while the native version on RH6 is libsodium.so.4.  A similar
> situation exists with openpgm, and to make things worse I don’t need
> or want either of these on my production servers.
> 
> The policy in my shop is to avoid franken-OS’s at all costs — we do
> not install *anything* that is not included as part of the base OS in
> standard locations (e.g., /usr).  Anything of that sort that *does*
> need to be installed is *always* built from source using the same
> build/deploy infrastructure we use for our own applications and
> deployed to /opt.  That provides a separation between OS and
> application that we require for, among other things, ISO 27001
> certification, which our customers demand.  (It also makes the SE’s
> jobs at least tolerable, since they can always re-install the base OS
> “from scratch” without needing to track custom packages/versions). 
> 
> So I guess my question is whether the newer versions of the dependent
> libs are required for a particular reason?  If so, is that reason
> documented somewhere?  Because if it is, I need to start building and
> deploying that specific version.  If not, then I can stick with using
> the native version supplied by the OS .
> 
> Thanks!
> 
> Bill
> 
> 
> > On Sep 26, 2018, at 11:36 AM, Luca Boccassi  > m> wrote:
> > 
> > In case the base system is missing a dependency, everything that is
> > needed is shipped in the same repository where the library can be
> > found, and kept up to date.
> > Please do not recommend to avoid repositories - it's the preferred
> > form
> > of distribution for Linux users.
> > 
> > On Wed, 2018-09-26 at 11:22 -0400, Bill Torpey wrote:
> > > So I guess you could use the static lib, but that may not be
> > > ideal.
> > > 
> > > Personally I’ve had problems with the packaged builds — e.g., the
> > > RH
> > > builds require specific versions of dependent libs that are not
> > > native to the OS.  For that reason, among others, I build libzmq
> > > from
> > > source.  That’s not easy either, but at least you know what
> > > you’re
> > > getting.
> > > 
> > > FWIW, here’s a snip from the build script that I use — you will
> > > obviously need to make changes for your environment, but it’s a
> > > start.  
> > > 
> > > # delete old build
> > > rm -rf build
> > > mkdir build
> > > cd build
> > > 
> > > # do the build
> > > cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX}
> > > -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
> > >    -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
> > >    -DENABLE_DRAFTS=On \
> > >    -DBUILD_STATIC=Off \
> > >    -DWITH_OPENPGM=Off \
> > >    ..
> > > rc=$?
> > > [[ $rc != 0 ]] && exit $rc
> > > 
> > > make ${VERBOSE} && make ${VERBOSE} install
> > > rc=$?
> > > [[ $rc != 0 ]] && exit $rc
> > > 
> > > 
> > > # copy source to facilitate debugging
> > > mkdir -p ${INSTALL_PREFIX}/src
> > > cp -rp ../src ${INSTALL_PREFIX}/
> > > 
> > > 
> > > > On Sep 26, 2018, at 11:10 AM, Stephan again  > > > l.de
> > > > > wrote:
> > > > 
> > > > And the static library installed from this repository seems to
> > > > have
> > > > the draft api included. Here is the test for that: 
> > > > nm -gC /usr/lib/x86_64-linux-gnu/libzmq.a | grep zmq_msg_group
> > > > 
> > > > nm: src_libzmq_la-devpoll.o: no symbols
> > > > nm: src_libzmq_la-gssapi_mechanism_base.o: no symbols
> > > > nm: src_libzmq_la-gssapi_client.o: no symbols
> > > > nm: src_libzmq_la-gssapi_server.o: no symbols
> > > > nm: src_libzmq_la-kqueue.o: no symbols
> > > > nm: src_libzmq_la-poll.o: no symbols
> > > > nm: src_libzmq_la-pollset.o: no symbols
> > > > nm: src_libzmq_la-precompiled.o: no symbols
> > > > nm: src_libzmq_la-select.o: no symbols
> > > > nm: src_libzmq_la-vmci.o: no symbols
> > > > nm: src_libzmq_la-vmci_address.o: no symbols
> > > > nm: src_libzmq_la-vmci_connecter.o: no symbols
> > > > nm: 

Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Luca Boccassi
Right, I thought you were using the rolling one, my bad.

In that case you can add the following to /etc/apt/preferences.d/zmq

Package: *
Pin: origin download.opensuse.org
Pin-Priority: 1000

Priority of 1000 means that it will install packages from that origin
even if they are technically downgrades.

On Wed, 2018-09-26 at 18:08 +0200, Stephan again wrote:
> Well... thats not the case for "release-draft". There it is 4.2.5
> and 
> ubuntu provides 4.2.5-1.
> 
> Doh!
> 
> 
> On 26.09.2018 18:02, Luca Boccassi wrote:
> > The packages from OBS have a higher version so they already have
> > priority:
> > 
> > $ dpkg --compare-versions 4.2.5+git20180922 gt 4.2.5-1  && echo
> > true || echo false
> > true
> > 
> > So either you haven't ran apt upgrade, or you have manually pinned
> > it down, check with:
> > 
> > apt-cache policy libzmq5
> > 
> > On Wed, 2018-09-26 at 17:42 +0200, Stephan again wrote:
> > > Update:
> > > 
> > > I investigated my .so files with "readelf -Ws" and "objdump -T"
> > > and
> > > both
> > > say that there are no draft api symbols. Nevertheless, when I
> > > download
> > > the deb package from zeromq's repo and investigate the libraries
> > > in
> > > there with the same tools, it matches.
> > > 
> > > So regarding the dynamic library, there is definitely a wrong
> > > version
> > > installed. Leading to the question, why is that: "sudo apt-cache
> > > showpkg
> > > libzmq3-dev" says:
> > > 
> > > Package: libzmq3-dev
> > > Versions:
> > > 4.2.5-1
> > > (/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_uni
> > > vers
> > > e_binary-amd64_Packages)
> > > (/var/lib/dpkg/status)
> > >    Description Language:
> > >    File:
> > > /var/lib/apt/lists/download.opensuse.org_repositories_network:_me
> > > ssag
> > > ing:_zeromq:_release-draft_xUbuntu%5f18.04_._Packages
> > >     MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
> > >    Description Language:
> > >    File:
> > > /var/lib/apt/lists/download.opensuse.org_repositories_network:_me
> > > ssag
> > > ing:_zeromq:_release-draft_xUbuntu%5f18.04_._Packages
> > >     MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
> > >    Description Language:
> > >    File:
> > > /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_univ
> > > erse
> > > _binary-amd64_Packages
> > >     MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
> > >    Description Language:
> > >    File:
> > > /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_univ
> > > erse
> > > _binary-i386_Packages
> > >     MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
> > >    Description Language: en_GB
> > >    File:
> > > /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_univ
> > > erse
> > > _i18n_Translation-en%5fGB
> > >     MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
> > >    Description Language: en
> > >    File:
> > > /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_univ
> > > erse
> > > _i18n_Translation-en
> > >     MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
> > > 
> > > So in my opinion the zeromq repo should have priority over the
> > > ubuntu
> > > repo.
> > > 
> > > Further investigating. Help is welcome.
> > > 
> > > - Stephan
> > > 
> > > 
> > > On 26.09.2018 17:21, Luca Boccassi wrote:
> > > > And so does the shared library:
> > > > 
> > > > $ objdump -T libzmq.so.5.1.5 | grep msg_group
> > > > 00075a60 gDF .text  0005  Base
> > > >   zmq_msg_group
> > > > 
> > > > Make sure you have actually installed it from that repository
> > > > and
> > > > not
> > > > from Ubuntu's.
> > > > 
> > > > On Wed, 2018-09-26 at 17:10 +0200, Stephan again wrote:
> > > > > And the static library installed from this repository seems
> > > > > to
> > > > > have
> > > > > the
> > > > > draft api included. Here is the test for that:
> > > > > 
> > > > > nm -gC /usr/lib/x86_64-linux-gnu/libzmq.a | grep
> > > > > zmq_msg_group
> > > > > 
> > > > > nm: src_libzmq_la-devpoll.o: no symbols
> > > > > nm: src_libzmq_la-gssapi_mechanism_base.o: no symbols
> > > > > nm: src_libzmq_la-gssapi_client.o: no symbols
> > > > > nm: src_libzmq_la-gssapi_server.o: no symbols
> > > > > nm: src_libzmq_la-kqueue.o: no symbols
> > > > > nm: src_libzmq_la-poll.o: no symbols
> > > > > nm: src_libzmq_la-pollset.o: no symbols
> > > > > nm: src_libzmq_la-precompiled.o: no symbols
> > > > > nm: src_libzmq_la-select.o: no symbols
> > > > > nm: src_libzmq_la-vmci.o: no symbols
> > > > > nm: src_libzmq_la-vmci_address.o: no symbols
> > > > > nm: src_libzmq_la-vmci_connecter.o: no symbols
> > > > > nm: src_libzmq_la-vmci_listener.o: no symbols
> > > > > 0fb0 T zmq_msg_group(zmq_msg_t*) <- matched
> > > > > 
> > > > > Kind Regards
> > > > > 
> > > > >  Stephan
> > > > > 
> > > > > 
> > > > > On 26.09.2018 17:05, Stephan again wrote:
> > > > > > I Installed it from:
> > > > > > 
> > > > > > 

Re: [zeromq-dev] Unsubscribe

2018-09-26 Thread Benjamin Henrion
Are we loosing you?

On Wed, Sep 26, 2018, 17:55 Osiris Pedroso  wrote:

> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Stephan again
Well... thats not the case for "release-draft". There it is 4.2.5 and 
ubuntu provides 4.2.5-1.


Doh!


On 26.09.2018 18:02, Luca Boccassi wrote:

The packages from OBS have a higher version so they already have
priority:

$ dpkg --compare-versions 4.2.5+git20180922 gt 4.2.5-1  && echo true || echo 
false
true

So either you haven't ran apt upgrade, or you have manually pinned it down, 
check with:

apt-cache policy libzmq5

On Wed, 2018-09-26 at 17:42 +0200, Stephan again wrote:

Update:

I investigated my .so files with "readelf -Ws" and "objdump -T" and
both
say that there are no draft api symbols. Nevertheless, when I
download
the deb package from zeromq's repo and investigate the libraries in
there with the same tools, it matches.

So regarding the dynamic library, there is definitely a wrong
version
installed. Leading to the question, why is that: "sudo apt-cache
showpkg
libzmq3-dev" says:

Package: libzmq3-dev
Versions:
4.2.5-1
(/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_univers
e_binary-amd64_Packages)
(/var/lib/dpkg/status)
   Description Language:
   File:
/var/lib/apt/lists/download.opensuse.org_repositories_network:_messag
ing:_zeromq:_release-draft_xUbuntu%5f18.04_._Packages
    MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
   Description Language:
   File:
/var/lib/apt/lists/download.opensuse.org_repositories_network:_messag
ing:_zeromq:_release-draft_xUbuntu%5f18.04_._Packages
    MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
   Description Language:
   File:
/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_universe
_binary-amd64_Packages
    MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
   Description Language:
   File:
/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_universe
_binary-i386_Packages
    MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
   Description Language: en_GB
   File:
/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_universe
_i18n_Translation-en%5fGB
    MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
   Description Language: en
   File:
/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_universe
_i18n_Translation-en
    MD5: 7b2c1e47f6d305566aebc0e65e04f5ee

So in my opinion the zeromq repo should have priority over the ubuntu
repo.

Further investigating. Help is welcome.

- Stephan


On 26.09.2018 17:21, Luca Boccassi wrote:

And so does the shared library:

$ objdump -T libzmq.so.5.1.5 | grep msg_group
00075a60 gDF .text  0005  Base
  zmq_msg_group

Make sure you have actually installed it from that repository and
not
from Ubuntu's.

On Wed, 2018-09-26 at 17:10 +0200, Stephan again wrote:

And the static library installed from this repository seems to
have
the
draft api included. Here is the test for that:

nm -gC /usr/lib/x86_64-linux-gnu/libzmq.a | grep zmq_msg_group

nm: src_libzmq_la-devpoll.o: no symbols
nm: src_libzmq_la-gssapi_mechanism_base.o: no symbols
nm: src_libzmq_la-gssapi_client.o: no symbols
nm: src_libzmq_la-gssapi_server.o: no symbols
nm: src_libzmq_la-kqueue.o: no symbols
nm: src_libzmq_la-poll.o: no symbols
nm: src_libzmq_la-pollset.o: no symbols
nm: src_libzmq_la-precompiled.o: no symbols
nm: src_libzmq_la-select.o: no symbols
nm: src_libzmq_la-vmci.o: no symbols
nm: src_libzmq_la-vmci_address.o: no symbols
nm: src_libzmq_la-vmci_connecter.o: no symbols
nm: src_libzmq_la-vmci_listener.o: no symbols
0fb0 T zmq_msg_group(zmq_msg_t*) <- matched

Kind Regards

     Stephan


On 26.09.2018 17:05, Stephan again wrote:

I Installed it from:

http://download.opensuse.org/repositories/network:/messaging:/z
erom
q:/release-draft/xUbuntu_18.04/

Hoping that it was compiled accordingly...

This:

g++ Discovery.cpp /usr/lib/x86_64-linux-gnu/libzmq.a -lpthread
-DZMQ_BUILD_DRAFT_API=1 -DENABLE_DRAFTS=On -o test

makes it even worth:

/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-
socket_base.o):
In
function `zmq::socket_base_t::connect(char const*)':
(.text+0x4b26): undefined reference to `pgm_freeaddrinfo'
/tmp/cc62suQj.o: In function `msg_send(zmq_msg_t*, void*, char
const*,
char const*)':
Discovery.cpp:(.text+0x8e): undefined reference to
`zmq_msg_set_group'
/tmp/cc62suQj.o: In function `msg_recv_cmp(zmq_msg_t*, void*,
char
const*, char const*)':
Discovery.cpp:(.text+0x148): undefined reference to
`zmq_msg_group'
/tmp/cc62suQj.o: In function `main':
Discovery.cpp:(.text+0x30e): undefined reference to `zmq_leave'
Discovery.cpp:(.text+0x37f): undefined reference to `zmq_join'
Discovery.cpp:(.text+0x3c3): undefined reference to `zmq_join'
Discovery.cpp:(.text+0x407): undefined reference to `zmq_join'
Discovery.cpp:(.text+0x57c): undefined reference to `zmq_join'
Discovery.cpp:(.text+0x668): undefined reference to `zmq_leave'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-zmq_utils.o):
In
function 

Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Luca Boccassi
The packages from OBS have a higher version so they already have
priority:

$ dpkg --compare-versions 4.2.5+git20180922 gt 4.2.5-1  && echo true || echo 
false
true

So either you haven't ran apt upgrade, or you have manually pinned it down, 
check with:

apt-cache policy libzmq5

On Wed, 2018-09-26 at 17:42 +0200, Stephan again wrote:
> Update:
> 
> I investigated my .so files with "readelf -Ws" and "objdump -T" and
> both 
> say that there are no draft api symbols. Nevertheless, when I
> download 
> the deb package from zeromq's repo and investigate the libraries in 
> there with the same tools, it matches.
> 
> So regarding the dynamic library, there is definitely a wrong
> version 
> installed. Leading to the question, why is that: "sudo apt-cache
> showpkg 
> libzmq3-dev" says:
> 
> Package: libzmq3-dev
> Versions:
> 4.2.5-1 
> (/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_univers
> e_binary-amd64_Packages) 
> (/var/lib/dpkg/status)
>   Description Language:
>   File: 
> /var/lib/apt/lists/download.opensuse.org_repositories_network:_messag
> ing:_zeromq:_release-draft_xUbuntu%5f18.04_._Packages
>    MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
>   Description Language:
>   File: 
> /var/lib/apt/lists/download.opensuse.org_repositories_network:_messag
> ing:_zeromq:_release-draft_xUbuntu%5f18.04_._Packages
>    MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
>   Description Language:
>   File: 
> /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_universe
> _binary-amd64_Packages
>    MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
>   Description Language:
>   File: 
> /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_universe
> _binary-i386_Packages
>    MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
>   Description Language: en_GB
>   File: 
> /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_universe
> _i18n_Translation-en%5fGB
>    MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
>   Description Language: en
>   File: 
> /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_universe
> _i18n_Translation-en
>    MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
> 
> So in my opinion the zeromq repo should have priority over the ubuntu
> repo.
> 
> Further investigating. Help is welcome.
> 
> - Stephan
> 
> 
> On 26.09.2018 17:21, Luca Boccassi wrote:
> > And so does the shared library:
> > 
> > $ objdump -T libzmq.so.5.1.5 | grep msg_group
> > 00075a60 gDF .text  0005  Base   
> >  zmq_msg_group
> > 
> > Make sure you have actually installed it from that repository and
> > not
> > from Ubuntu's.
> > 
> > On Wed, 2018-09-26 at 17:10 +0200, Stephan again wrote:
> > > And the static library installed from this repository seems to
> > > have
> > > the
> > > draft api included. Here is the test for that:
> > > 
> > > nm -gC /usr/lib/x86_64-linux-gnu/libzmq.a | grep zmq_msg_group
> > > 
> > > nm: src_libzmq_la-devpoll.o: no symbols
> > > nm: src_libzmq_la-gssapi_mechanism_base.o: no symbols
> > > nm: src_libzmq_la-gssapi_client.o: no symbols
> > > nm: src_libzmq_la-gssapi_server.o: no symbols
> > > nm: src_libzmq_la-kqueue.o: no symbols
> > > nm: src_libzmq_la-poll.o: no symbols
> > > nm: src_libzmq_la-pollset.o: no symbols
> > > nm: src_libzmq_la-precompiled.o: no symbols
> > > nm: src_libzmq_la-select.o: no symbols
> > > nm: src_libzmq_la-vmci.o: no symbols
> > > nm: src_libzmq_la-vmci_address.o: no symbols
> > > nm: src_libzmq_la-vmci_connecter.o: no symbols
> > > nm: src_libzmq_la-vmci_listener.o: no symbols
> > > 0fb0 T zmq_msg_group(zmq_msg_t*) <- matched
> > > 
> > > Kind Regards
> > > 
> > >     Stephan
> > > 
> > > 
> > > On 26.09.2018 17:05, Stephan again wrote:
> > > > I Installed it from:
> > > > 
> > > > http://download.opensuse.org/repositories/network:/messaging:/z
> > > > erom
> > > > q:/release-draft/xUbuntu_18.04/
> > > > 
> > > > Hoping that it was compiled accordingly...
> > > > 
> > > > This:
> > > > 
> > > > g++ Discovery.cpp /usr/lib/x86_64-linux-gnu/libzmq.a -lpthread
> > > > -DZMQ_BUILD_DRAFT_API=1 -DENABLE_DRAFTS=On -o test
> > > > 
> > > > makes it even worth:
> > > > 
> > > > /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-
> > > > socket_base.o):
> > > > In
> > > > function `zmq::socket_base_t::connect(char const*)':
> > > > (.text+0x4b26): undefined reference to `pgm_freeaddrinfo'
> > > > /tmp/cc62suQj.o: In function `msg_send(zmq_msg_t*, void*, char
> > > > const*,
> > > > char const*)':
> > > > Discovery.cpp:(.text+0x8e): undefined reference to
> > > > `zmq_msg_set_group'
> > > > /tmp/cc62suQj.o: In function `msg_recv_cmp(zmq_msg_t*, void*,
> > > > char
> > > > const*, char const*)':
> > > > Discovery.cpp:(.text+0x148): undefined reference to
> > > > `zmq_msg_group'
> > > > /tmp/cc62suQj.o: In function `main':
> > > > 

Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Bill Torpey
Hi Luca:

The problem, for me at least, is that some of the library versions required by 
the packaged ZeroMQ are not native for the target OS.  

For instance, the 4.2.5 distro for RH6 requires libsodium.so.18, while the 
native version on RH6 is libsodium.so.4.  A similar situation exists with 
openpgm, and to make things worse I don’t need or want either of these on my 
production servers.

The policy in my shop is to avoid franken-OS’s at all costs — we do not install 
*anything* that is not included as part of the base OS in standard locations 
(e.g., /usr).  Anything of that sort that *does* need to be installed is 
*always* built from source using the same build/deploy infrastructure we use 
for our own applications and deployed to /opt.  That provides a separation 
between OS and application that we require for, among other things, ISO 27001 
certification, which our customers demand.  (It also makes the SE’s jobs at 
least tolerable, since they can always re-install the base OS “from scratch” 
without needing to track custom packages/versions). 

So I guess my question is whether the newer versions of the dependent libs are 
required for a particular reason?  If so, is that reason documented somewhere?  
Because if it is, I need to start building and deploying that specific version. 
 If not, then I can stick with using the native version supplied by the OS .

Thanks!

Bill


> On Sep 26, 2018, at 11:36 AM, Luca Boccassi  wrote:
> 
> In case the base system is missing a dependency, everything that is
> needed is shipped in the same repository where the library can be
> found, and kept up to date.
> Please do not recommend to avoid repositories - it's the preferred form
> of distribution for Linux users.
> 
> On Wed, 2018-09-26 at 11:22 -0400, Bill Torpey wrote:
>> So I guess you could use the static lib, but that may not be ideal.
>> 
>> Personally I’ve had problems with the packaged builds — e.g., the RH
>> builds require specific versions of dependent libs that are not
>> native to the OS.  For that reason, among others, I build libzmq from
>> source.  That’s not easy either, but at least you know what you’re
>> getting.
>> 
>> FWIW, here’s a snip from the build script that I use — you will
>> obviously need to make changes for your environment, but it’s a
>> start.  
>> 
>> # delete old build
>> rm -rf build
>> mkdir build
>> cd build
>> 
>> # do the build
>> cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX}
>> -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
>>-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
>>-DENABLE_DRAFTS=On \
>>-DBUILD_STATIC=Off \
>>-DWITH_OPENPGM=Off \
>>..
>> rc=$?
>> [[ $rc != 0 ]] && exit $rc
>> 
>> make ${VERBOSE} && make ${VERBOSE} install
>> rc=$?
>> [[ $rc != 0 ]] && exit $rc
>> 
>> 
>> # copy source to facilitate debugging
>> mkdir -p ${INSTALL_PREFIX}/src
>> cp -rp ../src ${INSTALL_PREFIX}/
>> 
>> 
>>> On Sep 26, 2018, at 11:10 AM, Stephan again >>> wrote:
>>> 
>>> And the static library installed from this repository seems to have
>>> the draft api included. Here is the test for that: 
>>> nm -gC /usr/lib/x86_64-linux-gnu/libzmq.a | grep zmq_msg_group
>>> 
>>> nm: src_libzmq_la-devpoll.o: no symbols
>>> nm: src_libzmq_la-gssapi_mechanism_base.o: no symbols
>>> nm: src_libzmq_la-gssapi_client.o: no symbols
>>> nm: src_libzmq_la-gssapi_server.o: no symbols
>>> nm: src_libzmq_la-kqueue.o: no symbols
>>> nm: src_libzmq_la-poll.o: no symbols
>>> nm: src_libzmq_la-pollset.o: no symbols
>>> nm: src_libzmq_la-precompiled.o: no symbols
>>> nm: src_libzmq_la-select.o: no symbols
>>> nm: src_libzmq_la-vmci.o: no symbols
>>> nm: src_libzmq_la-vmci_address.o: no symbols
>>> nm: src_libzmq_la-vmci_connecter.o: no symbols
>>> nm: src_libzmq_la-vmci_listener.o: no symbols
>>> 0fb0 T zmq_msg_group(zmq_msg_t*) <- matched
>>> 
>>> Kind Regards
>>> 
>>>   Stephan
>>> 
>>> On 26.09.2018 17:05, Stephan again wrote:
 I Installed it from:
 
 http://download.opensuse.org/repositories/network:/messaging:/zer
 omq:/release-draft/xUbuntu_18.04/
 
 romq:/release-draft/xUbuntu_18.04/>
 Hoping that it was compiled accordingly...
 
 This: 
 g++ Discovery.cpp /usr/lib/x86_64-linux-gnu/libzmq.a -lpthread
 -DZMQ_BUILD_DRAFT_API=1 -DENABLE_DRAFTS=On -o test
 
 makes it even worth:
 
 /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-socket_base.o):
 In function `zmq::socket_base_t::connect(char const*)':
 (.text+0x4b26): undefined reference to `pgm_freeaddrinfo'
 /tmp/cc62suQj.o: In function `msg_send(zmq_msg_t*, void*, char
 const*, char const*)':
 Discovery.cpp:(.text+0x8e): undefined reference to
 `zmq_msg_set_group'
 /tmp/cc62suQj.o: In function `msg_recv_cmp(zmq_msg_t*, void*,
 char const*, char const*)':
 Discovery.cpp:(.text+0x148): undefined 

[zeromq-dev] Unsubscribe

2018-09-26 Thread Osiris Pedroso

___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Stephan again

Update:

I investigated my .so files with "readelf -Ws" and "objdump -T" and both 
say that there are no draft api symbols. Nevertheless, when I download 
the deb package from zeromq's repo and investigate the libraries in 
there with the same tools, it matches.


So regarding the dynamic library, there is definitely a wrong version 
installed. Leading to the question, why is that: "sudo apt-cache showpkg 
libzmq3-dev" says:


Package: libzmq3-dev
Versions:
4.2.5-1 
(/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_universe_binary-amd64_Packages) 
(/var/lib/dpkg/status)

 Description Language:
 File: 
/var/lib/apt/lists/download.opensuse.org_repositories_network:_messaging:_zeromq:_release-draft_xUbuntu%5f18.04_._Packages

  MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
 Description Language:
 File: 
/var/lib/apt/lists/download.opensuse.org_repositories_network:_messaging:_zeromq:_release-draft_xUbuntu%5f18.04_._Packages

  MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
 Description Language:
 File: 
/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_universe_binary-amd64_Packages

  MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
 Description Language:
 File: 
/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_universe_binary-i386_Packages

  MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
 Description Language: en_GB
 File: 
/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_universe_i18n_Translation-en%5fGB

  MD5: 7b2c1e47f6d305566aebc0e65e04f5ee
 Description Language: en
 File: 
/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_bionic_universe_i18n_Translation-en

  MD5: 7b2c1e47f6d305566aebc0e65e04f5ee

So in my opinion the zeromq repo should have priority over the ubuntu repo.

Further investigating. Help is welcome.

- Stephan


On 26.09.2018 17:21, Luca Boccassi wrote:

And so does the shared library:

$ objdump -T libzmq.so.5.1.5 | grep msg_group
00075a60 gDF .text  0005  Basezmq_msg_group

Make sure you have actually installed it from that repository and not
from Ubuntu's.

On Wed, 2018-09-26 at 17:10 +0200, Stephan again wrote:

And the static library installed from this repository seems to have
the
draft api included. Here is the test for that:

nm -gC /usr/lib/x86_64-linux-gnu/libzmq.a | grep zmq_msg_group

nm: src_libzmq_la-devpoll.o: no symbols
nm: src_libzmq_la-gssapi_mechanism_base.o: no symbols
nm: src_libzmq_la-gssapi_client.o: no symbols
nm: src_libzmq_la-gssapi_server.o: no symbols
nm: src_libzmq_la-kqueue.o: no symbols
nm: src_libzmq_la-poll.o: no symbols
nm: src_libzmq_la-pollset.o: no symbols
nm: src_libzmq_la-precompiled.o: no symbols
nm: src_libzmq_la-select.o: no symbols
nm: src_libzmq_la-vmci.o: no symbols
nm: src_libzmq_la-vmci_address.o: no symbols
nm: src_libzmq_la-vmci_connecter.o: no symbols
nm: src_libzmq_la-vmci_listener.o: no symbols
0fb0 T zmq_msg_group(zmq_msg_t*) <- matched

Kind Regards

    Stephan


On 26.09.2018 17:05, Stephan again wrote:

I Installed it from:

http://download.opensuse.org/repositories/network:/messaging:/zerom
q:/release-draft/xUbuntu_18.04/

Hoping that it was compiled accordingly...

This:

g++ Discovery.cpp /usr/lib/x86_64-linux-gnu/libzmq.a -lpthread
-DZMQ_BUILD_DRAFT_API=1 -DENABLE_DRAFTS=On -o test

makes it even worth:

/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-socket_base.o):
In
function `zmq::socket_base_t::connect(char const*)':
(.text+0x4b26): undefined reference to `pgm_freeaddrinfo'
/tmp/cc62suQj.o: In function `msg_send(zmq_msg_t*, void*, char
const*,
char const*)':
Discovery.cpp:(.text+0x8e): undefined reference to
`zmq_msg_set_group'
/tmp/cc62suQj.o: In function `msg_recv_cmp(zmq_msg_t*, void*, char
const*, char const*)':
Discovery.cpp:(.text+0x148): undefined reference to `zmq_msg_group'
/tmp/cc62suQj.o: In function `main':
Discovery.cpp:(.text+0x30e): undefined reference to `zmq_leave'
Discovery.cpp:(.text+0x37f): undefined reference to `zmq_join'
Discovery.cpp:(.text+0x3c3): undefined reference to `zmq_join'
Discovery.cpp:(.text+0x407): undefined reference to `zmq_join'
Discovery.cpp:(.text+0x57c): undefined reference to `zmq_join'
Discovery.cpp:(.text+0x668): undefined reference to `zmq_leave'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-zmq_utils.o): In
function `zmq_curve_keypair':
(.text+0x3e6): undefined reference to `crypto_box_keypair'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-zmq_utils.o): In
function `zmq_curve_public':
(.text+0x482): undefined reference to `crypto_scalarmult_base'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-ip.o): In
function
`zmq::initialize_network()':
(.text+0x480): undefined reference to `pgm_init'
(.text+0x511): undefined reference to `pgm_error_free'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-ip.o): In
function

Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Luca Boccassi
In case the base system is missing a dependency, everything that is
needed is shipped in the same repository where the library can be
found, and kept up to date.
Please do not recommend to avoid repositories - it's the preferred form
of distribution for Linux users.

On Wed, 2018-09-26 at 11:22 -0400, Bill Torpey wrote:
> So I guess you could use the static lib, but that may not be ideal.
> 
> Personally I’ve had problems with the packaged builds — e.g., the RH
> builds require specific versions of dependent libs that are not
> native to the OS.  For that reason, among others, I build libzmq from
> source.  That’s not easy either, but at least you know what you’re
> getting.
> 
> FWIW, here’s a snip from the build script that I use — you will
> obviously need to make changes for your environment, but it’s a
> start.  
> 
> # delete old build
> rm -rf build
> mkdir build
> cd build
> 
> # do the build
> cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX}
> -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
>    -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
>    -DENABLE_DRAFTS=On \
>    -DBUILD_STATIC=Off \
>    -DWITH_OPENPGM=Off \
>    ..
> rc=$?
> [[ $rc != 0 ]] && exit $rc
> 
> make ${VERBOSE} && make ${VERBOSE} install
> rc=$?
> [[ $rc != 0 ]] && exit $rc
> 
> 
> # copy source to facilitate debugging
> mkdir -p ${INSTALL_PREFIX}/src
> cp -rp ../src ${INSTALL_PREFIX}/
> 
> 
> > On Sep 26, 2018, at 11:10 AM, Stephan again  > > wrote:
> > 
> > And the static library installed from this repository seems to have
> > the draft api included. Here is the test for that: 
> > nm -gC /usr/lib/x86_64-linux-gnu/libzmq.a | grep zmq_msg_group
> > 
> > nm: src_libzmq_la-devpoll.o: no symbols
> > nm: src_libzmq_la-gssapi_mechanism_base.o: no symbols
> > nm: src_libzmq_la-gssapi_client.o: no symbols
> > nm: src_libzmq_la-gssapi_server.o: no symbols
> > nm: src_libzmq_la-kqueue.o: no symbols
> > nm: src_libzmq_la-poll.o: no symbols
> > nm: src_libzmq_la-pollset.o: no symbols
> > nm: src_libzmq_la-precompiled.o: no symbols
> > nm: src_libzmq_la-select.o: no symbols
> > nm: src_libzmq_la-vmci.o: no symbols
> > nm: src_libzmq_la-vmci_address.o: no symbols
> > nm: src_libzmq_la-vmci_connecter.o: no symbols
> > nm: src_libzmq_la-vmci_listener.o: no symbols
> > 0fb0 T zmq_msg_group(zmq_msg_t*) <- matched
> > 
> > Kind Regards
> > 
> >   Stephan
> > 
> > On 26.09.2018 17:05, Stephan again wrote:
> > > I Installed it from:
> > > 
> > > http://download.opensuse.org/repositories/network:/messaging:/zer
> > > omq:/release-draft/xUbuntu_18.04/
> > >  > > romq:/release-draft/xUbuntu_18.04/>
> > > Hoping that it was compiled accordingly...
> > > 
> > > This: 
> > > g++ Discovery.cpp /usr/lib/x86_64-linux-gnu/libzmq.a -lpthread
> > > -DZMQ_BUILD_DRAFT_API=1 -DENABLE_DRAFTS=On -o test
> > > 
> > > makes it even worth:
> > > 
> > > /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-socket_base.o):
> > > In function `zmq::socket_base_t::connect(char const*)':
> > > (.text+0x4b26): undefined reference to `pgm_freeaddrinfo'
> > > /tmp/cc62suQj.o: In function `msg_send(zmq_msg_t*, void*, char
> > > const*, char const*)':
> > > Discovery.cpp:(.text+0x8e): undefined reference to
> > > `zmq_msg_set_group'
> > > /tmp/cc62suQj.o: In function `msg_recv_cmp(zmq_msg_t*, void*,
> > > char const*, char const*)':
> > > Discovery.cpp:(.text+0x148): undefined reference to
> > > `zmq_msg_group'
> > > /tmp/cc62suQj.o: In function `main':
> > > Discovery.cpp:(.text+0x30e): undefined reference to `zmq_leave'
> > > Discovery.cpp:(.text+0x37f): undefined reference to `zmq_join'
> > > Discovery.cpp:(.text+0x3c3): undefined reference to `zmq_join'
> > > Discovery.cpp:(.text+0x407): undefined reference to `zmq_join'
> > > Discovery.cpp:(.text+0x57c): undefined reference to `zmq_join'
> > > Discovery.cpp:(.text+0x668): undefined reference to `zmq_leave'
> > > /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-zmq_utils.o): In
> > > function `zmq_curve_keypair':
> > > (.text+0x3e6): undefined reference to `crypto_box_keypair'
> > > /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-zmq_utils.o): In
> > > function `zmq_curve_public':
> > > (.text+0x482): undefined reference to `crypto_scalarmult_base'
> > > /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-ip.o): In
> > > function `zmq::initialize_network()':
> > > (.text+0x480): undefined reference to `pgm_init'
> > > (.text+0x511): undefined reference to `pgm_error_free'
> > > /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-ip.o): In
> > > function `zmq::shutdown_network()':
> > > (.text+0x585): undefined reference to `pgm_shutdown'
> > > /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-random.o): In
> > > function `zmq::random_open()':
> > > (.text+0x95): undefined reference to `sodium_init'
> > > /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-random.o): In
> > > function `zmq::random_close()':
> > > (.text+0xc1): undefined reference to `randombytes_close'
> > > 

Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Bill Torpey
So I guess you could use the static lib, but that may not be ideal.

Personally I’ve had problems with the packaged builds — e.g., the RH builds 
require specific versions of dependent libs that are not native to the OS.  For 
that reason, among others, I build libzmq from source.  That’s not easy either, 
but at least you know what you’re getting.

FWIW, here’s a snip from the build script that I use — you will obviously need 
to make changes for your environment, but it’s a start.  

# delete old build
rm -rf build
mkdir build
cd build

# do the build
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} 
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
   -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
   -DENABLE_DRAFTS=On \
   -DBUILD_STATIC=Off \
   -DWITH_OPENPGM=Off \
   ..
rc=$?
[[ $rc != 0 ]] && exit $rc

make ${VERBOSE} && make ${VERBOSE} install
rc=$?
[[ $rc != 0 ]] && exit $rc


# copy source to facilitate debugging
mkdir -p ${INSTALL_PREFIX}/src
cp -rp ../src ${INSTALL_PREFIX}/


> On Sep 26, 2018, at 11:10 AM, Stephan again  wrote:
> 
> And the static library installed from this repository seems to have the draft 
> api included. Here is the test for that: 
> nm -gC /usr/lib/x86_64-linux-gnu/libzmq.a | grep zmq_msg_group
> 
> nm: src_libzmq_la-devpoll.o: no symbols
> nm: src_libzmq_la-gssapi_mechanism_base.o: no symbols
> nm: src_libzmq_la-gssapi_client.o: no symbols
> nm: src_libzmq_la-gssapi_server.o: no symbols
> nm: src_libzmq_la-kqueue.o: no symbols
> nm: src_libzmq_la-poll.o: no symbols
> nm: src_libzmq_la-pollset.o: no symbols
> nm: src_libzmq_la-precompiled.o: no symbols
> nm: src_libzmq_la-select.o: no symbols
> nm: src_libzmq_la-vmci.o: no symbols
> nm: src_libzmq_la-vmci_address.o: no symbols
> nm: src_libzmq_la-vmci_connecter.o: no symbols
> nm: src_libzmq_la-vmci_listener.o: no symbols
> 0fb0 T zmq_msg_group(zmq_msg_t*) <- matched
> 
> Kind Regards
> 
>   Stephan
> 
> On 26.09.2018 17:05, Stephan again wrote:
>> I Installed it from:
>> 
>> http://download.opensuse.org/repositories/network:/messaging:/zeromq:/release-draft/xUbuntu_18.04/
>>  
>> 
>> Hoping that it was compiled accordingly...
>> 
>> This: 
>> g++ Discovery.cpp /usr/lib/x86_64-linux-gnu/libzmq.a -lpthread 
>> -DZMQ_BUILD_DRAFT_API=1 -DENABLE_DRAFTS=On -o test
>> 
>> makes it even worth:
>> 
>> /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-socket_base.o): In function 
>> `zmq::socket_base_t::connect(char const*)':
>> (.text+0x4b26): undefined reference to `pgm_freeaddrinfo'
>> /tmp/cc62suQj.o: In function `msg_send(zmq_msg_t*, void*, char const*, char 
>> const*)':
>> Discovery.cpp:(.text+0x8e): undefined reference to `zmq_msg_set_group'
>> /tmp/cc62suQj.o: In function `msg_recv_cmp(zmq_msg_t*, void*, char const*, 
>> char const*)':
>> Discovery.cpp:(.text+0x148): undefined reference to `zmq_msg_group'
>> /tmp/cc62suQj.o: In function `main':
>> Discovery.cpp:(.text+0x30e): undefined reference to `zmq_leave'
>> Discovery.cpp:(.text+0x37f): undefined reference to `zmq_join'
>> Discovery.cpp:(.text+0x3c3): undefined reference to `zmq_join'
>> Discovery.cpp:(.text+0x407): undefined reference to `zmq_join'
>> Discovery.cpp:(.text+0x57c): undefined reference to `zmq_join'
>> Discovery.cpp:(.text+0x668): undefined reference to `zmq_leave'
>> /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-zmq_utils.o): In function 
>> `zmq_curve_keypair':
>> (.text+0x3e6): undefined reference to `crypto_box_keypair'
>> /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-zmq_utils.o): In function 
>> `zmq_curve_public':
>> (.text+0x482): undefined reference to `crypto_scalarmult_base'
>> /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-ip.o): In function 
>> `zmq::initialize_network()':
>> (.text+0x480): undefined reference to `pgm_init'
>> (.text+0x511): undefined reference to `pgm_error_free'
>> /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-ip.o): In function 
>> `zmq::shutdown_network()':
>> (.text+0x585): undefined reference to `pgm_shutdown'
>> /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-random.o): In function 
>> `zmq::random_open()':
>> (.text+0x95): undefined reference to `sodium_init'
>> /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-random.o): In function 
>> `zmq::random_close()':
>> (.text+0xc1): undefined reference to `randombytes_close'
>> /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-pgm_socket.o): In function 
>> `zmq::pgm_socket_t::init_address(char const*, pgm_addrinfo_t**, unsigned 
>> short*)':
>> (.text+0x17e): undefined reference to `pgm_getaddrinfo'
>> (.text+0x26f): undefined reference to `pgm_error_free'
>> 
>> 
>> 
>> Kind Regards
>> 
>>   Stephan
>> 
>> 
>> On 26.09.2018 16:55, Jake wrote:
>>> ZeroMQ itself needs to be compiled with ENABLE_DRAFTS in CMake.  You've 
>>> added it to the compiler flags when building your own application.  Did you 
>>> compile ZeroMQ yourself or are you using a distro-provided 

Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Luca Boccassi
And so does the shared library:

$ objdump -T libzmq.so.5.1.5 | grep msg_group
00075a60 gDF .text  0005  Basezmq_msg_group

Make sure you have actually installed it from that repository and not
from Ubuntu's.

On Wed, 2018-09-26 at 17:10 +0200, Stephan again wrote:
> And the static library installed from this repository seems to have
> the 
> draft api included. Here is the test for that:
> 
> nm -gC /usr/lib/x86_64-linux-gnu/libzmq.a | grep zmq_msg_group
> 
> nm: src_libzmq_la-devpoll.o: no symbols
> nm: src_libzmq_la-gssapi_mechanism_base.o: no symbols
> nm: src_libzmq_la-gssapi_client.o: no symbols
> nm: src_libzmq_la-gssapi_server.o: no symbols
> nm: src_libzmq_la-kqueue.o: no symbols
> nm: src_libzmq_la-poll.o: no symbols
> nm: src_libzmq_la-pollset.o: no symbols
> nm: src_libzmq_la-precompiled.o: no symbols
> nm: src_libzmq_la-select.o: no symbols
> nm: src_libzmq_la-vmci.o: no symbols
> nm: src_libzmq_la-vmci_address.o: no symbols
> nm: src_libzmq_la-vmci_connecter.o: no symbols
> nm: src_libzmq_la-vmci_listener.o: no symbols
> 0fb0 T zmq_msg_group(zmq_msg_t*) <- matched
> 
> Kind Regards
> 
>    Stephan
> 
> 
> On 26.09.2018 17:05, Stephan again wrote:
> > 
> > I Installed it from:
> > 
> > http://download.opensuse.org/repositories/network:/messaging:/zerom
> > q:/release-draft/xUbuntu_18.04/
> > 
> > Hoping that it was compiled accordingly...
> > 
> > This:
> > 
> > g++ Discovery.cpp /usr/lib/x86_64-linux-gnu/libzmq.a -lpthread 
> > -DZMQ_BUILD_DRAFT_API=1 -DENABLE_DRAFTS=On -o test
> > 
> > makes it even worth:
> > 
> > /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-socket_base.o):
> > In 
> > function `zmq::socket_base_t::connect(char const*)':
> > (.text+0x4b26): undefined reference to `pgm_freeaddrinfo'
> > /tmp/cc62suQj.o: In function `msg_send(zmq_msg_t*, void*, char
> > const*, 
> > char const*)':
> > Discovery.cpp:(.text+0x8e): undefined reference to
> > `zmq_msg_set_group'
> > /tmp/cc62suQj.o: In function `msg_recv_cmp(zmq_msg_t*, void*, char 
> > const*, char const*)':
> > Discovery.cpp:(.text+0x148): undefined reference to `zmq_msg_group'
> > /tmp/cc62suQj.o: In function `main':
> > Discovery.cpp:(.text+0x30e): undefined reference to `zmq_leave'
> > Discovery.cpp:(.text+0x37f): undefined reference to `zmq_join'
> > Discovery.cpp:(.text+0x3c3): undefined reference to `zmq_join'
> > Discovery.cpp:(.text+0x407): undefined reference to `zmq_join'
> > Discovery.cpp:(.text+0x57c): undefined reference to `zmq_join'
> > Discovery.cpp:(.text+0x668): undefined reference to `zmq_leave'
> > /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-zmq_utils.o): In 
> > function `zmq_curve_keypair':
> > (.text+0x3e6): undefined reference to `crypto_box_keypair'
> > /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-zmq_utils.o): In 
> > function `zmq_curve_public':
> > (.text+0x482): undefined reference to `crypto_scalarmult_base'
> > /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-ip.o): In
> > function 
> > `zmq::initialize_network()':
> > (.text+0x480): undefined reference to `pgm_init'
> > (.text+0x511): undefined reference to `pgm_error_free'
> > /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-ip.o): In
> > function 
> > `zmq::shutdown_network()':
> > (.text+0x585): undefined reference to `pgm_shutdown'
> > /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-random.o): In 
> > function `zmq::random_open()':
> > (.text+0x95): undefined reference to `sodium_init'
> > /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-random.o): In 
> > function `zmq::random_close()':
> > (.text+0xc1): undefined reference to `randombytes_close'
> > /usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-pgm_socket.o): In 
> > function `zmq::pgm_socket_t::init_address(char const*, 
> > pgm_addrinfo_t**, unsigned short*)':
> > (.text+0x17e): undefined reference to `pgm_getaddrinfo'
> > (.text+0x26f): undefined reference to `pgm_error_free'
> > 
> > 
> > 
> > Kind Regards
> > 
> >   Stephan
> > 
> > 
> > 
> > On 26.09.2018 16:55, Jake wrote:
> > > ZeroMQ itself needs to be compiled with ENABLE_DRAFTS in CMake.  
> > > You've added it to the compiler flags when building your own 
> > > application.  Did you compile ZeroMQ yourself or are you using a 
> > > distro-provided version?
> > > 
> > > For the static library, one way is to give the full path to the
> > > .a 
> > > file instead of using -lzmq.  gcc default behavior prefers the
> > > shared 
> > > object when both are present.
> > > 
> > > -Jake
> > > 
> > > 
> > > On Wed, Sep 26, 2018 at 10:51 AM Stephan again 
> > > mailto:op...@vs.uni-kassel.de>> wrote:
> > > 
> > > Hi Bill,
> > > 
> > > adding -DENABLE_DRAFTS=On does not help:
> > > 
> > > g++ Discovery.cpp -lzmq -DZMQ_BUILD_DRAFT_API=1
> > > -DENABLE_DRAFTS=On -o test
> > > 
> > > I also checked my installed libraries with "nm -gC  > > grep zmq_msgs_group":
> > > 
> > > /usr/lib/x86_64-linux-gnu/libzmq.a -> match
> > > 

Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Stephan again
And the static library installed from this repository seems to have the 
draft api included. Here is the test for that:


nm -gC /usr/lib/x86_64-linux-gnu/libzmq.a | grep zmq_msg_group

nm: src_libzmq_la-devpoll.o: no symbols
nm: src_libzmq_la-gssapi_mechanism_base.o: no symbols
nm: src_libzmq_la-gssapi_client.o: no symbols
nm: src_libzmq_la-gssapi_server.o: no symbols
nm: src_libzmq_la-kqueue.o: no symbols
nm: src_libzmq_la-poll.o: no symbols
nm: src_libzmq_la-pollset.o: no symbols
nm: src_libzmq_la-precompiled.o: no symbols
nm: src_libzmq_la-select.o: no symbols
nm: src_libzmq_la-vmci.o: no symbols
nm: src_libzmq_la-vmci_address.o: no symbols
nm: src_libzmq_la-vmci_connecter.o: no symbols
nm: src_libzmq_la-vmci_listener.o: no symbols
0fb0 T zmq_msg_group(zmq_msg_t*) <- matched

Kind Regards

  Stephan


On 26.09.2018 17:05, Stephan again wrote:


I Installed it from:

http://download.opensuse.org/repositories/network:/messaging:/zeromq:/release-draft/xUbuntu_18.04/

Hoping that it was compiled accordingly...

This:

g++ Discovery.cpp /usr/lib/x86_64-linux-gnu/libzmq.a -lpthread 
-DZMQ_BUILD_DRAFT_API=1 -DENABLE_DRAFTS=On -o test


makes it even worth:

/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-socket_base.o): In 
function `zmq::socket_base_t::connect(char const*)':

(.text+0x4b26): undefined reference to `pgm_freeaddrinfo'
/tmp/cc62suQj.o: In function `msg_send(zmq_msg_t*, void*, char const*, 
char const*)':

Discovery.cpp:(.text+0x8e): undefined reference to `zmq_msg_set_group'
/tmp/cc62suQj.o: In function `msg_recv_cmp(zmq_msg_t*, void*, char 
const*, char const*)':

Discovery.cpp:(.text+0x148): undefined reference to `zmq_msg_group'
/tmp/cc62suQj.o: In function `main':
Discovery.cpp:(.text+0x30e): undefined reference to `zmq_leave'
Discovery.cpp:(.text+0x37f): undefined reference to `zmq_join'
Discovery.cpp:(.text+0x3c3): undefined reference to `zmq_join'
Discovery.cpp:(.text+0x407): undefined reference to `zmq_join'
Discovery.cpp:(.text+0x57c): undefined reference to `zmq_join'
Discovery.cpp:(.text+0x668): undefined reference to `zmq_leave'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-zmq_utils.o): In 
function `zmq_curve_keypair':

(.text+0x3e6): undefined reference to `crypto_box_keypair'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-zmq_utils.o): In 
function `zmq_curve_public':

(.text+0x482): undefined reference to `crypto_scalarmult_base'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-ip.o): In function 
`zmq::initialize_network()':

(.text+0x480): undefined reference to `pgm_init'
(.text+0x511): undefined reference to `pgm_error_free'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-ip.o): In function 
`zmq::shutdown_network()':

(.text+0x585): undefined reference to `pgm_shutdown'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-random.o): In 
function `zmq::random_open()':

(.text+0x95): undefined reference to `sodium_init'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-random.o): In 
function `zmq::random_close()':

(.text+0xc1): undefined reference to `randombytes_close'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-pgm_socket.o): In 
function `zmq::pgm_socket_t::init_address(char const*, 
pgm_addrinfo_t**, unsigned short*)':

(.text+0x17e): undefined reference to `pgm_getaddrinfo'
(.text+0x26f): undefined reference to `pgm_error_free'



Kind Regards

  Stephan



On 26.09.2018 16:55, Jake wrote:
ZeroMQ itself needs to be compiled with ENABLE_DRAFTS in CMake.  
You've added it to the compiler flags when building your own 
application.  Did you compile ZeroMQ yourself or are you using a 
distro-provided version?


For the static library, one way is to give the full path to the .a 
file instead of using -lzmq.  gcc default behavior prefers the shared 
object when both are present.


-Jake


On Wed, Sep 26, 2018 at 10:51 AM Stephan again 
mailto:op...@vs.uni-kassel.de>> wrote:


Hi Bill,

adding -DENABLE_DRAFTS=On does not help:

g++ Discovery.cpp -lzmq -DZMQ_BUILD_DRAFT_API=1
-DENABLE_DRAFTS=On -o test

I also checked my installed libraries with "nm -gC  match
/usr/lib/x86_64-linux-gnu/libzmq.so -> no match
/usr/lib/x86_64-linux-gnu/libzmq.so.5 -> no match
/usr/lib/x86_64-linux-gnu/libzmq.so.5.1.5 -> no match

I am not so into this dynamic and static library stuff, but my
build chain is linking agains
"/usr/lib/x86_64-linux-gnu/libzmq.so". Is that the problem? How
do I force it on command line to link against the static version.

Kind Regards

  Stephan


On 26.09.2018 16:08, Bill Torpey wrote:

Hi Stephan:

The RADIO/DISH sockets are considered DRAFT, which is probably
why you’re getting these errors.

There are a couple of possibilities:

- You may be linking against a version of libzmq that doesn’t
include the draft APIs.  In order to build with draft support,
the build needs to specify "-DENABLE_DRAFTS=On” on the cmake
command line.  Make sure your libzmq was 

Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Stephan again

I Installed it from:

http://download.opensuse.org/repositories/network:/messaging:/zeromq:/release-draft/xUbuntu_18.04/

Hoping that it was compiled accordingly...

This:

g++ Discovery.cpp /usr/lib/x86_64-linux-gnu/libzmq.a -lpthread 
-DZMQ_BUILD_DRAFT_API=1 -DENABLE_DRAFTS=On -o test


makes it even worth:

/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-socket_base.o): In 
function `zmq::socket_base_t::connect(char const*)':

(.text+0x4b26): undefined reference to `pgm_freeaddrinfo'
/tmp/cc62suQj.o: In function `msg_send(zmq_msg_t*, void*, char const*, 
char const*)':

Discovery.cpp:(.text+0x8e): undefined reference to `zmq_msg_set_group'
/tmp/cc62suQj.o: In function `msg_recv_cmp(zmq_msg_t*, void*, char 
const*, char const*)':

Discovery.cpp:(.text+0x148): undefined reference to `zmq_msg_group'
/tmp/cc62suQj.o: In function `main':
Discovery.cpp:(.text+0x30e): undefined reference to `zmq_leave'
Discovery.cpp:(.text+0x37f): undefined reference to `zmq_join'
Discovery.cpp:(.text+0x3c3): undefined reference to `zmq_join'
Discovery.cpp:(.text+0x407): undefined reference to `zmq_join'
Discovery.cpp:(.text+0x57c): undefined reference to `zmq_join'
Discovery.cpp:(.text+0x668): undefined reference to `zmq_leave'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-zmq_utils.o): In 
function `zmq_curve_keypair':

(.text+0x3e6): undefined reference to `crypto_box_keypair'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-zmq_utils.o): In 
function `zmq_curve_public':

(.text+0x482): undefined reference to `crypto_scalarmult_base'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-ip.o): In function 
`zmq::initialize_network()':

(.text+0x480): undefined reference to `pgm_init'
(.text+0x511): undefined reference to `pgm_error_free'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-ip.o): In function 
`zmq::shutdown_network()':

(.text+0x585): undefined reference to `pgm_shutdown'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-random.o): In function 
`zmq::random_open()':

(.text+0x95): undefined reference to `sodium_init'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-random.o): In function 
`zmq::random_close()':

(.text+0xc1): undefined reference to `randombytes_close'
/usr/lib/x86_64-linux-gnu/libzmq.a(src_libzmq_la-pgm_socket.o): In 
function `zmq::pgm_socket_t::init_address(char const*, pgm_addrinfo_t**, 
unsigned short*)':

(.text+0x17e): undefined reference to `pgm_getaddrinfo'
(.text+0x26f): undefined reference to `pgm_error_free'



Kind Regards

  Stephan



On 26.09.2018 16:55, Jake wrote:
ZeroMQ itself needs to be compiled with ENABLE_DRAFTS in CMake.  
You've added it to the compiler flags when building your own 
application.  Did you compile ZeroMQ yourself or are you using a 
distro-provided version?


For the static library, one way is to give the full path to the .a 
file instead of using -lzmq.  gcc default behavior prefers the shared 
object when both are present.


-Jake


On Wed, Sep 26, 2018 at 10:51 AM Stephan again > wrote:


Hi Bill,

adding -DENABLE_DRAFTS=On does not help:

g++ Discovery.cpp -lzmq -DZMQ_BUILD_DRAFT_API=1 -DENABLE_DRAFTS=On
-o test

I also checked my installed libraries with "nm -gC  match
/usr/lib/x86_64-linux-gnu/libzmq.so -> no match
/usr/lib/x86_64-linux-gnu/libzmq.so.5 -> no match
/usr/lib/x86_64-linux-gnu/libzmq.so.5.1.5 -> no match

I am not so into this dynamic and static library stuff, but my
build chain is linking agains
"/usr/lib/x86_64-linux-gnu/libzmq.so". Is that the problem? How do
I force it on command line to link against the static version.

Kind Regards

  Stephan


On 26.09.2018 16:08, Bill Torpey wrote:

Hi Stephan:

The RADIO/DISH sockets are considered DRAFT, which is probably
why you’re getting these errors.

There are a couple of possibilities:

- You may be linking against a version of libzmq that doesn’t
include the draft APIs.  In order to build with draft support,
the build needs to specify "-DENABLE_DRAFTS=On” on the cmake
command line.  Make sure your libzmq was built with support for
the draft APIs.


- You also need to enable draft APIs in your code, similar to
following:

#define ZMQ_BUILD_DRAFT_API
#include 

The #define makes the draft APIs visible to your code.

(Never mind — you’re already doing this on the compile command).

Hope this helps.

Bill


On Sep 26, 2018, at 9:13 AM, Stephan again
mailto:op...@vs.uni-kassel.de>> wrote:

Hi,

I asked this question/issue one and a half year ago

(https://lists.zeromq.org/mailman/private/zeromq-dev/2017-January/031309.html).
The difference is that I now would like to use zeromq (draft
api) version 4.2.5 under Ubuntu 18.04.

My minimal (not) working example can be found here:
https://gist.github.com/StephanOpfer/5b9f3f76e6610536078cb9c16072aac9

Compiling it with this command:

    g++ 

Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Bill Torpey
Jake is correct — the ENABLE_DRAFTS flag is used when *building* ZeromMQ, not 
when linking against the library.

Where did your ZeroMQ come from?  Did you build it from source, or take a 
pre-packaged build?  If the latter, it was likely built *without* draft 
support, and you will need to install a different package that was built *with* 
draft support.


> On Sep 26, 2018, at 10:55 AM, Jake  wrote:
> 
> ZeroMQ itself needs to be compiled with ENABLE_DRAFTS in CMake.  You've added 
> it to the compiler flags when building your own application.  Did you compile 
> ZeroMQ yourself or are you using a distro-provided version?
> 
> For the static library, one way is to give the full path to the .a file 
> instead of using -lzmq.  gcc default behavior prefers the shared object when 
> both are present.
> 
> -Jake
> 
> 
> On Wed, Sep 26, 2018 at 10:51 AM Stephan again  > wrote:
> Hi Bill,
> 
> adding -DENABLE_DRAFTS=On does not help:
> 
> g++ Discovery.cpp -lzmq -DZMQ_BUILD_DRAFT_API=1 -DENABLE_DRAFTS=On -o test
> 
> I also checked my installed libraries with "nm -gC  zmq_msgs_group":
> 
> /usr/lib/x86_64-linux-gnu/libzmq.a -> match
> /usr/lib/x86_64-linux-gnu/libzmq.so -> no match
> /usr/lib/x86_64-linux-gnu/libzmq.so.5 -> no match
> /usr/lib/x86_64-linux-gnu/libzmq.so.5.1.5 -> no match
> 
> I am not so into this dynamic and static library stuff, but my build chain is 
> linking agains "/usr/lib/x86_64-linux-gnu/libzmq.so". Is that the problem? 
> How do I force it on command line to link against the static version.
> 
> Kind Regards
> 
>   Stephan
> 
> On 26.09.2018 16:08, Bill Torpey wrote:
>> Hi Stephan:
>> 
>> The RADIO/DISH sockets are considered DRAFT, which is probably why you’re 
>> getting these errors.
>> 
>> There are a couple of possibilities:
>> 
>> - You may be linking against a version of libzmq that doesn’t include the 
>> draft APIs.  In order to build with draft support, the build needs to 
>> specify "-DENABLE_DRAFTS=On” on the cmake command line.  Make sure your 
>> libzmq was built with support for the draft APIs.
>> 
>> 
>> - You also need to enable draft APIs in your code, similar to following:
>> 
>> #define ZMQ_BUILD_DRAFT_API
>> #include 
>> 
>> The #define makes the draft APIs visible to your code.
>> 
>> (Never mind — you’re already doing this on the compile command).
>> 
>> Hope this helps.
>> 
>> Bill
>> 
>>> On Sep 26, 2018, at 9:13 AM, Stephan again >> > wrote:
>>> 
>>> Hi,
>>> 
>>> I asked this question/issue one and a half year ago 
>>> (https://lists.zeromq.org/mailman/private/zeromq-dev/2017-January/031309.html
>>>  
>>> ).
>>>  The difference is that I now would like to use zeromq (draft api) version 
>>> 4.2.5 under Ubuntu 18.04.
>>> 
>>> My minimal (not) working example can be found here: 
>>> https://gist.github.com/StephanOpfer/5b9f3f76e6610536078cb9c16072aac9 
>>> 
>>> 
>>> Compiling it with this command:
>>> 
>>> g++ Discovery.cpp -lzmq -DZMQ_BUILD_DRAFT_API=1 -o test
>>> 
>>> produces this:
>>> 
>>> /tmp/ccUwelWs.o: In function `msg_send(zmq_msg_t*, void*, char const*, 
>>> char const*)':
>>> Discovery.cpp:(.text+0x8e): undefined reference to `zmq_msg_set_group'
>>> /tmp/ccUwelWs.o: In function `msg_recv_cmp(zmq_msg_t*, void*, char 
>>> const*, char const*)':
>>> Discovery.cpp:(.text+0x148): undefined reference to `zmq_msg_group'
>>> /tmp/ccUwelWs.o: In function `main':
>>> Discovery.cpp:(.text+0x30e): undefined reference to `zmq_leave'
>>> Discovery.cpp:(.text+0x37f): undefined reference to `zmq_join'
>>> Discovery.cpp:(.text+0x3c3): undefined reference to `zmq_join'
>>> Discovery.cpp:(.text+0x407): undefined reference to `zmq_join'
>>> Discovery.cpp:(.text+0x57c): undefined reference to `zmq_join'
>>> Discovery.cpp:(.text+0x668): undefined reference to `zmq_leave'
>>> collect2: error: ld returned 1 exit status
>>> 
>>> Any help is welcome. :)
>>> 
>>> Kind Regards
>>> 
>>>   Stephan
>>> 
>>> 
>>> ___
>>> zeromq-dev mailing list
>>> zeromq-dev@lists.zeromq.org 
>>> https://lists.zeromq.org/mailman/listinfo/zeromq-dev 
>>> 
>> 
>> 
>> 
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org 
>> https://lists.zeromq.org/mailman/listinfo/zeromq-dev 
>> 
> 
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org 
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev 
> 
> 

Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Jake
ZeroMQ itself needs to be compiled with ENABLE_DRAFTS in CMake.  You've
added it to the compiler flags when building your own application.  Did you
compile ZeroMQ yourself or are you using a distro-provided version?

For the static library, one way is to give the full path to the .a file
instead of using -lzmq.  gcc default behavior prefers the shared object
when both are present.

-Jake


On Wed, Sep 26, 2018 at 10:51 AM Stephan again 
wrote:

> Hi Bill,
>
> adding -DENABLE_DRAFTS=On does not help:
>
> g++ Discovery.cpp -lzmq -DZMQ_BUILD_DRAFT_API=1 -DENABLE_DRAFTS=On -o test
>
> I also checked my installed libraries with "nm -gC  zmq_msgs_group":
>
> /usr/lib/x86_64-linux-gnu/libzmq.a -> match
> /usr/lib/x86_64-linux-gnu/libzmq.so -> no match
> /usr/lib/x86_64-linux-gnu/libzmq.so.5 -> no match
> /usr/lib/x86_64-linux-gnu/libzmq.so.5.1.5 -> no match
>
> I am not so into this dynamic and static library stuff, but my build chain
> is linking agains "/usr/lib/x86_64-linux-gnu/libzmq.so". Is that the
> problem? How do I force it on command line to link against the static
> version.
>
> Kind Regards
>
>   Stephan
>
> On 26.09.2018 16:08, Bill Torpey wrote:
>
> Hi Stephan:
>
> The RADIO/DISH sockets are considered DRAFT, which is probably why you’re
> getting these errors.
>
> There are a couple of possibilities:
>
> - You may be linking against a version of libzmq that doesn’t include the
> draft APIs.  In order to build with draft support, the build needs to
> specify "-DENABLE_DRAFTS=On” on the cmake command line.  Make sure your
> libzmq was built with support for the draft APIs.
>
>
> - You also need to enable draft APIs in your code, similar to following:
>
> #define ZMQ_BUILD_DRAFT_API
> #include 
>
> The #define makes the draft APIs visible to your code.
>
> (Never mind — you’re already doing this on the compile command).
>
> Hope this helps.
>
> Bill
>
> On Sep 26, 2018, at 9:13 AM, Stephan again  wrote:
>
> Hi,
>
> I asked this question/issue one and a half year ago (
> https://lists.zeromq.org/mailman/private/zeromq-dev/2017-January/031309.html).
> The difference is that I now would like to use zeromq (draft api) version
> 4.2.5 under Ubuntu 18.04.
>
> My minimal (not) working example can be found here:
> https://gist.github.com/StephanOpfer/5b9f3f76e6610536078cb9c16072aac9
>
> Compiling it with this command:
>
> g++ Discovery.cpp -lzmq -DZMQ_BUILD_DRAFT_API=1 -o test
>
> produces this:
>
> /tmp/ccUwelWs.o: In function `msg_send(zmq_msg_t*, void*, char const*,
> char const*)':
> Discovery.cpp:(.text+0x8e): undefined reference to `zmq_msg_set_group'
> /tmp/ccUwelWs.o: In function `msg_recv_cmp(zmq_msg_t*, void*, char
> const*, char const*)':
> Discovery.cpp:(.text+0x148): undefined reference to `zmq_msg_group'
> /tmp/ccUwelWs.o: In function `main':
> Discovery.cpp:(.text+0x30e): undefined reference to `zmq_leave'
> Discovery.cpp:(.text+0x37f): undefined reference to `zmq_join'
> Discovery.cpp:(.text+0x3c3): undefined reference to `zmq_join'
> Discovery.cpp:(.text+0x407): undefined reference to `zmq_join'
> Discovery.cpp:(.text+0x57c): undefined reference to `zmq_join'
> Discovery.cpp:(.text+0x668): undefined reference to `zmq_leave'
> collect2: error: ld returned 1 exit status
>
> Any help is welcome. :)
>
> Kind Regards
>
>   Stephan
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
>
>
> ___
> zeromq-dev mailing 
> listzeromq-dev@lists.zeromq.orghttps://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Stephan again

Hi Bill,

adding -DENABLE_DRAFTS=On does not help:

g++ Discovery.cpp -lzmq -DZMQ_BUILD_DRAFT_API=1 -DENABLE_DRAFTS=On -o test

I also checked my installed libraries with "nm -gC zmq_msgs_group":


/usr/lib/x86_64-linux-gnu/libzmq.a -> match
/usr/lib/x86_64-linux-gnu/libzmq.so -> no match
/usr/lib/x86_64-linux-gnu/libzmq.so.5 -> no match
/usr/lib/x86_64-linux-gnu/libzmq.so.5.1.5 -> no match

I am not so into this dynamic and static library stuff, but my build 
chain is linking agains "/usr/lib/x86_64-linux-gnu/libzmq.so". Is that 
the problem? How do I force it on command line to link against the 
static version.


Kind Regards

  Stephan


On 26.09.2018 16:08, Bill Torpey wrote:

Hi Stephan:

The RADIO/DISH sockets are considered DRAFT, which is probably why 
you’re getting these errors.


There are a couple of possibilities:

- You may be linking against a version of libzmq that doesn’t include 
the draft APIs.  In order to build with draft support, the build needs 
to specify "-DENABLE_DRAFTS=On” on the cmake command line.  Make sure 
your libzmq was built with support for the draft APIs.



- You also need to enable draft APIs in your code, similar to following:

#define ZMQ_BUILD_DRAFT_API
#include 

The #define makes the draft APIs visible to your code.

(Never mind — you’re already doing this on the compile command).

Hope this helps.

Bill

On Sep 26, 2018, at 9:13 AM, Stephan again > wrote:


Hi,

I asked this question/issue one and a half year ago 
(https://lists.zeromq.org/mailman/private/zeromq-dev/2017-January/031309.html). 
The difference is that I now would like to use zeromq (draft api) 
version 4.2.5 under Ubuntu 18.04.


My minimal (not) working example can be found here: 
https://gist.github.com/StephanOpfer/5b9f3f76e6610536078cb9c16072aac9


Compiling it with this command:

    g++ Discovery.cpp -lzmq -DZMQ_BUILD_DRAFT_API=1 -o test

produces this:

    /tmp/ccUwelWs.o: In function `msg_send(zmq_msg_t*, void*, char 
const*, char const*)':
    Discovery.cpp:(.text+0x8e): undefined reference to 
`zmq_msg_set_group'
    /tmp/ccUwelWs.o: In function `msg_recv_cmp(zmq_msg_t*, void*, 
char const*, char const*)':

    Discovery.cpp:(.text+0x148): undefined reference to `zmq_msg_group'
    /tmp/ccUwelWs.o: In function `main':
    Discovery.cpp:(.text+0x30e): undefined reference to `zmq_leave'
    Discovery.cpp:(.text+0x37f): undefined reference to `zmq_join'
    Discovery.cpp:(.text+0x3c3): undefined reference to `zmq_join'
    Discovery.cpp:(.text+0x407): undefined reference to `zmq_join'
    Discovery.cpp:(.text+0x57c): undefined reference to `zmq_join'
    Discovery.cpp:(.text+0x668): undefined reference to `zmq_leave'
    collect2: error: ld returned 1 exit status

Any help is welcome. :)

Kind Regards

  Stephan


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org 
https://lists.zeromq.org/mailman/listinfo/zeromq-dev




___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Bill Torpey
Hi Stephan:

The RADIO/DISH sockets are considered DRAFT, which is probably why you’re 
getting these errors.

There are a couple of possibilities:

- You may be linking against a version of libzmq that doesn’t include the draft 
APIs.  In order to build with draft support, the build needs to specify 
"-DENABLE_DRAFTS=On” on the cmake command line.  Make sure your libzmq was 
built with support for the draft APIs.


- You also need to enable draft APIs in your code, similar to following:

#define ZMQ_BUILD_DRAFT_API
#include 

The #define makes the draft APIs visible to your code.

(Never mind — you’re already doing this on the compile command).

Hope this helps.

Bill

> On Sep 26, 2018, at 9:13 AM, Stephan again  wrote:
> 
> Hi,
> 
> I asked this question/issue one and a half year ago 
> (https://lists.zeromq.org/mailman/private/zeromq-dev/2017-January/031309.html).
>  The difference is that I now would like to use zeromq (draft api) version 
> 4.2.5 under Ubuntu 18.04.
> 
> My minimal (not) working example can be found here: 
> https://gist.github.com/StephanOpfer/5b9f3f76e6610536078cb9c16072aac9
> 
> Compiling it with this command:
> 
> g++ Discovery.cpp -lzmq -DZMQ_BUILD_DRAFT_API=1 -o test
> 
> produces this:
> 
> /tmp/ccUwelWs.o: In function `msg_send(zmq_msg_t*, void*, char const*, 
> char const*)':
> Discovery.cpp:(.text+0x8e): undefined reference to `zmq_msg_set_group'
> /tmp/ccUwelWs.o: In function `msg_recv_cmp(zmq_msg_t*, void*, char 
> const*, char const*)':
> Discovery.cpp:(.text+0x148): undefined reference to `zmq_msg_group'
> /tmp/ccUwelWs.o: In function `main':
> Discovery.cpp:(.text+0x30e): undefined reference to `zmq_leave'
> Discovery.cpp:(.text+0x37f): undefined reference to `zmq_join'
> Discovery.cpp:(.text+0x3c3): undefined reference to `zmq_join'
> Discovery.cpp:(.text+0x407): undefined reference to `zmq_join'
> Discovery.cpp:(.text+0x57c): undefined reference to `zmq_join'
> Discovery.cpp:(.text+0x668): undefined reference to `zmq_leave'
> collect2: error: ld returned 1 exit status
> 
> Any help is welcome. :)
> 
> Kind Regards
> 
>   Stephan
> 
> 
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev

___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] Revisited: Example for building against ZMQ with CMake + UDP Multicast Support

2018-09-26 Thread Stephan again

Hi,

I asked this question/issue one and a half year ago 
(https://lists.zeromq.org/mailman/private/zeromq-dev/2017-January/031309.html). 
The difference is that I now would like to use zeromq (draft api) 
version 4.2.5 under Ubuntu 18.04.


My minimal (not) working example can be found here: 
https://gist.github.com/StephanOpfer/5b9f3f76e6610536078cb9c16072aac9


Compiling it with this command:

    g++ Discovery.cpp -lzmq -DZMQ_BUILD_DRAFT_API=1 -o test

produces this:

    /tmp/ccUwelWs.o: In function `msg_send(zmq_msg_t*, void*, char 
const*, char const*)':

    Discovery.cpp:(.text+0x8e): undefined reference to `zmq_msg_set_group'
    /tmp/ccUwelWs.o: In function `msg_recv_cmp(zmq_msg_t*, void*, char 
const*, char const*)':

    Discovery.cpp:(.text+0x148): undefined reference to `zmq_msg_group'
    /tmp/ccUwelWs.o: In function `main':
    Discovery.cpp:(.text+0x30e): undefined reference to `zmq_leave'
    Discovery.cpp:(.text+0x37f): undefined reference to `zmq_join'
    Discovery.cpp:(.text+0x3c3): undefined reference to `zmq_join'
    Discovery.cpp:(.text+0x407): undefined reference to `zmq_join'
    Discovery.cpp:(.text+0x57c): undefined reference to `zmq_join'
    Discovery.cpp:(.text+0x668): undefined reference to `zmq_leave'
    collect2: error: ld returned 1 exit status

Any help is welcome. :)

Kind Regards

  Stephan


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] zmq_send() blocking on ZMQ_STREAM when client has disconnnected

2018-09-26 Thread Philippe Causse via zeromq-dev
Dear ZeroMQ community,

I am wondering if this behaviour is normal: zmq_send() is blocking on 
ZMQ_STREAM when client has disconnected.

I have a simple server using a ZMQ_STREAM socket  to serve plain TCP clients.

When a client disconnects, ZeroMQ effectively delivers a disconnection 
indication in the form of 2 frames :   [ peer-identity,  empty ].

Then, if I attempt to send some frames using this peer-identity, the call 
blocks  (unless ZMQ_DONTWAIT is given).
Shouldn’t it return EHOSTUNREACH instead, since the client has gone ?

If I send to a non-existing peer-identity  (for example, by altering a byte), 
the call returns immediately with EHOSTUNREACH.

But why does it block on a previously used identity, since the client 
connection doesn’t exist anymore ?
Doing “lsof”  on the process effectively shows that the socket is gone.  

Since the ZeroMQ socket is the receiver of the connection and not the 
initiator,  I don’t understand why this call should block.

Thank you for your help !

Cheers,
/phil.

smime.p7s
Description: S/MIME cryptographic signature
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev