salex

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • in reply to: Multiple definitions of source files #22812
    salex
    Participant

    Hi,

    Great job, it works now. I’m able to build and debug.

    Continue testing.

    in reply to: Multiple definitions of source files #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

    ….

     

    in reply to: Multiple definitions of source files #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.
    in reply to: Multiple definitions of source files #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.

    in reply to: Multiple definitions of source files #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 ?

     

    in reply to: Multiple definitions of source files #22588
    salex
    Participant

    Ok,
    I’m waiting for the fix.

    in reply to: Multiple definitions of source files #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

     

    in reply to: Multiple definitions of source files #22516
    salex
    Participant

    Hello,

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

    Please let me download it again.

     

    in reply to: Multiple definitions of source files #22326
    salex
    Participant

    Ok,

    Please update me here when the new version is available.

     

    in reply to: Multiple definitions of source files #22311
    salex
    Participant

    I’ve managed to build working CMake with clean Cygwin installation. I have 3.12.2  version (latest from your branch).

    Now the error i get looks different.

    When i Add new Cygwin/CMake project, it shown in Solution Explorer as Loading …. for a long time, actually until i stop it. And then i get the error:

    Unexpected JSON message: expected Reply, got
    System.Exception: Unexpected JSON message: expected Reply, got
    at wh1.c2[_InType,_OutType](_InType a)
    at g61.k(String d, String b, String c, String a)
    at g61.l_2(Hello a)
    at wh1.m1()
    System.Exception: Unexpected JSON message: expected Reply, got
    at wh1.c2[_InType,_OutType](_InType a)
    at g61.k(String d, String b, String c, String a)
    at g61.l_2(Hello a)
    at wh1.m1()

     

    in reply to: Multiple definitions of source files #22307
    salex
    Participant

     

    I found your CMake branch here.

    It indeed missed the libraries you’ve mentioned when i run bootstrap (configure).

    After fixing this, i pass bootstrap and make successfully, but have a crash in make install step with error:

    make: *** [Makefile:84: install] Aborted (core dumped)

    Same error when i just run cmake manually.

    Have you got this error also ?

     

    in reply to: Multiple definitions of source files #22274
    salex
    Participant

    The CMake version that supplied by the latest Cygwin installer is 3.6.2, you can see the error that it throws in my reply #22264. As you can see, it misses some option, probably because it is outdated.

    When i trying to compile the latest CMake from sources inside Cygwin, it fails on the configure step. It probably misses some components because Cygwin is not real Linux.

    If you know about specific component that is required to run CMake properly, please let me know. I’ll try to install it with Cygwin installer.

    Did you really tested Cygwin/CMake support in VisualGDB ?

    in reply to: Multiple definitions of source files #22265
    salex
    Participant

    I’ve updated manually the CMake to version 3.12.0.

    Now the error is:

    Loaded C:\Users\alexsho\source\repos\WindowsProject1\WindowsProject7\WindowsProject7.vgdbcmake. Waiting for VS to set the active configuration…
    C:\Users\alexsho\source\repos\WindowsProject1\WindowsProject7\WindowsProject7.vgdbcmake: active configuration changed to Debug
    CMake exited with code 127
    Failed to receive a ‘hello’ message from CMake
    System.Exception: Failed to receive a ‘hello’ message from CMake
    at wh1.m1()
    System.Exception: Failed to receive a ‘hello’ message from CMake
    at wh1.m1()

     

    in reply to: Multiple definitions of source files #22264
    salex
    Participant

     

    According to your recommendation i’m trying to switch to CMake with Advanced Project Subsystem.

    I installed CMake on the Cygwin by means of its Setup application.

    When i create on VS New project of type MinGW/Cygwin VisualGDB with CMake, i get the error on Output window:

    Loaded C:\Users\salex\source\repos\WindowsProject1\WindowsProject5\WindowsProject5.vgdbcmake. Waiting for VS to set the active configuration…
    C:\Users\salex\source\repos\WindowsProject1\WindowsProject5\WindowsProject5.vgdbcmake: active configuration changed to Debug
    CMake Error: cmake version 3.6.2
    Usage: cmake -E <command> [arguments…]
    Available commands:
    chdir dir cmd [args…] – run command in a given directory
    compare_files file1 file2 – check if file1 is same as file2
    copy <file>… destination – copy files to destination (either file or directory)
    copy_directory <dir>… destination – copy content of <dir>… directories to ‘destination’ directory
    copy_if_different <file>… destination – copy files if it has changed
    echo [<string>…] – displays arguments as text
    echo_append [<string>…] – displays arguments as text but no new line
    env [–unset=NAME]… [NAME=VALUE]… COMMAND [ARG]…
    – run command in a modified environment
    environment – display the current environment
    make_directory <dir>… – create parent and <dir> directories
    md5sum <file>… – create MD5 checksum of files
    remove [-f] <file>… – remove the file(s), use -f to force it
    remove_directory dir – remove a directory and its contents
    rename oldname newname – rename a file or directory (on one volume)
    tar [cxt][vf][zjJ] file.tar [file/dir1 file/dir2 …]
    – create or extract a tar or zip archive
    sleep <number>… – sleep for given number of seconds
    time command [args…] – run command and return elapsed time
    touch file – touch a file.
    touch_nocreate file – touch a file but do not create it.
    Available on UNIX only:
    create_symlink old new – create a symbolic link new -> old

    CMake exited with code 1
    System.Exception: Failed to create a Unix domain socket. Please install ‘socat’ on your Linux machine via ‘sudo apt-get install socat’ or ‘yum install socat’
    at fb.e_2()
    at wh1.i()
    at g42.k2(Boolean a, Boolean b)
    System.Exception: Failed to create a Unix domain socket. Please install ‘socat’ on your Linux machine via ‘sudo apt-get install socat’ or ‘yum install socat’
    at fb.e_2()
    at wh1.i()
    at g42.k2(Boolean a, Boolean b)

    What should i do ?

     

    in reply to: Multiple definitions of source files #22259
    salex
    Participant

    Thank you for the support.

    I’ve managed to build the solution. I just split the project to main executable and several static libraries. Later i’ll try also to switch to CMake.

    My next problem is that the debugger (i’m pretty sure it is gdb) refuses to set breakpoint.

    I can run and execute the main program step by step with the debugger, but when i set breakpoint it goes to empty circle, saying that can’t resolve breakpoint location.

    What should i do ?

    Should i add somewhere the main program and libraries sources location ?

    Update: solved using this tutorial.

     

    • This reply was modified 5 years, 6 months ago by salex.
    • This reply was modified 5 years, 6 months ago by salex.
Viewing 15 posts - 1 through 15 (of 16 total)