Sysprogs forums › Forums › VisualGDB › VisualGDB fails to give proper error to build fail
- This topic has 15 replies, 2 voices, and was last updated 8 years, 4 months ago by support.
-
AuthorPosts
-
July 19, 2016 at 09:29 #8637b.timofteParticipant
I have the output
1>c:\comp_4.9.2_testversion/bin/g++.exe -o File.exe -Wl,-Map,File.map -Wl,–allow-multiple-definition -Wl,–start-group Debug/f1.o Debug/f2.o
….huge list of objects
Debug/Xcp_UtilsStartStop.o Debug/_main.o -Wl,–end-groupmakefile:137: recipe for target ‘Debug/File.exe’ failed
process_begin: CreateProcess(C:\comp_4.9.2_testversion\bin\g++.exe, C:/comp_4.9.2_testversion/bin/g++.exe -o Debug/File.exe -Wl,-Map,File.map -Wl,–allow-multiple-definition -Wl,–start-group Debug/f1.o Debug/f2.o
..huge list of files
-Wl,–end-group, …) failed.
make (e=87): The parameter is incorrect.
1>
1> mingw32-make: *** [Debug/File.exe] Error 87
1> ————————————————————-
1> Command exited with code 2
1> Executable: cmd.exe
1> Arguments: /c “C:\comp_4.9.2_testversion\bin\mingw32-make.exe” -j8 CONFIG=Debug
1> Directory: C:\ProjectFolderVS 1>VisualGDB : error : Command-line action failed
1>EXEC : error : Build has failed. See the Output window for more details.What should i understand from this ? Where is the error lol ?
July 19, 2016 at 11:09 #8641b.timofteParticipantI think the command is too long (to make exe from .o)
Is there any FLAG where i can pass this limitation ?
- This reply was modified 8 years, 4 months ago by b.timofte.
July 19, 2016 at 15:28 #8644b.timofteParticipantSo the tool calls the linker (g++.exe) with a HUUGE list of object files. I guess the command is too long
What solution shall i make ? Splitting the source code into smaller folder doesnt seems to work and its unreliable since the file number and filename length matters
July 19, 2016 at 16:19 #8645b.timofteParticipantIs this forum dead lol ?
I cant imagine i am the only one who compiles +1000 files.
Is it possible to give as input to mingw linker *.o instead of the full list of objects file ?
Maybe possible to tell the linker to make a list of object files in a file and give this file as input ?
Anyone ?!
July 19, 2016 at 19:16 #8653supportKeymasterHi,
Our support is located in the PST timezone, so we could not have answered you earlier. Sorry about that.
You can configure VisualGDB to pass a list of source files via response files by modifying your Makefile as follows:
ifeq ($(TARGETTYPE),APP) $(BINARYDIR)/$(TARGETNAME): $(all_objs) $(EXTERNAL_LIBS) $(LD) -o $@ $(LDFLAGS) $(START_GROUP) $(all_objs) $(LIBRARY_LDFLAGS) $(END_GROUP) endif
should be replaced with this:
ifeq ($(TARGETTYPE),APP) $(BINARYDIR)/$(TARGETNAME): $(all_objs) $(EXTERNAL_LIBS) @echo $(all_objs) > $@.in $(LD) -o $@ $(LDFLAGS) $(START_GROUP) @$@.in $(LIBRARY_LDFLAGS) $(END_GROUP) endif
July 19, 2016 at 23:21 #8659b.timofteParticipantHi
It didnt worked
The linker command looks wrong
C:/SysGCC/mingw32/bin/g++.exe -o Debug/WindowsProject1.exe -Wl,-gc-sections -Wl,–start-group @Debug/WindowsProject1.exe.in -Wl,–end-group
1>g++.exe : error : Debug/thisIsAveryLongFilenamY: No such file or directory
1> mingw32-make: *** [Debug/WindowsProject1.exe] Error 1
1> Makefile:137: recipe for target ‘Debug/WindowsProject1.exe’ failed
1> ————————————————————-
1> Command exited with code 2
1> Executable: cmd.exe
1> Arguments: /c “C:\SysGCC\mingw32\bin\mingw32-make.exe” -j8 CONFIG=Debug
1> Directory: C:\Users\timo\Desktop\Study\Embedded\STM32\VisualGDB\WindowsProject1\WindowsProject1
1>VisualGDB : error : Command-line action failed
1>EXEC : error : Build has failed. See the Output window for more details.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(42,5): error MSB3073: The command “”C:\Program Files (x86)\Sysprogs\VisualGDB\VisualGDB.exe” /rebuild “C:\Users\timo\Desktop\Study\Embedded\STM32\VisualGDB\WindowsProject1\WindowsProject1\WindowsProject1.vcxproj” “/solution:C:\Users\timo\Desktop\Study\Embedded\STM32\VisualGDB\WindowsProject1\WindowsProject1.sln” “/config:Debug” “/platform:Win32″” exited with code 1.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========July 19, 2016 at 23:43 #8660b.timofteParticipantI wonder how you build this 9000+ files linux kernel -_-” using visualGDB … Really insipring
- This reply was modified 8 years, 4 months ago by b.timofte.
July 20, 2016 at 04:42 #8662supportKeymasterHi,
Could you check the contents/size of the Debug/WindowsProject1.exe.in file? Does it list the files correctly or is it cut off?
Regarding the Linux Kernel, we actually have a separate project for that – VisualKernel. You can look through this tutorial to get a brief idea: http://sysprogs.com/VisualKernel/tutorials/kernel/
July 20, 2016 at 07:18 #8665b.timofteParticipantJuly 20, 2016 at 07:55 #8670b.timofteParticipantI also tried this
ifeq ($(TARGETTYPE),APP)
$(BINARYDIR)/$(TARGETNAME): $(all_objs) $(EXTERNAL_LIBS)
<TAB>@echo -g > $@.in
<TAB>$(foreach obj,$(all_objs),cmd /c “echo $(obj) >> $@.in”)
<TAB> $(LD) -o $@ $(LDFLAGS) $(START_GROUP) @$@.in $(LIBRARY_LDFLAGS) $(END_GROUP)
endifJuly 20, 2016 at 08:01 #8671b.timofteParticipantFor the first variant there is the file “WindowsProject1.exe.in” in debug -_-
July 20, 2016 at 09:01 #8672b.timofteParticipantThe first solution truncates the .c files with char length >~34 characters. So then it cant find them when linking…
1> C:/SysGCC/mingw32/bin/g++.exe -o Debug/17_01_Dev.exe -Wl,-Map,BswSim.map -Wl,–allow-multiple-definition -Wl,–start-group @Debug/17_01_Dev.exe.in -Wl,–end-group
1>g++.exe : error : Debug/TRUNCATEDFILENAME: No such file or directory
1> Makefile:137: recipe for target ‘Debug/17_01_Dev.exe’ failed
1> mingw32-make: *** [Debug/17_01_Dev.exe] Error 1July 20, 2016 at 13:56 #8673b.timofteParticipantThe second variant
ifeq ($(TARGETTYPE),APP)
$(BINARYDIR)/$(TARGETNAME): $(all_objs) $(EXTERNAL_LIBS)
<TAB>@echo -g > $@.in
<TAB>$(foreach obj,$(all_objs),cmd /c “echo $(obj) >> $@.in”)
<TAB> $(LD) -o $@ $(LDFLAGS) $(START_GROUP) @$@.in $(LIBRARY_LDFLAGS) $(END_GROUP)
endifgives error
1> The system cannot execute the specified program.
1> mingw32-make: *** [Debug/17_01_Dev.exe] Error 1And in the Debug folder beside .dep and .o there is one 17_01_Dev.exe.in who contains “-g”
Heeeelp
July 20, 2016 at 14:26 #8674b.timofteParticipantWith the first variant there is on 17_01_Dev.exe.in which contains the list of objects like
Debug/file2.o Debug/file1.o …
The last object name in this file is
Debug/DcmAppl_DcmCheckRdbiResponseLengh
but my file is in the Debug folder is
DcmAppl_DcmCheckRdbiResponseLength.o
Its missing the “t”
Also the file 17_01_Dev.exe.in doesnt contain the list of all my objects
I have objects from A to X alphabetically but it stops at D
(in notepad it says it has 8191 characters)
WTF O_O
- This reply was modified 8 years, 4 months ago by b.timofte.
July 21, 2016 at 00:24 #8678b.timofteParticipantFinally it works with this !!
ifeq ($(TARGETTYPE),APP)
$(BINARYDIR)/$(TARGETNAME): $(all_objs) $(EXTERNAL_LIBS)
$(file >$@.in,$^)
$(LD) -o $@ $(LDFLAGS) $(START_GROUP) @$@.in $(LIBRARY_LDFLAGS) $(END_GROUP)
endif -
AuthorPosts
- You must be logged in to reply to this topic.