Multiple definitions of source files

Sysprogs forums Forums VisualGDB Multiple definitions of source files

Viewing 15 posts - 16 through 30 (of 31 total)
  • Author
    Posts
  • #22465
    support
    Keymaster

    Hi,

    Just wanted to let you know that we have updated VisualGDB to run the Cygwin build of CMake using an alternate mechanism that does not trigger the problem. Please use this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.7.2524.msi

    It also looks like as of v3.12, the Cygwin-based build of CMake would crash when trying to reload a project without restarting it:

    assertion "0" failed: file "<...>/CMake/Utilities/cmlibuv/src/unix/core.c", line 185, function: uv_close
        0 [main] cmake 33156 cygwin_exception::open_stackdumpfile: Dumping stack trace to cmake.exe.stackdump

    If you ever encounter that message, please right-click on the project in Solution Explorer and select “Reload CMake Project”. This will restart CMake and reload the project successfully.

    #22516
    salex
    Participant

    Hello,

    It seems that i missed the link you posted, it is already unavailable.

    Please let me download it again.

     

    #22517
    support
    Keymaster

    Hi,

    Sorry about that. Please download v5.4 Preview 8. It includes all the fixes from all previous builds.

    #22558
    salex
    Participant

    Hello,

    I’ve installed the v5.4 Preview 8.

    I succeeded to load the project without errors.

    The problem you mentioned happens every time i try to build the project.

    On the build command i get following message:

    Code model queried in 1483 msec
    assertion “0” failed: file “/home/salex/CMake/Utilities/cmlibuv/src/unix/core.c”, line 185, function: uv_close
    1 [main] cmake 47776 cygwin_exception::open_stackdumpfile: Dumping stack trace to cmake.exe.stackdump
    Unexpected JSON message: expected Reply, got
    System.Exception: Unexpected JSON message: expected Reply, got
    at go1.m1[_InType,_OutType](_InType a)
    at y22.m(String[] a)
    at y22.x1(Hello a)
    at go1.e()
    CMake exited with code 34304
    System.Exception: CMake exited with code 34304
    at v3.l(Object a, EventArgs b)

    On rebuild command i got following message:

    —— Build started: Project: Px4_WinGDB.vgdbcmake (failed), Configuration: Debug VisualGDB ——
    VisualGDB: Run “C:\PX4\toolchain\cygwin64\bin\bash.exe -c “C:\PX4\toolchain\cygwin64\bin\cmake.exe ../.. -G \”Unix Makefiles\” -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_COLOR_MAKEFILE=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DTOOLCHAIN_ROOT=C:/PX4/toolchain/cygwin64″” in directory “/cygdrive/c/PX4/home/Firmware/VisualGDB/Debug” on local computer
    /usr/bin/bash: C:PX4toolchaincygwin64bincmake.exe: command not found
    ————————————————————-
    Command exited with code 127
    Executable: C:\PX4\toolchain\cygwin64\bin\bash.exe
    Arguments: -c “C:\PX4\toolchain\cygwin64\bin\cmake.exe ../.. -G \”Unix Makefiles\” -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_COLOR_MAKEFILE=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DTOOLCHAIN_ROOT=C:/PX4/toolchain/cygwin64″
    Directory: /cygdrive/c/PX4/home/Firmware/VisualGDB/Debug
    VisualGDB: Error: Command-line action failed

     

    #22564
    support
    Keymaster

    Hi,

    No problem, we can add a workaround to the first problem that will automatically restart CMake if it crashes during reconfiguration.

    The second problem looks like you are using backward slashes in the path to GNU Make (configured via VisualGDB Project Properties). Please try using forward slashes instead and let us know if this solves the problem.

    #22588
    salex
    Participant

    Ok,
    I’m waiting for the fix.

    #22608
    support
    Keymaster

    Hi,

    No problem. Please try this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.9.2552.msi

    #22668
    salex
    Participant

    Hi,

    This version one is working. It started to build the program.

    The next problem is that the VisualGDB executes bash.exe of Cygwin without login option.

    VisualGDB: Run “C:\PX4\toolchain\cygwin64\bin\bash.exe -c “make “” in directory “c:\PX4\home\Firmware\VisualGDB\Debug” on local computer

    This causes that some python scripts, which are activated from the CMakeList, cannot import modules (numpy).

    I tried manually to do this, and bash.exe -l , should solve the problem.

    Can i add this option in configuration, or the command is hard-coded in VisualGDB ?

     

    #22695
    support
    Keymaster

     

    Hi,

    Yes, you should be able to customize the build command line via VisualGDB Project Properties -> CMake project settings -> Make Command.

    #22701
    salex
    Participant

     

     

    It doesn’t work this way.

    If i put it before make command, meaning it will appear immediately after bash.exe, it recognizes the -l as invalid option.

    It looks like it should be hardcoded in bash command, my be as an option.

    #22702
    support
    Keymaster

    Hi,

    Strange. Could you please share a screenshot of your settings and the command line shown in the build log?

    #22705
    salex
    Participant

    Hi,

    The screenshot of the settings is in the attachment.

    And here is the screenshot of error message:

    VisualGDB: Run “C:\PX4\toolchain\cygwin64\bin\bash.exe -c “-l make “” in directory “c:\PX4\home\Firmware\VisualGDB\Debug” on local computer
    /usr/bin/bash: – : invalid option
    Usage: /usr/bin/bash [GNU long option] [option] …
    /usr/bin/bash [GNU long option] [option] script-file …
    GNU long options:
    –debug
    –debugger
    –dump-po-strings
    –dump-strings
    –help
    –init-file
    –login
    –noediting
    –noprofile
    –norc
    –posix
    –protected
    –rcfile
    –restricted
    –verbose
    –version
    –wordexp
    Shell options:
    -ilrsD or -c command or -O shopt_option (invocation only)
    -abefhkmnptuvxBCHP or -o option
    ————————————————————-
    Command exited with code 2
    Executable: C:\PX4\toolchain\cygwin64\bin\bash.exe
    Arguments: -c “-l make ”
    Directory: c:\PX4\home\Firmware\VisualGDB\Debug
    VisualGDB: Error: Command-line action failed
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

     

    Attachments:
    You must be logged in to view attached files.
    #22719
    support
    Keymaster

    Hi,

    Sorry for the delay. We have pinpointed and fixed the issue in this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.9.2571.msi

    #22739
    salex
    Participant

    Hi,

    Thank you for your efforts.

    Now i can see the login command, but something strange happens. The make is not starting at all.

    I tested again with version VisualGDB-5.4.9.2552, the command line looks same, but without –login, and make process is working (until it stops on because of login problem).

    Here is the output of the latest VisualGDB:

    —— Build started: Project: Px4_WinGDB, Configuration: Debug VisualGDB ——
    VisualGDB: Run “C:\PX4\toolchain\cygwin64\bin\bash.exe –login -c “make “” in directory “c:\PX4\home\Firmware\VisualGDB\Debug” on local computer
    make: *** No targets specified and no makefile found. Stop.
    ————————————————————-
    Command exited with code 2
    Executable: C:\PX4\toolchain\cygwin64\bin\bash.exe
    Arguments: –login -c “make ”
    Directory: c:\PX4\home\Firmware\VisualGDB\Debug
    VisualGDB: Error: Command-line action failed
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    Here is the output of VisualGDB-5.4.9.2552:

    —— Build started: Project: Px4_WinGDB, Configuration: Debug VisualGDB ——
    VisualGDB: Run “C:\PX4\toolchain\cygwin64\bin\bash.exe -c “make “” in directory “c:\PX4\home\Firmware\VisualGDB\Debug” on local computer
    Scanning dependencies of target uorb_headers
    [ 0%] Generating uORB topic headers
    [ 0%] Built target uorb_headers
    Scanning dependencies of target tinybson
    [ 0%] Building CXX object src/lib/parameters/tinybson/CMakeFiles/tinybson.dir/tinybson.cpp.o
    [ 0%] Linking CXX static library libtinybson.a
    [ 0%] Built target tinybson
    [ 0%] Generating uORB topic sources
    Scanning dependencies of target uorb_msgs
    [ 0%] Building CXX object msg/CMakeFiles/uorb_msgs.dir/topics_sources/uORBTopics.cpp.o
    [ 0%] Building CXX object msg/CMakeFiles/uorb_msgs.dir/topics_sources/actuator_armed.cpp.o
    [ 0%] Building CXX object msg/CMakeFiles/uorb_msgs.dir/topics_sources/actuator_controls.cpp.o
    [ 0%] Building CXX object msg/CMakeFiles/uorb_msgs.dir/topics_sources/actuator_direct.cpp.o
    [ 1%] Building CXX object msg/CMakeFiles/uorb_msgs.dir/topics_sources/actuator_outputs.cpp.o
    [ 1%] Building CXX object msg/CMakeFiles/uorb_msgs.dir/topics_sources/adc_report.cpp.o

    ….

     

    #22770
    support
    Keymaster

    Hi,

    Sorry about that, looks like our bug (we did not compensate for the fact that –login resets the working directory). We have updated the logic for wrapping the Cygwin commands in this build and tested it in several scenarios, so it should finally work: http://sysprogs.com/files/tmp/VisualGDB-5.4.10.2583.msi

    Please open the toolchain editing window and manually set the command launch mode to “Interactive Bash Session”.

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