gcc - collect2: error: ld terminated with signal 11 [Segmentation fault], core dumped -
i learning opengl using glfw, , didn't have great understanding of makefiles @ time. had opengl working, decided learn makefiles more. came after lot of websites, hours, , trial , error:
exename = "opengl demo" cc = gcc srcs = ../src/opengldemo.c objs = $(srcs: .c = .o) cflags = -wall -g -c libs = -l./libs -lglfw3 c:/windows/syswow64/opengl32.dll c:/windows/syswow64/glu32.dll all: opengldemo exe exe: $(objs) $(cc) $(objs) -o $(exename) $(libs) opengldemo: ../src/opengldemo.c $(cc) $(cflags) ../src/opengldemo.c clean: rm -f $(exename) rebuild: clean but, when compile, gives error when tries build executable:
collect2: error: ld terminated signal 11 [segmentation fault], core dumped makefile:11: recipe target 'exe' failed make: *** [exe] error 1 it build executable, computer says can't run it. tried searching internet, , found gcc bug reports including error. there stupid doing error. how fix error, , mean?
edit: full output:
make gcc -wall -g -c ../src/opengldemo.c gcc ../src/opengldemo.c -o "opengl demo" -l./libs -lglfw3 c:/windows/syswow64/opengl32.dll c:/windows/syswow64/glu32.dll cygwin warning: ms-dos style path detected: c:/windows/syswow64/opengl32.dll preferred posix equivalent is: /cygdrive/c/windows/syswow64/opengl32.dll cygwin environment variable option "nodosfilewarning" turns off warning. consult user's guide more details posix paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames collect2: error: ld terminated signal 11 [segmentation fault], core dumped makefile:11: recipe target 'exe' failed make: *** [exe] error 1
it means ld tool or 1 of dependencies has bug results in invalid memory access (segmentation fault) on operating system kills process sigsegv (signal 11). should not crash regardless of build setup.
you should file bug report ld linux distribution vendor or directly vendor of ld tool (usually gnu in case ld tool gnu binutils).
Comments
Post a Comment