Some problems with makefile

Sysprogs forums Forums VisualGDB Some problems with makefile

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #684
    Anonymous
    Participant

    Hi!
    I’m using trial version of your tool VisualGDB, and i was trying to create some QTbased application for linux (RaspberryPi) using cross compiler.
    I configured everything using tutorial, and i had problems with “make.exe”. I was receiving error:
    “Syntax is incorrect”
    After few hours (and manual execution of make with -d switch) i found that following code was source of my problems:

    
    $(TARGET): Debug/ui_MainWindow.h $(OBJECTS)
    	@$(CHK_DIR_EXISTS) Debug/ || $(MKDIR) Debug/ 
    $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)

    There was batch file created with following content:

    	@echo off
    test -d Debug/ || mkdir Debug/ 

    I removed second line from makefile, and everything seems to work fine! Do I have something wrong in my system configuration or there is some bug?
    I’m using Visual Studio 2010 Professional, and GDB 4.1r7.

    #2780
    ket
    Participant

    Hi,

    That line should normally not give any issues.

    Do you have any other toolchains on the PATH that include test or mkdir? Which part of “test -d Debug/ || mkdir Debug/ ” gives problems, is it “test -d Debug/” or “mkdir Debug/”? What is the output of each of them and the entire line together when executed from cmd?

    #2781
    Anonymous
    Participant

    Okay. After short investigation i can see, that the problem is with backslash after “Debug” in mkdir command – probably for test as well, but there is no visible message.
    When i removed backslash, “test Debug” returned 0, and “mkdir Debug” message “Directory already exists”. With backslash: “test Debug/” returned 1, and “mkdir Debug/” “Syntax is incorrect”

    my path from “make” perspective looks like (exported from batch script which was invoked instead of make):
    “C:Program Files (x86)NVIDIA CorporationPhysXCommon;C:WinAVR-20100110bin;C:WinAVR-20100110utilsbin;C:Program FilesCommon FilesMicrosoft SharedWindows Live;C:Program Files (x86)Common FilesMicrosoft SharedWindows Live;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program FilesTortoiseSVNbin;C:Program Files (x86)Windows LiveShared;c:Program FilesJavajdk1.7.0_21\bin;C:Program Files (x86)QuickTimeQTSystem;C:SysGCCRaspberrybin;C:SysGCCraspberrybin “

    #2782
    support
    Keymaster

    Hi,

    When we tested it on our side the problem never happened because the Debug directory was created by qmake, so the ‘mkdir’ command was never executed.
    Have you changed any files that could result in a change of this behavior? Does doing a full rebuild solve the problem?

    #2783
    jorgos
    Participant

    Debug directory exists, and as you said, was created by qmake. “test” tool is returning “1”, when slash is at the end of path, and correctly returns “0”, when there is no slash.
    Problem appears when building and rebuilding as well.
    As a workaround I created small script which removes this line from makefile, and invoke make.

    #2784
    support
    Keymaster

    Are you using some third-party ‘test’ binary. The one included in our Beaglebone toolchain returns 0 when used with slash at the end. You can test it using the following code:

    
    mkdir xxx
    test -d xxx || echo ERROR1
    test -d xxx/ || echo ERROR2
    test -d yyy || echo ERROR3
    
    #2785
    jorgos
    Participant

    Thanks. You are completly right. I renamed any other “test.exe” binary on path, and now everything seems to work fine!

    By the way, have you ever debug application with Phonon? I would like to create application that is playing audio files using Phonon class:

    Phonon::MediaObject *mediaObject;
    mediaObject = Phonon::createPlayer(Phonon::MusicCategory);

    And application is working correctly (sound is playing) when i run it manually from xterminal, but when i try to run it directly from Visual, GDB hungs on bolded line. I tried to run application manually and connect to them, but it’s not working as well. Could you give me any advice how to setup GDB to work with this?

    #2786
    support
    Keymaster

    Hi,

    Unfortunately we have not tested our tool with Phonon. If it does not work for you, you can either try starting it manually from the console and then attaching to it (select ‘attach’ in VisualGDB Project Properties) or look into the Phonon source to understand what API it is using to interact with the hardware and why it is not working over SSH. You can try selecting ‘Show X11 windows on the remote computer’ in VisualGDB Project Properties to see if it solves the problem.

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