Friday November 12, 2010

[Time] NameMessage
[01:09] mikko g'evening
[10:51] kobus Anybody else using MinGW when building 0mq?
[10:52] mikko that was hasted
[10:55] kobus I'm trying to build zeromq 2.0.10 on Windows with MinGW (gcc 4.4.0)
[10:57] kobus But I get an error ISO C++ does not support long long
[10:58] kobus If I write a test app that defines a variable as long long, it works, and the size is 8 bytes (from sizeof)
[10:58] kobus Any ideas?
[11:00] mikko kobus: can you show the build log?
[11:00] mikko or output
[11:00] mikko and do you compile your test app with same flags?
[11:01] kobus
[11:02] mikko kobus: compile your test program with -Werror -pedantic
[11:02] mikko hmm
[11:02] mikko can you test whether the same is present in github master?
[11:03] mikko
[11:05] kobus Sorry I'm not familiar with github, just trying to figure out how to get the code...
[11:05] mikko
[11:07] mikko probably
[11:08] mikko hmm
[11:08] mikko
[11:08] mikko it's this block
[11:08] mikko i assume __int64 is defined as long long
[11:13] kobus Sorry, I'm trying to build github master. Do I use the configure script from the other source?
[11:14] mikko you don't have autotools on win i guess?
[11:16] Everton Hi
[11:16] mikko hi
[11:17] Everton somo one could help me to install zmq in windows 7?
[11:17] mikko Everton: are you looking to use a specific binding?
[11:17] mikko or just the libraries themselves?
[11:17] Everton yes, mikko...
[11:18] Everton I am looking for java
[11:18] mikko the easiest way is to get visual studio express and build the binaries
[11:18] mikko i might have binaries somewhere
[11:19] Everton I downloaded the Visual C++ 2010
[11:19] mikko have you installed it?
[11:19] Everton but the problem was that I can not compile
[11:19] Everton I intalled the Visual
[11:20] mikko have you download zeromq2?
[11:20] Everton zeromq2??
[11:21] Everton The zmq that is in the first page?
[11:21] mikko
[11:21] mikko there are build instructions for windows as well
[11:22] Everton yes, I have download this already
[11:22] Everton and make the step-by-step to install on Windows
[11:23] mikko what seems to be the problem?
[11:24] Everton when I "build solucion" on Visual, it create to files in the folder lib: libzmq.dll and libzmq
[11:24] Everton so I deploy the to file on the folder c:/windows/system32
[11:25] Everton but how can I bind to java
[11:26] mikko
[11:26] kobus Mikko: I use MSYS, with the version 2.0.10 I ran ./configure and then make
[11:27] Everton it is just to Linux or to Windows too??
[11:27] Everton what is MSYS?
[11:28] kobus "a component of MinGW known as MSYS (Minimal SYStem) provides win32 ports of a lightweight Unix-like shell environment"
[11:28] Guthur Everton:
[11:29] mikko kobus: i'l check as soon as i get mingw build environment running
[11:29] kobus mikko: thanks, will try to get the githubcode to build
[11:31] Everton for what it is used?
[11:31] mikko kobus: you need to run
[11:32] Everton mikko, I need to run too?
[11:32] kobus mikko: error: could not find pkg-config. pkg-config is required to run
[11:32] kobus mikko: sorry, I feel very stupid today...
[11:32] Guthur Everton: You are using MS toolchain and don't need to follow the other conversation
[11:34] Everton So I just hava to open the the jzmq in the Visual and run "build solucion"?
[11:35] mikko Everton: there is build folder in jzmq
[11:35] mikko open it and build
[11:35] Everton I will try now...
[11:45] Everton what I have to do to use javac in windows?
[11:46] Everton I set the enviroment variable JAVA_HOME=C:\Program Files\Java\jdk1.6.0_23
[11:54] mikko kobus: how do i run under windows?
[12:00] kobus mikko: Sorry went for a coffee. I use the MSYS shell, so just as you would in Unix: ./
[12:03] kobus mikko: I use Qt SDK and Qt Creator as IDE, which uses MinGW. I can also use the MS compiler, but I try to use the same compiler on Linux and Windows
[12:12] mikko autogen just refuses to run on mingq
[12:12] mikko mingw*
[12:23] Everton Hi, I try to comile the jzmq
[12:24] Everton but it returns Error 1 error C1083: Cannot open include file: 'zmq.h': No such file or directory c:\users\everton\desktop\zeromq-jzmq-5a221a5\src\util.cpp 22 1 jzmq
[12:24] Everton could some one help me?
[12:24] mikko Everton: open solution preferences
[12:24] mikko there should be additional include paths
[12:24] mikko add the path to zmq.h (which is where you have zeromq2/includes'
[12:27] Everton where is solucion preferences?
[12:29] mikko
[12:39] Everton great...
[12:39] Everton now is appearing
[12:39] Everton that jni.h can not found
[12:39] Everton where is it?
[12:51] mikko jdk
[12:55] kobus mikko: where does the configure script in the released version of zeromq come from, was it generated on Linux?
[12:56] Everton thanks...
[12:57] Everton The new error, now is: Error 3 error LNK1104: cannot open file 'libzmq.lib' C:\Users\Everton\Desktop\zeromq-jzmq-5a221a5\builds\msvc\jzmq\LINK jzmq
[12:57] Everton I have this file (libzmq.lib)
[12:58] Everton in the folder windows\system32
[12:58] Everton but I don´t know where I indicade the path?
[12:58] mikko kobus: i reckon so
[13:00] kobus I hate Windows
[13:08] Everton sorry, in fact i have libzmq.dll and not .lib
[13:08] Everton where can I find the lib and where should I put this?
[13:16] mikko the lib should be under the zeromq2 directories
[13:16] mikko and you can add additional library paths
[13:16] mikko just like you added additional include paths
[13:19] Everton could be the dll? or need to be .lib??
[13:21] mikko needs lib
[13:22] Everton I download the lib or it is create when I compile the zmq2?
[13:25] mikko it is created when you compile
[13:25] mikko it should be in zeromq2\lib
[13:26] Everton where I include an .obj file?
[13:26] mikko sorry?
[13:26] Everton I think I do not compile the zmq2 right
[13:26] Everton so I do again and appear:
[13:27] Everton Error 3 error LNK2019: unresolved external symbol __imp__zmq_device referenced in function "void __cdecl zmq::device(int,void *,void *)" (?device@zmq@@YAXHPAX0@Z) C:\Users\Everton\Desktop\zeromq-2.0.10\builds\msvc\zmq_streamer\zmq_streamer.obj zmq_streamer
[13:27] Everton so I think I need to LINK zmq_streamer.obj, right?
[13:27] Guthur why can't the dll be used?
[13:28] Everton I don´t know...
[13:28] mikko Guthur: afaik in windows you use import libraries for linking
[13:28] mikko (.lib files)
[13:28] mikko but i am not an expert of that platform
[13:29] Guthur neither here, but I think the jzmq can use the dll
[13:29] Guthur I'm pretty sure I did when I built it
[13:29] mikko .dll is for the runtime
[13:29] mikko and .lib is for linking
[13:30] Guthur But you should be able to dynamicly link
[13:30] Guthur thats what dll is for
[13:30] Guthur dynamic link library
[13:31] mikko Linking to dynamic libraries is usually handled by linking to an import library when building or linking to create an executable file. The created executable then contains an import address table (IAT) by which all DLL function calls are referenced (each referenced DLL function contains its own entry in the IAT). At run-time, the IAT is filled with appropriate addresses that point directly to a function in the separately-loaded DLL.
[13:31] mikko that is from
[13:31] Everton however, where could I LINK the zmq_streamer.obj
[13:32] Guthur I'm not at home at he moment unfortunately, need my tools to check, hehe
[13:32] Everton hehe
[13:32] Everton alrigth
[13:32] Everton mikko, you know?
[13:32] mikko Everton: try cleaning the solution and rebuilding
[13:33] mikko the msvc templates should work out of the box
[13:33] Everton I have some Options here:Executable directories
[13:33] Everton Include directories
[13:33] Everton Reference directories
[13:33] mikko you shouldn't edit the options on the libzmq build
[13:33] mikko there should be no need to do that
[13:33] Everton Library directories
[13:34] Everton really?
[13:34] mikko yes
[13:34] Everton I already hava set the include directories
[13:34] mikko only on jzmq as that needs to know where libzmq is located in
[13:35] Everton but my zmq can´t compile
[13:36] mikko have you edited the zmq solution settings?
[13:36] Everton no
[13:36] Everton where?
[13:38] mikko where what?
[13:38] CIA-20 zeromq2: 03Marc Rossi 07maint * rf7123de 10/ (AUTHORS src/socket_base.cpp):
[13:38] CIA-20 zeromq2: Fix socket_t::recv() hang scenario where initial call to process_commands() eats signal
[13:38] CIA-20 zeromq2: Added block boolean var to second process_commands() invocation for blocking sockets
[13:38] CIA-20 zeromq2: instead of always using true. This prevents the process_commands() call from hanging
[13:38] CIA-20 zeromq2: when a message is received with an empty queue after the call to xrecv() but
[13:38] CIA-20 zeromq2: prior to the initial call to process_commands() invoked when ++ticks == inbound_poll_rate.
[13:38] CIA-20 zeromq2: Signed-off-by: Marc Rossi <> -
[13:38] Everton In 10 minutes I come back, my teachear needs to close the class, so I will go home... 10 minutes I come back
[13:39] mikko ok
[13:47] CIA-20 zeromq2: 03Marc Rossi 07master * rf7123de 10/ (AUTHORS src/socket_base.cpp):
[13:47] CIA-20 zeromq2: Fix socket_t::recv() hang scenario where initial call to process_commands() eats signal
[13:47] CIA-20 zeromq2: Added block boolean var to second process_commands() invocation for blocking sockets
[13:47] CIA-20 zeromq2: instead of always using true. This prevents the process_commands() call from hanging
[13:47] CIA-20 zeromq2: when a message is received with an empty queue after the call to xrecv() but
[13:47] CIA-20 zeromq2: prior to the initial call to process_commands() invoked when ++ticks == inbound_poll_rate.
[13:47] CIA-20 zeromq2: Signed-off-by: Marc Rossi <> -
[13:47] CIA-20 zeromq2: 03Martin Sustrik 07master * r8abe673 10/ (AUTHORS src/socket_base.cpp):
[13:47] CIA-20 zeromq2: Merge branch 'maint'
[13:47] CIA-20 zeromq2: * maint:
[13:47] CIA-20 zeromq2: Fix socket_t::recv() hang scenario where initial call to process_commands() eats signal
[13:47] CIA-20 zeromq2: Conflicts:
[13:47] CIA-20 zeromq2: src/socket_base.cpp -
[13:56] Everton Hi, I´m back
[13:56] Everton mikko, I download the link that you pass me...
[13:57] mikko Everton: which one of them?
[13:57] mikko the package for windows?
[13:58] Everton you pass to me the link:
[13:58] Everton
[13:58] Everton is this for windows?
[13:59] mikko Everton: i haven't passed that link to you
[13:59] mikko im quite positive
[14:00] Everton so ok...
[14:00] Everton and now?
[14:01] mikko just download the package, follow the instructions
[14:01] mikko didnt you get it built already?
[14:01] mikko i gotta go to a meeting, back in a whil
[14:01] mikko e
[14:03] sustrik hi mikko!
[14:03] Everton ok
[14:04] sustrik the patch you've sent, is it for maint or master?
[14:32] Everton Mikko, I compille the zmq2, without errors
[14:33] Everton but it doesn´t create the lib
[15:59] mikko sustrik: master
[16:01] mikko sustrik: found another issue
[16:08] sustrik mikko: what issue?
[16:09] mikko mingw32 builds
[16:09] mikko the issue is with __int64 offset = _lseeki64 (fd, write_buf_start_addr, SEEK_SET);
[16:10] mikko it seems
[16:10] mikko __int64 being defined as 'long long'
[16:10] mikko and C++ -pedantic -Werror complains about ISO C++ 1998 doesn't have long long type
[16:10] mikko and errors out
[16:10] Steve-o the "-Wno-long-long" issue again?
[16:10] mikko Steve-o: different one
[16:10] sustrik presumably
[16:10] Steve-o this has been on the list twice before
[16:10] mikko Steve-o: for mingw32 ?
[16:11] Steve-o pass, certainly something with int64
[16:11] sustrik what's the problem exactly?
[16:11] mikko yeah, on windows __int64 looks like to be 'long long'
[16:11] mikko sustrik:
[16:11] sustrik win being incompaible with ISO C++?
[16:11] mikko the problem is that
[16:11] Steve-o C++ 2003 doesn't support int64
[16:12] mikko with maint version
[16:12] Steve-o but all the compilers do
[16:12] mikko but the issue comes from -Werror -pedantic
[16:12] mikko as this causes a warning and fails the build
[16:13] Steve-o which is why ZMQ includes "-Wno-long-long" for PGM as I use int64 & uint64 everywhere
[16:13] mikko but isnt pgm compiled as C?
[16:13] Steve-o but you link with C++
[16:13] Steve-o as in pgm_socket.cpp, etc
[16:14] mikko but if it's extern C linkage does the long long issue still creep in?
[16:14] Steve-o data structures include long longs, such as timestamps
[16:15] sustrik i see
[16:16] sustrik so, given 0MQ uses -Wno-long-long option
[16:16] sustrik why do we see the error?
[16:16] Steve-o I think it's only for the PGM compile part, for the rest of the code it's not pulled in
[16:17] mikko sustrik: it uses it if PGM ext is enabled
[16:17] sustrik for the whole build?
[16:18] Steve-o Does this also happen with MinGw-w64? They are finally fixing a lot of these issues.
[16:18] sustrik looking at the pasted error, it has nothing to do with openpgm
[16:18] Steve-o LIBZMQ_EXTRA_CXXFLAGS="${LIBZMQ_EXTRA_CXXFLAGS} -Wno-long-long "
[16:18] sustrik it's in msg_store_t
[16:19] mikko Steve-o: mingw64 is not regarded in any way
[16:20] mikko i could take a couple of iterations on the autoconf stuff
[16:20] mikko i started already by splitting some stuff into macros
[16:20] Steve-o mikko: I'm following progress as they are definitely breaking stuff compared with MinGW32
[16:20] mikko
[16:20] mikko currently we do that
[16:21] sustrik so, the above problem looks IMO like this:
[16:21] sustrik the line in question uses __int64
[16:22] sustrik which in not a long long on MSVC
[16:22] sustrik rather an intrinsic type
[16:22] sustrik however, it looks like mingw just typedefs it to long long
[16:22] sustrik which causes the warning
[16:23] sustrik a question: do we have a POSIX-y stdint.h when compiling with MinGW?
[16:23] sustrik if so, we can use int64_t instead of __int64
[16:23] Steve-o is MinGW's stdint broken then?
[16:24] mikko we got stdint.hpp
[16:24] mikko let me run a build
[16:24] sustrik the line in question looks like this:
[16:24] mikko it should report during configure
[16:24] sustrik __int64 offset = _lseeki64 (fd, pos, SEEK_SET);
[16:24] sustrik which works ok with MSVC
[16:24] sustrik but not with mingw afaiu
[16:24] mikko but is MSVC pedantic?
[16:24] sustrik msvc doesn't have the notion of pedantic afaik
[16:25] Steve-o tends to be more pedantic in x64 mode
[16:25] sustrik in any case the problem exists only for mingw
[16:25] sustrik so maybe just chaning this line:
[16:25] sustrik #ifdef ZMQ_HAVE_WINDOWS
[16:25] sustrik __int64 offset = _lseeki64 (fd, pos, SEEK_SET);
[16:25] sustrik #else
[16:25] sustrik into:
[16:25] mikko possibly cygwin as well (?)
[16:26] sustrik #idfed _MSC_VER
[16:26] sustrik etc.
[16:26] sustrik would help
[16:26] sustrik no?
[16:27] Steve-o FYI it looks like MinGW-w64 actually fixes this problem,
[16:27] sustrik Steve-o: ack
[16:29] mikko should we check for "mingw" rather than "mingw32" ?
[16:31] Steve-o mingw32 is the old name many distros still use, it renamed for x64 support
[16:32] sustrik mikko, Steve-o: btw, what about the mikko's patch on the mailing list?
[16:32] sustrik should i apply it?
[16:32] Steve-o Isn't Mato still looking after autoconf?
[16:33] sustrik he should
[16:33] sustrik bet he's rather busy right now
[16:33] sustrik but
[16:33] Steve-o I was also wondering if ZMQ works on any platform without a c99 compiler
[16:33] Steve-o otherwise go for it
[16:34] sustrik no idea
[16:34] sustrik but it's unlikely imo
[16:34] mikko Steve-o: it's only for C compiler
[16:34] mikko which is used just for PGM
[16:34] mikko C++ compiler for rest of the zeromq
[16:34] Steve-o Would configure fail though if no c99 existed?
[16:34] sustrik right, i think it should be safe
[16:35] mikko Steve-o: let me check the macro
[16:35] sustrik if you are on very exotic platform it's not likely you'll be able to compile the whole thing anyway
[16:35] Steve-o :)
[16:36] mikko it might be possible to move AC_PROG_CC_C99 inside the PGM checks
[16:36] mikko i reckon it might be a bit cleaner to break down the build a bit
[16:37] mikko Steve-o: After calling this macro you can check whether the C compiler has been set to accept C99; if not, the shell variable ac_cv_prog_cc_c99 is set to ‘no’.
[16:38] Steve-o ok, no problem then
[16:38] mikko so additionally there should be a check inside PGM ext saying that things will fail due to lack of c99 compiler
[16:40] Steve-o ok, just tried to build a master snapshot with x86_64-w64-mingw32-g++ and it crapped out on ‘void zmq::swap_t::fill_buf(char*, int64_t)’, it is looking for C++ 98 not even 2003, odd.
[16:42] mikko which g++ does it ship with?
[16:42] Steve-o This is 4.4.1-1a, I think they're a bit ahead now
[16:42] mikko mine is 4.5.0
[16:43] Steve-o I think I was trying to match whatever GLib team were using
[16:44] mikko there seems to be just AC_PROG_CXX macro for autoconf
[16:46] Steve-o Ubuntu 10.10 ships with 4.4.4 I'm guessing as the w64 package is tagged with a repo number
[16:47] sustrik Steve-o, mikko: if you reach any conclusion about the patch, please let me know via the ML
[16:49] Everton mikko, are you there?
[16:49] Steve-o mikko: I would just add the -Wno-long-long to any MinGW compiler until they fix it.
[16:50] mikko Everton: yes
[16:50] mikko Steve-o: ok
[16:51] mikko Steve-o: are you ok with the patch on the ML?
[16:51] mikko that's a good start as we get builds to succeed
[16:51] mikko i'm refactoring the autoconf parts a bit to try to make it a bit clearer what affects what
[16:51] Steve-o Sure, go for it. ICC does attempt to mask as GCC as that has the wider code base
[16:52] Steve-o Nothing more retarded than adding a new compiler that is broken with all existing code
[16:53] Everton I can not make build until..
[16:53] Everton could you help me again?
[16:54] Everton in fact, I download again tha package for windows, and retry to build with Visual, in that time, it compile, but was not genereting the lib
[16:55] Steve-o Everton: errors?
[16:56] Everton no...
[16:56] Everton ========== Rebuild All: 8 succeeded, 0 failed, 0 skipped ==========
[16:56] Everton I recive this output
[16:57] Steve-o Are you looking in the lib/bin directory?
[16:59] Steve-o I found master a bit odd, libzmq.dll is built inside lib and you need to copy to bin to run the examples.
[16:59] Everton I was tring in the windows... where this folder stay?
[17:00] Everton I download the zipfile in the desktop
[17:01] Steve-o easiest way is to place libzmq.dll wherever your ZMQ executable resides
[17:02] Steve-o extract and build into c:\zeromq or something easy to manage
[17:02] Everton I will do that now...
[17:03] Everton one moment...
[17:10] Everton All rigth
[17:12] Everton I have extract and build in C:/zeromq-2.1.10
[17:12] Steve-o open up the solution, build, and you should see C:/zeromq-2.1.10/lib/libzmq.dll
[17:13] Everton all rigth
[17:13] Everton I see that
[17:14] Steve-o copy into C:/zeromq-2.1.10/bin if you want to run the examples in there
[17:16] Everton could I copy to c:/windows/system32?
[17:16] Everton to run in any where?
[17:19] Steve-o that should work, but you will have to manage versioning
[17:21] Everton ok....soh lets try the easy way first
[17:21] Steve-o I think you can use PATH as equivalent of LD_LIBRARY_PATH on Windows, so you could alternatively add C:/zeromq-2.1.10/lib to the system PATH instead
[17:21] Everton I copyed the dll to folder zeromq-2.1.10/bin
[17:21] Everton and now?
[17:22] Steve-o add C:/zeromq-2.1.10/bin to the PATH environment variable?
[17:24] Everton all rigth...
[17:27] Everton and now?
[17:28] Steve-o aside of a reboot, you can run zmq apps anywhere.
[17:28] Steve-o anything else you are looking to do?
[17:30] Everton well, I could run a project i java now?
[17:30] Everton because this is my objective..
[17:30] Steve-o so you are looking to build the java binding
[17:30] Steve-o ok
[17:31] Steve-o i'll have a look, honestly no idea though
[17:34] Everton you know where the libzmq.lib stay?
[17:34] Steve-o I guess you follow the instructions here,
[17:34] Steve-o there is no static library
[17:34] Steve-o only dynamic library
[17:35] Everton I folow, but to build this binding I need of this lib
[17:35] Everton :/
[17:35] Steve-o hence the java command ends looking like this: java -Djava.library.path=c:\zeromq-2.1.10\bin -classpath c:\zeromq-2.1.10\java;.
[17:36] Steve-o oh ok, this line, AdditionalDependencies="libzmq.lib"
[17:39] Everton where is this line?
[17:41] Steve-o in the jmq project file
[17:41] Steve-o i mean jzmq project file
[17:43] Everton wait...
[17:43] Steve-o Looks like you need help from Gonzalo, I have no idea how to build the binding.
[17:45] Everton Who is Gonzalo?
[17:46] Steve-o He's on the mailing list, it looks like he works on the Java binding
[17:46] Everton where is the folder of jmq project file
[17:46] Steve-o I'm looking here,
[17:47] Everton How could I talk with Gonzalo?
[17:48] Steve-o post on the mailing list and ask for help building the Java binding for ZeroMQ master on Windows
[17:48] Steve-o then anyone can help you out
[17:50] Everton what is the email of mailing list?
[17:51] Steve-o
[17:51] Steve-o you probably have to subscribe first in order to send,
[18:05] Everton thanks steve
[18:06] Everton any one know where libzmq.lib is? or have it to send me??
[18:18] janak Hello guys, I am having an issue with PUBSUB weather example. I modified this example a bit to send and receive messages continuously. I am using one publisher and multiple subscriber to run this test. Once publisher stops and comes back online after 3 - 4 minutes, the memory usage of the publisher keeps on increasing. I am using C language for this.
[18:20] Steve-o Everton: checking an old build from master I see libzmq.lib also in the lib directory, it should be sitting next to libzmq.dll
[18:25] Everton Are you saying to donload an old version?
[18:26] Steve-o I have an archive of an old build from master and it had the lib file in it, so you should have one together with the dll
[18:27] Steve-o Do you have extensions disabled in File Explorer?
[18:34] Guthur I think you should be able to change the additional dependencies in the linker options to a dll
[18:34] Guthur in jzmq project
[18:35] Guthur I'm just about to test it now
[18:35] Guthur waiting for slow C++ compilers...
[18:35] Everton Do you have extensions disabled in File Explorer?? I do not understand...
[18:36] Everton could you send me your archive?
[18:36] Guthur oh maybe not, sorry, ignore my previous
[18:36] Steve-o extensions like .lib and .dll are hidden by default in Windows, you need to reconfigure Explorer to show them
[18:36] Everton rsrsr
[18:36] Everton my is hidden
[18:36] Everton why? it is important?
[18:37] Steve-o unless by some magical circumstance it is hiding the .lib file you are looking for
[18:38] Guthur I don't think it is, because zeromq by default outputs a dll
[18:38] Guthur I'm not sure why jzmq is suddenly looking for a lib, I didn't have this trouble a month or so ago
[18:38] Everton yes,
[18:38] Steve-o but MSVC can create a shim .lib that loads the dll for you
[18:39] Everton I have the dll
[18:39] Steve-o it's not actually a static version of the zmq library, that was discussed on the list recently, not so straight forward
[18:39] Guthur Steve-o, Is this some special requirement of JNI?
[18:40] Steve-o normally you create a mini stub JNI library that interfaces your class/jar library with the real binary library
[18:41] Steve-o as in you cannot just interface with any library like you can with
[18:43] Guthur It kind reinforces my opinion that Windows is a crappy dev environment
[18:43] Guthur though it's probably not windows fault
[18:44] Steve-o it's Java, same issue on Unix
[18:46] Steve-o Everton: are you downloading the source zip from github?
[18:49] Everton yes
[18:49] Everton I download the a version of september now of jzmq qnd will try again
[18:51] cremes janak: did anyone answer your pub/sub question?
[18:51] Steve-o This is why iMatix have subcriptions for Windows binary packages, a lot of hoops to jump through :-)
[18:52] janak cremes: Nope I am still waiting for answer
[18:53] cremes janak: did you get the original, unmodified example to work properly?
[18:53] Everton I try and it does not work
[18:54] janak cremes: yes because publisher process ends after sending 1000 packets
[18:54] janak I only added while(1) around the sending component by publisher
[18:55] Everton I found a file on net libzmq.lib, so I downloaded and deploy in the folder c:/zeromq2.1.10/lib
[18:55] Everton so now I was reciving other error:
[18:55] cremes janak: please pastie/gist the publisher code you are running
[18:55] janak cremes: #include "zhelpers.h" int main () { // Prepare our context and publisher void *context = zmq_init (1); void *publisher = zmq_socket (context, ZMQ_PUB); zmq_bind (publisher, "tcp://*:5556"); zmq_bind (publisher, "ipc://weather.ipc"); // Initialize random number generator srandom ((unsigned) time (NULL)); while (1) { // Get values that will fool the boss int zipcode, temperature
[18:55] Everton Socket.obj
[18:55] cremes janak: use or
[18:56] cremes pasting into the channel is not a good idea
[18:56] janak cremes: #include "zhelpers.h" int main () { // Prepare our context and publisher void *context = zmq_init (1); void *publisher = zmq_socket (context, ZMQ_PUB); zmq_bind (publisher, "tcp://*:5556"); zmq_bind (publisher, "ipc://weather.ipc"); // Initialize random number generator srandom ((unsigned) time (NULL)); while (1) { // Get values that will fool the boss int zipcode, temperature
[18:56] cremes janak: don't do that; i can't read the code
[18:57] janak cremes:
[18:57] cremes use or
[18:57] janak sorry for that
[18:58] cremes janak: i just compared that code to what is in the guide; it's exactly the same
[18:59] janak it only has while(1) loop around the s_send
[18:59] janak thats all I added
[18:59] cremes ok
[19:01] janak cremes: I have to rush for meeting I should be back in 30 minutes. Please feel free to contact me at Thanks for your help
[19:02] Everton I have this obj, but it cant find
[19:03] cremes janak: for one, make sure you capture the return code from s_send and check for a non-zero value
[19:03] cremes it's possible it is failing but you are ignoring the error
[19:04] cremes also, it looks like the client exits after it receives 100 messages
[19:04] cremes if that's the case, then the PUB socket *should* drop the packets since there are no listeners
[19:04] janak yes I also modified client to accept it continuously
[19:04] cremes but it sounds like it is queueing them up in memory (up to HWM which is infinite by default)
[19:04] cremes ah, ok
[19:05] cremes so make sure the return codes are all non-zero for the send/recv operations
[19:05] janak
[19:05] cremes you might also want to modify the publisher to use a HWM (high water mark)
[19:06] janak one thing I dont understand is this only happens when I have multiple subscribers
[19:06] cremes odd... you should be able to connect dozens/hundreds/thousands of subscribers to the same publisher
[19:07] cremes when you have 1+ subscribers, do any of them receive any messages?
[19:07] janak yes initially when everything is running all of them do receive messages, when I stop publisher / wait for 2 - 3 minutes / start publisher only 1 of the subscriber gets the packets
[19:08] cremes oh oh oh... i see the problem
[19:08] cremes the publisher is "binding" to the endpoint while the subscribers "connect" to it
[19:08] cremes you can't shut down the publisher and then restart it and expect things to reconnect
[19:09] cremes whoever "binds" must be started *first*
[19:09] cremes if you need to have your publisher start/stop like this, put a FORWARDER device in the middle
[19:09] janak hmm interesting
[19:09] cremes does that make sense or did i just talk over your head?
[19:10] Everton some one have the file jzmq.dll??
[19:10] janak I think it went over :)
[19:10] cremes janak: ha, ok :)
[19:10] cremes let's try again
[19:10] janak in real production scenario what happens if publisher goes down for some reason and comes back online
[19:10] cremes the publisher *creates* the endpoint by binding to it; so the publisher OWNS that endpoint
[19:10] janak ok
[19:11] cremes if you shutdown the publisher, then the endpoint becomes invalid
[19:11] janak ok
[19:11] cremes restarting the publisher creates a *new* endpoint at the same location, but the subscribers are still connected to the old, invalid one
[19:11] cremes you would need to restart the subscribers
[19:11] cremes now, to answer your question about production, the fix is to use a FORWARDER device
[19:12] janak ok
[19:12] cremes the forwarder device binds (creates!) two endpoints that you can think of as incoming and outgoing
[19:12] cremes the publisher *connects* to the incoming endpoint while the subscribers *connect* to the outgoing endpoint
[19:13] cremes when you shutdown your publisher, the endpoint remains valid *because* the forwarder created it via bind
[19:13] janak do I get any error on subscriber s_recv call if publisher went down ?
[19:13] cremes janak: i don't think so
[19:13] cremes it will just block forever
[19:13] janak in that case how do I trigger the restart of subscriber based on publisher went down ?
[19:14] cremes janak: you do *not* need to restart the subscriber if you use a forwarder device
[19:14] cremes the endpoints will all remain valid because the forwarder created them and we are assuming it has stayed up
[19:16] cremes look up "forwarder" in the guide and read through its use-case
[19:16] janak ok .. is there a way to notify subscriber for publisher restart ?
[19:17] cremes janak: yes, via another set of sockets specific to that information flow
[19:18] janak ok .. that makes sense
[19:18] janak I thought that when I use PUBSUB socket if publisher restarts, all the subscriber will get notified and they will do reconnect
[19:19] cremes janak: where did you get that idea?
[19:19] janak but I guess I can implement that mechanism on a separate set of sockets
[19:22] janak cremes: this answers that why one of my subscriber is not getting the messages. But why did publisher keep these messages in memory, when publisher restarts and gets new endpoints, why does it keep the messages in queue for one of the subscriber ?
[19:24] cremes janak: read the section on PUB sockets here:
[19:24] cremes it doesn't start dropping packets until you hit the HWM
[19:24] cremes by default the HWM is infinite so it will use all available RAM
[19:24] cremes if you want it to drop packets sooner instead of queueing, set HWM to a lower value
[19:25] janak great thanks for your help cremes this helps me in understanding it much better thanks
[19:25] cremes you are welcome
[21:23] mikko hmm
[21:23] mikko Steve-o: do you know why flags passed to pgm build are called "LIBZMQ_EXTRA_CXXFLAGS"
[21:24] mikko shouldnt they go in CFLAGS rather than CXXFLAGS
[21:24] Steve-o no idea
[21:24] Steve-o I believe they are additional flags for building 0mq and not libpgm
[21:24] Steve-o i.e. the -Wno-long-long
[21:24] Steve-o I don't need it with c99
[21:25] Steve-o 0mq needs it to build with pgm
[21:25] mikko i added icc -strict-ansi flag
[21:25] mikko pgm doesn't build with it
[21:26] mikko
[21:26] Steve-o lol, why doesn't ICC like asm ?
[21:27] Steve-o I'm not sticking random underscores in front till it works
[21:28] Steve-o I know with GCC that std=c99 doesn't work you must use std=gnu99 because strict ANSI is too annoying
[21:28] mikko i assume it expects __asm__
[21:28] Steve-o that's retarded
[21:29] Steve-o Easier to use -Dasm=__asm__ to workaround that
[21:29] mikko
[21:31] Steve-o Microsoft likes underscores too much, that's nothing new
[21:31] Steve-o if you continue down that road you also see problems with volatile
[21:32] Steve-o when using the gcc compatibility flags does it like asm?
[21:32] mikko LIBZMQ_EXTRA_CXXFLAGS="${LIBZMQ_EXTRA_CXXFLAGS} -strict-ansi -Dasm=__asm__ "
[21:32] mikko this builds ok
[21:33] Steve-o does -gcc-version=420 change interpretation of "asm"?
[21:34] mikko i can check that in a min
[21:35] mikko hmm, i wonder what happens if i turn off gcc emulation on icc
[21:35] mikko i think by default it tries to be gcc compliant
[21:36] Steve-o the __asm__ is about being compatible with MSVC
[21:38] Steve-o anything with an underscore prefix is compiler specific
[21:38] Steve-o Ooh, __inline is the other one I hate
[21:40] Steve-o I catch that one in the headers, include/pgm/types.h
[21:50] mikko -gcc-version=420 doesnt help
[21:50] Steve-o oh well,
[21:51] Steve-o you have the workaround with the preprocessor
[21:51] mikko yep, adding that
[21:52] mikko ../foreign/openpgm/libpgm-5.0.91~dfsg/openpgm/pgm/net.c(84): warning #191: type qualifier is meaningless on cast type
[21:52] mikko a couple of warnings as well it seem
[21:52] mikko s
[21:52] Steve-o oodles of warnings, I have a list of exceptions in my build environment
[21:55] Steve-o here's my list from before,
[21:55] Steve-o including description of why I ignore them
[21:56] Steve-o two are bugs in the compiler as they are C++2003 warnings
[21:58] Steve-o shout if you think any are valid
[22:01] Steve-o the net.c(84) is for portability, at least one compiler needs it