when i run my code fyne package GUI in golang , i get this error in terminal:
C:\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1
C:\Users\AppData\Local\Temp\go-link-594045439\go.o: file not recognized: file format not recognized
collect2.exe: error: ld returned 1 exit status.
please can help me to solve this issue.
gcc -v
Using built-in specs.
COLLECT_GCC=C:\TDM-GCC-64\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/TDM-GCC-64/bin/../libexec/gcc/x86_64-w64-mingw32/5.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-5.1.0/configure --build=x86_64-w64-mingw32 --enable-targets=all --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-libgomp --enable-lto --enable-graphite --enable-cxx-flags=-DWINPTHREAD_STATIC --disable-build-with-cxx --disable-build-poststage1-with-cxx --enable-libstdcxx-debug --enable-threads=posix --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libstdcxx-threads --enable-libstdcxx-time --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: posix
gcc version 5.1.0 (tdm64-1)
I had the same problem and finally I solved it by installing an older version of gcc.
my go version is 1.19.4 and my gcc version is 12.2 when i had the problem, so i reinstall gcc 11.4, then I recompiled once and successfully solved this problem.
This most commonly occurs when you have build tools for different architectures, such as 64bit Go tools but 32bit C compiler. If you can’t solve this please add the details of your tools and how they were installed.
Related
I'm on a CentOS 7 Linux system where I don't have the root access. So I have to build gcc from source. I want to build gcc 11.2 with the jit support. I invoked
contrib/download_prerequisites for GMP, MPFR, MPC and ISL. Then from a build directory I configured gcc using
../gcc-11.2.0/configure --prefix=/some/path --enable-bootstrap --enable-shared \
--enable-host-shared --enable-threads=posix --enable-languages=c,c++,jit \
--disable-multilib
then I hit make.
It failed with ld errors asking me to recompile libisl.a, libmpc.a, libmpfr.a, libgmp.a with -fPIC. Right before these errors I saw lots of jit related outputs. I assume jit is behind all of this?
Then I tried adding CFLAGS=-fPIC to the above configure command as ../gcc-11.2.0/configure CFLAGS=-fPIC *rest_of_the_options_above*. The same ld errors were emitted.
I'm aware that those dependencies each has --with-pic option to their own configure. But I'm wondering if there is a way to have gcc invoke that for me? If not, does it mean that to build gcc with jit support, one has to build the four dependencies manually with --with-pic? Thanks.
I am building a custom kernel using Buildroot 2020.02.1 for a PC mounting a AMD GX-222GC SOC.
The default external toolchain is amd-2016.11-19 from CodeBench. Kernel built with that toolchain boots correctly.
Instead, if I build the same kernel, same configuration, with the toolchain automatically built by buildroot, the kernel doen not boot! Not even a kernel panic, machine just resets.
It is clear the problem is related to the toolchain.
These are the results of gcc -v
CodeBench:
$ output/host/usr/bin/x86_64-amd-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/media/AAA/tmp/buildroot_toolchain/output/host/opt/ext-toolchain/bin/x86_64-amd-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/media/AAA/tmp/buildroot_toolchain/output/host/opt/ext-toolchain/bin/../libexec/gcc/x86_64-amd-linux-gnu/6.2.0/lto-wrapper
Target: x86_64-amd-linux-gnu
Configured with: /scratch/jmyers/amd-lite/src/gcc-6-2016.11/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=x86_64-amd-linux-gnu --enable-threads --disable-libmudflap --disable-libstdcxx-pch --enable-extra-sgxxlite-multilibs --with-arch=btver2 --with-cpu=btver2 --with-gnu-as --with-gnu-ld --with-specs='-D__CS_SOURCERYGXX_MAJ__=2016 -D__CS_SOURCERYGXX_MIN__=11 -D__CS_SOURCERYGXX_REV__=19' --enable-languages=c,c++ --enable-shared --enable-lto --enable-symvers=gnu --enable-__cxa_atexit --with-glibc-version=2.24 --with-pkgversion='Sourcery CodeBench Lite 2016.11-19' --with-bugurl=https://sourcery.mentor.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/x86_64-amd-linux-gnu/libc --with-build-sysroot=/scratch/jmyers/amd-lite/install/opt/codesourcery/x86_64-amd-linux-gnu/libc --with-gmp=/scratch/jmyers/amd-lite/obj/pkg-2016.11-19-x86_64-amd-linux-gnu/amd-2016.11-19-x86_64-amd-linux-gnu.extras/host-libs-i686-pc-linux-gnu/usr --with-mpfr=/scratch/jmyers/amd-lite/obj/pkg-2016.11-19-x86_64-amd-linux-gnu/amd-2016.11-19-x86_64-amd-linux-gnu.extras/host-libs-i686-pc-linux-gnu/usr --with-mpc=/scratch/jmyers/amd-lite/obj/pkg-2016.11-19-x86_64-amd-linux-gnu/amd-2016.11-19-x86_64-amd-linux-gnu.extras/host-libs-i686-pc-linux-gnu/usr --with-isl=/scratch/jmyers/amd-lite/obj/pkg-2016.11-19-x86_64-amd-linux-gnu/amd-2016.11-19-x86_64-amd-linux-gnu.extras/host-libs-i686-pc-linux-gnu/usr --enable-libgomp --enable-libitm --enable-libatomic --disable-libssp --disable-libcc1 --enable-poison-system-directories --with-python-dir=x86_64-amd-linux-gnu/share/gdb/python --with-build-time-tools=/scratch/jmyers/amd-lite/install/opt/codesourcery/x86_64-amd-linux-gnu/bin --with-build-time-tools=/scratch/jmyers/amd-lite/install/opt/codesourcery/x86_64-amd-linux-gnu/bin SED=sed
Thread model: posix
gcc version 6.2.0 (Sourcery CodeBench Lite 2016.11-19)
Buildroot:
Using built-in specs.
COLLECT_GCC=/media/AAA/tmp/buildroot_toolchain/output/host/opt/ext-toolchain/bin/x86_64-linux-gcc.br_real
COLLECT_LTO_WRAPPER=/media/AAA/tmp/buildroot_toolchain/output/host/opt/ext-toolchain/bin/../libexec/gcc/x86_64-buildroot-linux-gnu/7.5.0/lto-wrapper
Target: x86_64-buildroot-linux-gnu
Configured with: ./configure --prefix=/media/AAA/tmp/buildroot_toolchain/output/host --sysconfdir=/media/AAA/tmp/buildroot_toolchain/output/host/etc --enable-static --target=x86_64-buildroot-linux-gnu --with-sysroot=/media/AAA/tmp/buildroot_toolchain/output/host/x86_64-buildroot-linux-gnu/sysroot --enable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --disable-decimal-float --with-gmp=/media/AAA/tmp/buildroot_toolchain/output/host --with-mpc=/media/AAA/tmp/buildroot_toolchain/output/host --with-mpfr=/media/AAA/tmp/buildroot_toolchain/output/host --with-pkgversion='Buildroot 2020.02.1-00007-g345f377da1-dirty' --with-bugurl=http://bugs.buildroot.net/ --enable-libquadmath --enable-tls --enable-threads --without-isl --without-cloog --with-arch=btver2 --enable-languages=c,c++ --with-build-time-tools=/media/AAA/tmp/buildroot_toolchain/output/host/x86_64-buildroot-linux-gnu/bin --enable-shared --disable-libgomp
Thread model: posix
gcc version 7.5.0 (Buildroot 2020.02.1-00007-g345f377da1-dirty)
Do you see some options that might be required for gcc and buildroot toolchain is missing?
Thanks in advance.
PS: I even tried gcc 8 without resolving.
The early 4.4.x kernels do not boot when built with binutils >= 2.31. This was fixed in commit https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=073bb7ddd35ca8f17a170258dacbe384935a43c8 in the 4.4.x stable branch, which was merged in 4.4.124. So any 4.4.x earlier than that, when built with binutils >= 2.31, will not boot.
I run virualized Windows 7 x64. Installation of System.Win32.Com package fails. How to cope the problem?
> cabal install com
Resolving dependencies...
Configuring com-1.2.3.1...
cabal: Bad header file: include/comPrim.h
The header file contains a compile error. You can re-run configure with the
verbosity flag -v3 to see the error messages from the C compiler.
Failed to install com-1.2.3.1
cabal: Error: some packages failed to install:
com-1.2.3.1 failed during the configure step. The exception was:
ExitFailure 1
Running with -v3 option gives errors like these:
In file included from C:\Users\Leo\AppData\Local\Temp\282536868.c:3:0:
./include/comPrim.h:123:1: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'OleInitialize'
OleInitialize ( void* pvReserved );
^
./include/comPrim.h:128:1: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'OleUninitialize'
OleUninitialize ();
^
...
Moreover -v3 option says that some packages cannot be found. Could it be the reason? I list only several of them.
Searching for ghcjs-pkg in path.
Cannot find ghcjs-pkg on the path
Searching for greencard in path.
Cannot find greencard on the path
cabal even doesn't know about some of them (for example hmake).
Update on compiler
GCC version output:
> gcc -v
Using built-in specs.
COLLECT_GCC=C:\Program Files\Haskell Platform\7.10.3\mingw\bin/realgcc.exe
COLLECT_LTO_WRAPPER=C:/Program\ Files/Haskell\ Platform/7.10.3/mingw/bin/../lib/gcc/x86_64-w64-mingw32/5.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-5.2.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --with-gxx-include-dir=/mingw64/include/c++/5.2.0 --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev3, Built by MSYS2 project' --with-bugurl=http://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 5.2.0 (Rev3, Built by MSYS2 project)
You are building with an incompatible C compiler, e.g the x86_64-w64-mingw32 toolchain
that is installed with MinGHC installer for GHC 7.10.2 (64-bit).
It will produce the errors you are seeing. The mingw32 that is installed with MinGHC installer for GHC 7.10.2 (32-bit)
will not produce them.
Building the package with 32-bit GCC will mean that you can build it on 64 or 32 bit Windows and
it will execute on 64 or 32 bit Windows, but you cannot link 32-bit with 64-bit package libraries together.
That may be academic, however, as building this package (cabal install com) using the 32-bit
compiler just gets you as far as a later ghc compilation error:
[ 2 of 21] Compiling System.Win32.Com.HDirect.Pointer ( System\Win32\Com\HDirect\Pointer.hs, dist\build\System\Win32\Com\HDirect\Pointer.o )
*** Parser:
*** Renamer/typechecker:
System\Win32\Com\HDirect\Pointer.hs:102:20: Not in scope: `catch'
This after a variety of warnings for deprecated commandline options e.g.
on the commandline: Warning:
-fglasgow-exts is deprecated: Use individual extensions instead
on the commandline: Warning:
The -fvia-C flag does nothing; it will be removed in a future GHC release
and preprocessor directives, e.g.
System\Win32\Com.hs:1:12: Warning:
-#include and INCLUDE pragmas are deprecated: They no longer have any effect
This package appears to have been ill-maintained.
I would like to install bazel from source, and use bazel to compile tensorflow on a cluster running redhat 6.7. When I try to install bazel, the glibc version (2.12) is too old. I do not have root access to the cluster. Is it possible to install tensorflow in this case?
My system information:
-bash-4.1$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.7 (Santiago)
-bash-4.1$ which gcc
/usr/bin/gcc
-bash-4.1$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)
-bash-4.1$ ldd --version
ldd (GNU libc) 2.12
The system has newer gcc installed as well. I tried using it, bazel still won't compile.
-bash-4.1$ /usr/local/gcc/4.8.4/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc/4.8.4/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc/4.8.4/libexec/gcc/x86_64-unknown-linux-gnu/4.8.4/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/usr/local/gcc/4.8.4
Thread model: posix
gcc version 4.8.4 (GCC)
When I was compiling bazel, I got the following error:
bazel-0.1.1/_bin/build-runfiles: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found
Some people also reported this issue:
https://github.com/tensorflow/tensorflow/issues/110
and https://github.com/tensorflow/tensorflow/issues/527
How can I install the missing dependency locally, and have bazel pick up the right library?
You should be able to compile from source with a newer version of Bazel exporting LD_FLAGS, CXX and CC, and tweaking the tools/cpp/CROSSTOOL file of Bazel. Please open a github issue on Bazel (https://github.com/bazelbuild/bazel/issues) if you have further questions.
I am currently working on making all that easier. Sorry for the mess.
In case anyone need to do this manually:
Compile up-to-date glibc, gcc and all their dependencies from source with the option --disable-rpath to avoid glibc path being hard coded to system default. Do NOT add glibc to LD_LIBRARY_PATH directly, or all executables including rm will stop working.
Compile python with your gcc, install pip and the official wheel
./configure --prefix=$PWD/build --enable-unicode=ucs4 --with-cxx-main=g++ && make && make install
Start python with the following command to load the correct glibc, where ${GLIBC_PATH} is your install location to glibc, make an alias
alias tensorflow='${GLIBC_PATH}/lib/ld-2.23.so --library-path ${GLIBC_PATH}/lib:${LD_LIBRARY_PATH}which python'
Import tensorflow to check no error occur
After able to import tensorflow module without any error, you can use any other computer (possibly ubuntu VM on your PC) to compile a custom wheel with machine specific option, and copy that to your cluster following the guide
bazel build -c opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-mfpmath=both --copt=-msse4.2 --copt=-msse4.1 //tensorflow/tools/pip_package:build_pip_package
I have a setup with Windows 7, MSYS2, Mingw-w64-x86_64 gcc toolchain, CMake, and I am trying to build the nanomsg library.
Here is what I obtain :
$ cmake --debug-trycompile
-DCMAKE_TOOLCHAIN_FILE=../toolchain_i686-pc-mingw32.cmake -DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32 -G "MinGW Makefiles" ../nanomsg
debug trycompile on
-- The C compiler identification is GNU 4.8.2
-- Check for working C compiler: C:/mingw64/bin/x86_64-w64-mingw32-gcc.exe
-- Check for working C compiler: C:/mingw64/bin/x86_64-w64-mingw32-gcc.exe -- broken CMake Error at
C:/cmake-win32-x86/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61
(message): The C compiler
"C:/mingw64/bin/x86_64-w64-mingw32-gcc.exe" is not able to compile a
simple test program.
It fails with the following output:
Change Dir:
C:/msys64/home/Laurent/Dev/nanomsg-build/CMakeFiles/CMakeTmp
Run Build Command:C:/mingw64/bin/mingw32-make.exe
"cmTryCompileExec910276652/fast"
C:/mingw64/bin/mingw32-make.exe -f
CMakeFiles\cmTryCompileExec910276652.dir\build.make
CMakeFiles/cmTryCompileExec910276652.dir/build
mingw32-make.exe1: Entering directory
'C:/msys64/home/Laurent/Dev/nanomsg-build/CMakeFiles/CMakeTmp'
C:\cmake-win32-x86\bin\cmake.exe -E cmake_progress_report
C:\msys64\home\Laurent\Dev\nanomsg-build\CMakeFiles\CMakeTmp\CMakeFiles
1
Building C object
CMakeFiles/cmTryCompileExec910276652.dir/testCCompiler.c.obj
C:\mingw64\bin\x86_64-w64-mingw32-gcc.exe -o
CMakeFiles\cmTryCompileExec910276652.dir\testCCompiler.c.obj -c
C:\msys64\home\Laurent\Dev\nanomsg-build\CMakeFiles\CMakeTmp\testCCompiler.c
Linking C executable cmTryCompileExec910276652.exe
C:\cmake-win32-x86\bin\cmake.exe -E cmake_link_script
CMakeFiles\cmTryCompileExec910276652.dir\link.txt --verbose=1
C:\cmake-win32-x86\bin\cmake.exe -E remove -f
CMakeFiles\cmTryCompileExec910276652.dir/objects.a
x86_64-w64-mingw32-gcc-ar cr
CMakeFiles\cmTryCompileExec910276652.dir/objects.a
#CMakeFiles\cmTryCompileExec910276652.dir\objects1.rsp
sorry - this program has been built without plugin support
CMakeFiles\cmTryCompileExec910276652.dir\build.make:91: recipe for
target 'cmTryCompileExec910276652.exe' failed
mingw32-make.exe1: * [cmTryCompileExec910276652.exe] Error 1
mingw32-make.exe1: Leaving directory
'C:/msys64/home/Laurent/Dev/nanomsg-build/CMakeFiles/CMakeTmp'
Makefile:116: recipe for target 'cmTryCompileExec910276652/fast'
failed
mingw32-make.exe: * [cmTryCompileExec910276652/fast] Error 2
CMake will not be able to correctly generate this project. Call
Stack (most recent call first): CMakeLists.txt:29 (project)
Here is my toolchain file:
$ cat ../toolchain_i686-pc-mingw32.cmake
# http://www.cmake.org/Wiki/CMake_Cross_Compiling#The_toolchain_file
# http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?t=8959
# http://stackoverflow.com/questions/19754316/cross-compiling-opencv-with-mingw-using-cmakein-linux-for-windows
# this one is important
SET(CMAKE_SYSTEM_NAME Windows)
#this one not so much
#SET(CMAKE_SYSTEM_VERSION 1)
# specify the cross compiler
SET(PREFIX x86_64-w64-mingw32)
SET(CMAKE_MAKE_PROGRAM mingw32-make)
SET(CMAKE_C_COMPILER ${PREFIX}-gcc)
SET(CMAKE_CXX_COMPILER ${PREFIX}-g++)
SET(CMAKE_AR ${PREFIX}-gcc-ar)
SET(CMAKE_NM ${PREFIX}-gcc-nm)
SET(CMAKE_RC_COMPILER windres)
# specify the cross linker
SET(CMAKE_RANLIB ${PREFIX}-gcc-ranlib)
# where is the target environment
SET(CMAKE_FIND_ROOT_PATH /opt/mingw64 /usr/${PREFIX})
# search for programs in the build host directories
#SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
#SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
#SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
It looks like it fails to build on an auto test because the toolchain misses plugin support.
Here is my gcc version and options:
$ /opt/mingw64/bin/x86_64-w64-mingw32-gcc.exe -v
Using built-in specs.
COLLECT_GCC=C:\mingw64\bin\x86_64-w64-mingw32-gcc.exe
COLLECT_LTO_WRAPPER=C:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/4.8.2/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-4.8.2/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw482/x86_64-482-posix-seh-rt_v3-rev3/mingw64 --with-gxx-include-dir=/mingw64/x86_64-w64-mingw32/include/c++ --enable-shared --enable-static --disable-multilib --enable-languages=ada,c,c++,fortran,objc,obj-c++,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-isl-version-check --disable-cloog-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw482/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw482/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw482/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw482/prerequisites/x86_64-w64-mingw32-static --with-cloog=/c/mingw482/prerequisites/x86_64-w64-mingw32-static --enable-cloog-backend=isl --with-pkgversion='x86_64-posix-seh-rev3, Built by MinGW-W64 project' --with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/c/mingw482/x86_64-482-posix-seh-rt_v3-rev3/mingw64/opt/include -I/c/mingw482/prerequisites/x86_64-zlib-static/include -I/c/mingw482/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/c/mingw482/x86_64-482-posix-seh-rt_v3-rev3/mingw64/opt/include -I/c/mingw482/prerequisites/x86_64-zlib-static/include -I/c/mingw482/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/c/mingw482/x86_64-482-posix-seh-rt_v3-rev3/mingw64/opt/lib -L/c/mingw482/prerequisites/x86_64-zlib-static/lib -L/c/mingw482/prerequisites/x86_64-w64-mingw32-static/lib '
Thread model: posix
gcc version 4.8.2 (x86_64-posix-seh-rev3, Built by MinGW-W64 project)
Is it related to the "--enable-plugin" option (missing in my gcc) ?
Is there somewhere a toolchain build available with this option set ? I looked for it in MSYS2, Mingw-w64, rubenvb repositories, but it is not there. Or shall I build it myself ?
Possibly nanomsg does not need it ? Does the autotest requires it because nanomsg needs it ? Or can I prevent this autotest from being run ? Or can I set something to avoid the need of the "--enable-plugins" option ?
I think you are using the MSYS2 shell here, and not MSYS2 itself. If you were using an up to date MSYS2 then you'd be using the following mingw-w64 x86_64 GCC:
$ pacman -Ss mingw-w64-x86_64-gcc
mingw64/mingw-w64-x86_64-gcc 4.9.1-6
$ PATH=/mingw64/bin:$PATH gcc -v
Configured with: ... --enable-lto ...
--enable-lto implies --enable-plugins which is the default now and so doesn't appear in the list.
To build nanomsg with MSYS2, install https://master-dl.sourceforge.net/project/msys2/Base/x86_64/msys2-x86_64-20141003.exe, untick "Run MSYS2 shell now" (you want a mingw-w64 shell instead). Run the mingw-w64 shell (Start->MSYS2 64Bit->MinGW-w64 Win64 Shell). From within that shell:
$ pacman -S git make mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc
$ git clone https://github.com/nanomsg/nanomsg.git
$ mkdir nanomsg-build
$ cd nanomsg-build
$ cmake --debug-trycompile -DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32 -G "MSYS Makefiles" ../nanomsg
$ make install
But if you are a developer, we'd appreciate the contribution of a PKGBUILD for nanomsg