Closed kolbma closed 6 years ago
It works now for me...
I've uninstalled cygwin gcc. Installed mingw gcc. Reinstalled my rust toolchain.
It seems to be known that rust only works with mingw gcc.
gcc is now:
$ gcc -v
Using built-in specs.
COLLECT_GCC=C:\tools\mingw64\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/tools/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/5.3.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-5.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64 --with-gxx-include-dir=/mingw64/x86_64-w64-mingw32/include/c++ --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,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-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/mingw530/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64/opt/include -I/c/mingw530/prerequisites/x86_64-zlib-static/include -I/c/mingw530/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64/opt/include -I/c/mingw530/prerequisites/x86_64-zlib-static/include -I/c/mingw530/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64/opt/lib -L/c/mingw530/prerequisites/x86_64-zlib-static/lib -L/c/mingw530/prerequisites/x86_64-w64-mingw32-static/lib '
Thread model: posix
gcc version 5.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)
Hi,
I have the same problem with MSYS2/MinGW up to date ...
Information :
$ gcc -v
Utilisation des specs internes.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-msys/7.4.0/lto-wrapper.exe
Cible : x86_64-pc-msys
Configuré avec: /msys_scripts/gcc/src/gcc-7.4.0/configure --build=x86_64-pc-msys --prefix=/usr --libexecdir=/usr/lib --enable-bootstrap --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --with-arch=x86-64 --with-tune=generic --disable-multilib --enable-__cxa_atexit --with-dwarf2 --enable-languages=c,c++,fortran,lto --enable-graphite --enable-threads=posix --enable-libatomic --enable-libcilkrts --enable-libgomp --enable-libitm --enable-libquadmath --enable-libquadmath-support --disable-libssp --disable-win32-registry --disable-symvers --with-gnu-ld --with-gnu-as --disable-isl-version-check --enable-checking=release --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible
Modèle de thread: posix
gcc version 7.4.0 (GCC)
And the error :
= note: C:\Users\slany\Dev\SDK\msys64\home\slany\rs-ohara\target\debug\deps\libbrotli_sys-8a53417538ee2e4c.rlib(metablock.o): In function `BrotliBuildMetaBlock':
/home/slany/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-sys-0.3.2/brotli/enc/metablock.c:80: undefined reference to `__assert_func'
/home/slany/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-sys-0.3.2/brotli/enc/metablock.c:93: undefined reference to `__assert_func'
/home/slany/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-sys-0.3.2/brotli/enc/metablock.c:100: undefined reference to `__assert_func'
/home/slany/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-sys-0.3.2/brotli/enc/metablock.c:124: undefined reference to `__assert_func'
/home/slany/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-sys-0.3.2/brotli/enc/metablock.c:131: undefined reference to `__assert_func'
C:\Users\slany\Dev\SDK\msys64\home\slany\rs-ohara\target\debug\deps\libbrotli_sys-8a53417538ee2e4c.rlib(metablock.o):/home/slany/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-sys-0.3.2/brotli/enc/./metablock_inc.h:70: more undefined references to `__assert_func' follow
error: aborting due to previous error
does the version of gcc can be the cause ?
Hi,
I've installed actix-web crate which depends/uses brotli-sys. On the first compile run, I've missed that gcc is needed. So I installed it from cygwin.
Now brotli-sys seems to compile successful.
But on cargo build of my project there are
undefined references to __assert_func
. Might it be the -nostdlib flag? But don't know what to do...