VisualGDB fails to give proper error to build fail

Sysprogs forums Forums VisualGDB VisualGDB fails to give proper error to build fail

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #8637
    b.timofte
    Participant

    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-group

     

    makefile: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 ?

     

     

     

    • This topic was modified 8 years, 4 months ago by b.timofte.
    • This topic was modified 8 years, 4 months ago by b.timofte.
    #8641
    b.timofte
    Participant

    I 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.
    #8644
    b.timofte
    Participant

    So 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

    #8645
    b.timofte
    Participant

    Is 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 ?!

    #8653
    support
    Keymaster

    Hi,

    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

     

    #8659
    b.timofte
    Participant

    Hi

    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 ==========

    #8660
    b.timofte
    Participant

    I 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.
    #8662
    support
    Keymaster

    Hi,

    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/

    #8665
    b.timofte
    Participant

    Ofcourse it list the files correctly

    • This reply was modified 8 years, 4 months ago by b.timofte.
    • This reply was modified 8 years, 4 months ago by b.timofte.
    #8670
    b.timofte
    Participant

    I 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)
    endif

     

    #8671
    b.timofte
    Participant

    For the first variant there is the file “WindowsProject1.exe.in” in debug -_-

    #8672
    b.timofte
    Participant

    The 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 1

    #8673
    b.timofte
    Participant

    The 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)
    endif

    gives error

    1>  The system cannot execute the specified program.
    1>  mingw32-make: *** [Debug/17_01_Dev.exe] Error 1

     

    And in the Debug folder beside .dep and .o there is one 17_01_Dev.exe.in who contains “-g”

     

    Heeeelp

     

    #8674
    b.timofte
    Participant

    With 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.
    #8678
    b.timofte
    Participant

    Finally 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

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.