[nanomsg] errno 34 when calling nn_socket()

  • From: Bruno Bigras <bigras.bruno@xxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Fri, 8 Nov 2013 11:58:48 -0500

Hi,

I started to get errno 34 (it's about floppy disks) when calling
nn_socket() from go-nanomsg with one of my projects. I was able to use
it in the past, I have an executable running right now that was
compiled on 2013-10-23.

I built nanomsg using VC 2012 express and :
cmake -G "Visual Studio 11 Win64" ..

I made a small C sample to reproduce the problem.

I'm on Windows 7 (64-bit).

C:\Users\bbigras>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/4.7.1/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../src/gcc-4.7.1/configure
--build=x86_64-w64-mingw32 --enable-targets=all
--enable-languages=c,c++,fortran,objc,obj-c++ --enable-libgomp -
enable-lto --enable-libstdcxx-debug
--enable-version-specific-runtime-libs --enable-fully-dynamic-string
--with-gnu-ld --disable-werror --disable-nls --disable
win32-registry --prefix=/mingw64tdm --with-local-prefix=/mingw64tdm
--with-pkgversion=tdm64-1
--with-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: win32
gcc version 4.7.1 (tdm64-1)


D:\Dev\c\testcallnano> gcc -I d:\nanomsg\src -m64 .\test.cpp
-Ld:\nanomsg\build\Release -lnanomsg
D:\Dev\c\testcallnano> ./a.exe
socket: 0
errno: 34

test.cpp
#include <errno.h>
#include <stdio.h>
#include <nn.h>

int main() {
    int socket;
    socket = nn_socket(1, 49);

    printf("socket: %d\n", socket);
    printf("errno: %d\n", errno);
}

I'm wondering if it's because I'm using mingw with nanomsg which was
built using msvc. I don't have this problem on Linux.

Any ideas?

Bruno

Other related posts: