VCV-Recorder icon indicating copy to clipboard operation
VCV-Recorder copied to clipboard

v2, Build error on Rack v2

Open jpnielsen opened this issue 3 years ago • 2 comments

On Windows 11, MSYS64 MinGW64 Building for VCV Rack Community Edition 2.git.219bbaf1 in plugins subdir.

make dep
...


C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: celt/.libs/bands.o: in function `memcpy':
C:/msys64/mingw64/x86_64-w64-mingw32/include/string.h:202: undefined reference to `__memcpy_chk'
collect2.exe: error: ld returned 1 exit status
make[4]: *** [Makefile:2155: celt/tests/test_unit_dft.exe] Error 1
make[4]: *** Waiting for unfinished jobs....
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: celt/.libs/bands.o: in function `memcpy':
C:/msys64/mingw64/x86_64-w64-mingw32/include/string.h:202: undefined reference to `__memcpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: silk/.libs/decode_core.o: in function `memcpy':
C:/msys64/mingw64/x86_64-w64-mingw32/include/string.h:202: undefined reference to `__memcpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: silk/.libs/PLC.o: in function `memcpy':
C:/msys64/mingw64/x86_64-w64-mingw32/include/string.h:202: undefined reference to `__memcpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: silk/float/.libs/encode_frame_FLP.o: in function `memcpy':
C:/msys64/mingw64/x86_64-w64-mingw32/include/string.h:202: undefined reference to `__memcpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/x86_64-w64-mingw32/include/string.h:202: undefined reference to `__memcpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: silk/float/.libs/encode_frame_FLP.o:C:/msys64/mingw64/x86_64-w64-mingw32/include/string.h:202: more undefined references to `__memcpy_chk' follow
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: silk/float/.libs/pitch_analysis_core_FLP.o: in function `memset':
C:/msys64/mingw64/x86_64-w64-mingw32/include/string.h:208: undefined reference to `__memset_chk'
collect2.exe: error: ld returned 1 exit status
make[4]: *** [Makefile:2128: libopus.la] Error 1
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: celt/.libs/bands.o: in function `memcpy':
C:/msys64/mingw64/x86_64-w64-mingw32/include/string.h:202: undefined reference to `__memcpy_chk'
collect2.exe: error: ld returned 1 exit status
make[4]: *** [Makefile:2173: celt/tests/test_unit_mathops.exe] Error 1
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: celt/.libs/bands.o: in function `memcpy':
C:/msys64/mingw64/x86_64-w64-mingw32/include/string.h:202: undefined reference to `__memcpy_chk'
collect2.exe: error: ld returned 1 exit status
make[4]: *** [Makefile:2179: celt/tests/test_unit_mdct.exe] Error 1
make[4]: Leaving directory '/home/jpn99/github/Rack2/Rack/plugins/VCV-Recorder/dep/opus-1.3.1'
make[3]: *** [Makefile:2646: install-recursive] Error 1
make[3]: Leaving directory '/home/jpn99/github/Rack2/Rack/plugins/VCV-Recorder/dep/opus-1.3.1'
make[2]: *** [Makefile:3202: install] Error 2
make[2]: Leaving directory '/home/jpn99/github/Rack2/Rack/plugins/VCV-Recorder/dep/opus-1.3.1'
make[1]: *** [Makefile:83: dep/lib/libopus.a] Error 2

jpnielsen avatar Oct 17 '21 19:10 jpnielsen

From what I could find, the fix for this is to add -lssp to the DEP_LDFLAGS in the VCV-Recorder's makefile.

With this change, the make dep was successful on my side, but the plugin itself won't build until the lastest Rack sources are pushed.

Source: Answer 2 at https://stackoverflow.com/questions/55246192/musl-gcc-undefined-reference-to-memcpy-chk

MarcBoule avatar Nov 14 '21 13:11 MarcBoule

Worked for me too.

ThePython10110 avatar Nov 25 '21 16:11 ThePython10110