|
From: Greg J. <gv...@gm...> - 2015-09-21 00:17:46
|
Hi all, I have some interesting issues with building that may be related to bash or some other msys aspect. I get an error while running make with a file that leads to a gcc or g++ execution, where the -rpath options will include multiple locations, directories delimited by : but also designated in native format, so :D:/mingw/msys32 will appear. Here is a demonstration of the issue and a (false?) explanation of the problem: > $ make > > C:/msys64/mingw32/bin/g++.exe qt_example.cpp qt_PlotWindow.cpp >> moc_qt_PlotWindow.cpp -o qt_example.exe *-Wl,-rpath >> -Wl,"D:/bld/testing/m32c/bldall/shared/noninteractive/install_tree/lib:D:/bld/testing/m32c/bldall/shared/noninteractive/install_tree/lib:D:/bld/testing/m32c/bldall/shared/noninteractive/install_tree/lib/plplot5.11.1/drivers"* >> -ID:/bld/testing/m32c/bldall/shared/noninteractive/install_tree/include/plplot >> -IC:/msys64/mingw32/include/qt4 -IC:/msys64/mingw32/include/qt4/QtSvg >> -IC:/msys64/mingw32/include/qt4/QtGui >> -IC:/msys64/mingw32/include/qt4/QtCore >> -ID:/bld/testing/m32c/bldall/shared/noninteractive/install_tree/include/plplot >> -LD:/bld/testing/m32c/bldall/shared/noninteractive/install_tree/lib >> -LC:/msys64/mingw32/lib >> -LD:/bld/testing/m32c/bldall/shared/noninteractive/install_tree/lib >> -LC:/msys64/mingw32/lib -LC:/msys64/mingw32/lib/gcc/i686-w64-mingw32/5.2.0 >> -LC:/msys64/mingw32/i686-w64-mingw32/lib -lplplotqt -lplplot -lQtSvg4 >> -lQtGui4 -lQtCore4 -lplplot -lshp.dll -lfreetype.dll -lcsirocsa -lcsironn >> -lqhull -lqsastime -lstdc++.dll -lmingw32 -lmoldname -lmingwex -lmsvcrt >> -lpthread.dll -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lmoldname >> -lmingwex -lmsvcrt >> -ID:/bld/testing/m32c/bldall/shared/noninteractive/install_tree/include/plplot >> -LD:/bld/testing/m32c/bldall/shared/noninteractive/install_tree/lib >> -LC:/msys64/mingw32/lib -LC:/msys64/mingw32/lib/gcc/i686-w64-mingw32/5.2.0 >> -LC:/msys64/mingw32/i686-w64-mingw32/lib -lplplot -lshp.dll -lfreetype.dll >> -lcsirocsa -lcsironn -lqhull -lqsastime -lstdc++.dll -lmingw32 -lmoldname >> -lmingwex -lmsvcrt -lpthread.dll -ladvapi32 -lshell32 -luser32 -lkernel32 >> -lmingw32 -lmoldname -lmingwex -lmsvcrt > > > C:/msys64/usr/bin/bash: C:/msys64/mingw32/bin/g++.exe: Bad address > > Makefile:100: recipe for target 'qt_example.exe' failed > > > I've bolded the seemingly offensive "Bad address" generator. Taking direct lines from the Makefile, it comes this way because the command issued is > >> $(CXX) qt_example.cpp qt_PlotWindow.cpp moc_qt_PlotWindow.cpp -o $@ >> $(qt_RPATHCMD) $(shell $(PKG_CONFIG_ENV) pkg-config --cflags --libs >> plplot-qt) $(shell $(PKG_CONFIG_ENV) pkg-config --cflags --libs plplot) > > > where > qt_RPATHCMD = -Wl,-rpath > -Wl,"D:/bld/testing/m32c/bldall/shared/noninteractive/install_tree/lib:D:/bld/testing/m32c/bldall/shared/noninteractive/install_tree/lib:D:/bld/testing/m32c/bldall/shared/noninteractive/install_tree/lib/plplot5.11.1/drivers" ========== So maybe gcc is just confused because we have "D:/<path1:D:/path2 etc. plausible, and seemingly verified by the following: $ cat Makefile | sed 's/D\:/\/D/g' > tstmake > greg@Homerw7 MINGW32 > /t32/bldall/shared/noninteractive/install_tree/share/plplot5.11.1/examples/c++ $ make -f tstmake C:/msys64/mingw32/bin/g++.exe qt_example.cpp qt_PlotWindow.cpp > moc_qt_PlotWindow.cpp -o qt_example.exe *-Wl,-rpath > -Wl,"/D/bld/testing/m32c/bldall/shared/noninteractive/install_tree/lib:/D/bld/testing/m32c/bldall/shared/noninteractive/install_tree/lib:/D/bld/testing/m32c/bldall/shared/noninteractive/install_tree/lib/plplot5.11.1/drivers"* > -ID:/bld/testing/m32c/bldall/shared/noninteractive/install_tree/include/plplot > -IC:/msys64/mingw32/include/qt4 -IC:/msys64/mingw32/include/qt4/QtSvg > -IC:/msys64/mingw32/include/qt4/QtGui > -IC:/msys64/mingw32/include/qt4/QtCore > -ID:/bld/testing/m32c/bldall/shared/noninteractive/install_tree/include/plplot > -LD:/bld/testing/m32c/bldall/shared/noninteractive/install_tree/lib > -LC:/msys64/mingw32/lib > -LD:/bld/testing/m32c/bldall/shared/noninteractive/install_tree/lib > -LC:/msys64/mingw32/lib -LC:/msys64/mingw32/lib/gcc/i686-w64-mingw32/5.2.0 > -LC:/msys64/mingw32/i686-w64-mingw32/lib -lplplotqt -lplplot -lQtSvg4 > -lQtGui4 -lQtCore4 -lplplot -lshp.dll -lfreetype.dll -lcsirocsa -lcsironn > -lqhull -lqsastime -lstdc++.dll -lmingw32 -lmoldname -lmingwex -lmsvcrt > -lpthread.dll -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lmoldname > -lmingwex -lmsvcrt > -ID:/bld/testing/m32c/bldall/shared/noninteractive/install_tree/include/plplot > -LD:/bld/testing/m32c/bldall/shared/noninteractive/install_tree/lib > -LC:/msys64/mingw32/lib -LC:/msys64/mingw32/lib/gcc/i686-w64-mingw32/5.2.0 > -LC:/msys64/mingw32/i686-w64-mingw32/lib -lplplot -lshp.dll -lfreetype.dll > -lcsirocsa -lcsironn -lqhull -lqsastime -lstdc++.dll -lmingw32 -lmoldname > -lmingwex -lmsvcrt -lpthread.dll -ladvapi32 -lshell32 -luser32 -lkernel32 > -lmingw32 -lmoldname -lmingwex -lmsvcrt > greg@Homerw7 MINGW32 > /t32/bldall/shared/noninteractive/install_tree/share/plplot5.11.1/examples/c++ $ The 64-bit build on the same drive (C:) has the same issue. However, I have an msys2 installation also on drive D: which can handle the same command: > greg@Homerw7 MINGW64 >> /t64/bldall/shared/noninteractive/install_tree/share/plplot5.11.1/examples/c++ > > $ make > > D:/mingw/msys32/mingw64/bin/g++.exe qt_example.cpp qt_PlotWindow.cpp >> moc_qt_PlotWindow.cpp -o qt_example.exe *-Wl,-rpath >> -Wl,"D:/bld/testing/m64d/bldall/shared/noninteractive/install_tree/lib:D:/bld/testing/m64d/bldall/shared/noninteractive/install_tree/lib:D:/bld/testing/m64d/bldall/shared/noninteractive/install_tree/lib/plplot5.11.1/drivers"* >> -ID:/bld/testing/m64d/bldall/shared/noninteractive/install_tree/include/plplot >> -ID:/mingw/msys32/mingw64/include/qt4 >> -ID:/mingw/msys32/mingw64/include/qt4/QtSvg >> -ID:/mingw/msys32/mingw64/include/qt4/QtGui >> -ID:/mingw/msys32/mingw64/include/qt4/QtCore >> -ID:/bld/testing/m64d/bldall/shared/noninteractive/install_tree/include/plplot >> -LD:/bld/testing/m64d/bldall/shared/noninteractive/install_tree/lib >> -LD:/mingw/msys32/mingw64/lib >> -LD:/bld/testing/m64d/bldall/shared/noninteractive/install_tree/lib >> -LD:/mingw/msys32/mingw64/lib >> -LD:/mingw/msys32/mingw64/lib/gcc/x86_64-w64-mingw32/5.2.0 >> -LD:/mingw/msys32/mingw64/x86_64-w64-mingw32/lib -lplplotqt -lplplot >> -lQtSvg4 -lQtGui4 -lQtCore4 -lplplot -lshp.dll -lfreetype.dll -lcsirocsa >> -lcsironn -lqhull -lqsastime -lstdc++.dll -lmingw32 -lmoldname -lmingwex >> -lmsvcrt -lpthread.dll -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 >> -lmoldname -lmingwex -lmsvcrt >> -ID:/bld/testing/m64d/bldall/shared/noninteractive/install_tree/include/plplot >> -LD:/bld/testing/m64d/bldall/shared/noninteractive/install_tree/lib >> -LD:/mingw/msys32/mingw64/lib >> -LD:/mingw/msys32/mingw64/lib/gcc/x86_64-w64-mingw32/5.2.0 >> -LD:/mingw/msys32/mingw64/x86_64-w64-mingw32/lib -lplplot -lshp.dll >> -lfreetype.dll -lcsirocsa -lcsironn -lqhull -lqsastime -lstdc++.dll >> -lmingw32 -lmoldname -lmingwex -lmsvcrt -lpthread.dll -ladvapi32 -lshell32 >> -luser32 -lkernel32 -lmingw32 -lmoldname -lmingwex -lmsvcrt > > >> greg@Homerw7 MINGW64 >> /t64/bldall/shared/noninteractive/install_tree/share/plplot5.11.1/examples/c++ > > $ > > Note in passing: Until I went to cmake 3.3.2, the normal RPATHCMD had a second directory (a system library) tacked into it and also gave problems. Obviously if I can manipulate cmake to provide /D instead of D: as the answer that would solve my issue, but if that's all, how does this second example work? Thanks, I hope this interests you! Greg GNU bash, version 4.3.42(2)-release-(x86_64-pc-msys) GNU bash, version 4.3.42(2)-release-(i686-pc-msys) |