Skip to content

collect2.exe: error: ld returned 1 exit status #319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
leeyuanzhang opened this issue Sep 5, 2018 · 8 comments
Closed

collect2.exe: error: ld returned 1 exit status #319

leeyuanzhang opened this issue Sep 5, 2018 · 8 comments

Comments

@leeyuanzhang
Copy link

github.com/andlabs/ui

Go get github.com/andlabs/ui
After trying to run, I get the following error

D:/Users/sammy Lee/Miniconda2/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find D:/Users/sammy: No such file or directory
D:/Users/sammy Lee/Miniconda2/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find Lee/Miniconda2/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o: No such file or directory
collect2.exe: error: ld returned 1 exit status
@PaluMacil
Copy link

PaluMacil commented Sep 5, 2018

Make sure you mention your environment when opening an issue. I see you're using Windows, and I can tell the version of mingw but not the version of Go and the way your gcc is configured.

On Go 1.11, current version of ui I built fine with gcc version 8.1.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) but couldn't build with the same version of gcc using sjsj exceptions on 64 bit. It looks like you're using 32 bit, so I tried with gcc version 8.1.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project) but then I realized I'd need to switch to 32 bit Go to test that (I think... I'm not terribly familiar with that). I also don't have gcc 5.3 installed.

@sheppe
Copy link

sheppe commented Oct 4, 2018

I'm getting this error on Windows 10 64-bit. Here's the gcc -v output:

Using built-in specs.
COLLECT_GCC=gcc
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)

@andlabs
Copy link
Owner

andlabs commented Oct 4, 2018

It appears MinGW does not like having spaces in its directory name.

@sheppe
Copy link

sheppe commented Oct 4, 2018

      It appears MinGW does not like having spaces in its directory name.

You're correct, which is why there are no spaces in its install path.

@andlabs
Copy link
Owner

andlabs commented Oct 5, 2018

@sheppe that is the problem in the original post. Your error is likely different; can you post it?

@sheppe
Copy link

sheppe commented Oct 5, 2018

c:/mypath/go/src/github.com/andlabs/ui/libui_windows_amd64.a(stddialogs.cpp.obj): In function msgbox': C:/projects/libui/windows/stddialogs.cpp:113: undefined reference to __imp_TaskDialog'
collect2.exe: error: ld returned 1 exit status

@andlabs
Copy link
Owner

andlabs commented Oct 5, 2018

@sheppe that's #279

@andlabs
Copy link
Owner

andlabs commented Jan 4, 2019

@SammyLee666 have you tried updating MinGW-w64? If so, and it still doesn't work, I suggest reporting that it doesn't like having its own files in a directory with spaces to them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants