Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 27 17:42
    L0PiTaL opened #1621
  • Sep 22 06:11
    waxwax0099 opened #1620
  • Sep 19 20:28
    JochenBaier opened #1619
  • Sep 16 18:39
    kiufta opened #1618
  • Sep 12 06:45
    HKGY opened #1088
  • Sep 08 20:25
    lakshminareshk closed #1615
  • Sep 08 11:58
    lakshminareshk opened #1615
  • Aug 28 10:08
    chuanqi723 closed #1614
  • Aug 28 04:07
    chuanqi723 opened #1614
  • Aug 28 04:04
    chuanqi723 closed #1612
  • Aug 22 08:21
    asuper0 opened #1613
  • Aug 20 16:12
    gdamore labeled #1081
  • Aug 20 16:10
    gdamore closed #1083
  • Aug 20 16:10

    gdamore on master

    fixes #1083 Missing a markdown … (compare)

  • Aug 20 16:06
    gdamore transferred #1086
  • Aug 20 16:06
    gdamore edited #1612
  • Aug 20 16:06
    chuanqi723 opened #1612
  • Aug 20 16:05
    gdamore closed #1082
  • Aug 20 16:05

    gdamore on master

    Fixed #1082 (#1085) (compare)

  • Aug 20 16:00

    gdamore on master

    Markup fix (compare)

Mikhail Kagalenko
@kagalenko-m-b
Hello, what is required to build nng on Windows 7?
gdamore
@gdamore:matrix.org
[m]
Visual Studio works. Otherwise its cmake and a compiler (eg clang) and either nmake or ninja (prefererred)
Oh wait. Windows 7.
That isnt really supported I think. It may work but I can’t test it and can’t promise anything older than Windows 8 works.
Mikhail Kagalenko
@kagalenko-m-b
mingw fails, complaining about missing sys/socket.h
gdamore
@gdamore:matrix.org
[m]
Yeah. You might need mingw64.
Even then i cannot promise it will work.
Windows 7 is LONG eol. I cannot support it. I can’t even get an image with it to test with.
Mikhail Kagalenko
@kagalenko-m-b
it is mingw64
"System is unknown to cmake, create:
Platform/MINGW64_NT-6.1-7601 to use this system, please post your config file on discourse.cmake.org so it can be added to cmake"
gdamore
@gdamore:matrix.org
[m]
Yeah. So likely too old system.
Cmake may have dropped support.
You can try building for windows 8. It might run on windows 7.
Mainstream support for Windows 7 ended 7 years ago. Extended support ended 2.5 years ago. Why in heavens name would you be developing new software for this OS?
Mikhail Kagalenko
@kagalenko-m-b
because it works and does not have spyware present in the current windows
gdamore
@gdamore:matrix.org
[m]
Windows 8 is hardly current. But Windows 7 is not getting security updates anymore so it will soon be a nice host to ransomwares and malware.
But anyway I am not in a position to help with Windows 7. I can’t get it for testing against even.
Mikhail Kagalenko
@kagalenko-m-b
OK, instead of using mingw/msys cmake, I installed cmake built for windows, and it created build files without complaints, msys seems to be building so far
Mikhail Kagalenko
@kagalenko-m-b
make test reports 96% percent passing,
The following tests FAILED:
32 - nng.sp.transport.ipc.ipc_test (Failed)
46 - nng.ipc (Exit code 0xc0000264
)
48 - nng.multistress (Exit code 0xc0000264
)
maybe it will be useful to somebody
so win7 build is mostly working
gdamore
@gdamore:matrix.org
[m]
Base mingw doesnt work. You need mingw64. Or just visual studio.
There are some critical APIs that mingw lacks that we depend on.
Basically vanilla mingw exposes APIs available in Windows XP but lacks stuff added in Vista and later. Really old stuff. Nobody should use mingw.
Mikhail Kagalenko
@kagalenko-m-b
Yes, I mean mingw64
Mikhail Kagalenko
@kagalenko-m-b
The second argument to nng_send(), void *data does not have const qualifier. Any reason for that?
gdamore
@gdamore:matrix.org
[m]
Yes. Because if you give it the NNG_ALLOC flag then it might free the memory.
nnzzll
@nnzzll
Hi Guys, I'm new to nanomsg and I have a question about its example: ./pipeline node0 ipc:///tmp/pipeline.ipc & node0=$! && sleep 1 what does the node0=$! mean here?
gdamore
@gdamore:matrix.org
[m]
$! expands to the process ID of the last backgrounded job.
So we background the job, collect it’s processed, and sleep a bit. We do this so we can kill it off later when the script is done. Otherwise the process would hang around forever.
Mikhail Kagalenko
@kagalenko-m-b

I would like to send a couple of buffers one after another through a pair of sockets.

Suppose I have a (largish) buffer with data, and want to send() it, but precede the data with some buffer containing a header, can it be done without allocating another large buffer, and copying first header, then data into it?

gdamore
@gdamore:matrix.org
[m]
If you use an nng_msg it has some preallocated space for a small header. So you can use nng_msg_insert for that.
If you are using the non msg versions then it is going to make a copy anyway.
Mikhail Kagalenko
@kagalenko-m-b
Seems like the ability to send a chain of buffers could be highly useful to many people. Some microcontrollers even implement this in hardware
Mikhail Kagalenko
@kagalenko-m-b
nng builds with mingw64 on Windows10, however, trying to link libnng.a produces lots of errors like "undefined reference to `__imp_nng_pair1_open" Yet all nng tests link and execute correctly
gdamore
@gdamore:matrix.org
[m]
That sounds like you are missing the define needed for static libs and the app is trying to link using the shared library version of the symbols. Windows is weird here.
NNG_STATIC_LIB, i think.
Mikhail Kagalenko
@kagalenko-m-b
Thanks I'm going to try
But C
but cmake reported -- Building static libs. ?
cmake -DNNG_STATIC_LIB=1 .. ; followed by ninja -v produces libnng.a in the build directory, as before, but trying to link it gives the same errors
gdamore
@gdamore:matrix.org
[m]
That define needs to be present in the compile of the consumer as well.
Mikhail Kagalenko
@kagalenko-m-b
Where is it?
There are no .def files in build directory or any subdirectories
Mikhail Kagalenko
@kagalenko-m-b
So tests are built succesfully without them
gdamore
@gdamore:matrix.org
[m]
You need to have that symbol defined in your make or cmake rules.
Mikhail Kagalenko
@kagalenko-m-b
That did it, many many thanks

README.md says "You will also need to define NN_STATIC_LIB in your compilation environment when building programs that use this library."

A typo? should be NNG_STATIC_LIB

I see how I misunderstood your replies, BTW
gdamore
@gdamore:matrix.org
[m]
Yeah that seems like a doc bug.