Sysprogs forums › Forums › VisualGDB › Multiple definitions of source files
- This topic has 30 replies, 2 voices, and was last updated 6 years ago by salex.
-
AuthorPosts
-
October 30, 2018 at 00:00 #22465supportKeymaster
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.
November 1, 2018 at 16:40 #22516salexParticipantHello,
It seems that i missed the link you posted, it is already unavailable.
Please let me download it again.
November 1, 2018 at 16:42 #22517supportKeymasterHi,
Sorry about that. Please download v5.4 Preview 8. It includes all the fixes from all previous builds.
November 4, 2018 at 12:37 #22558salexParticipantHello,
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 failedNovember 4, 2018 at 17:47 #22564supportKeymasterHi,
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.
November 6, 2018 at 07:31 #22588salexParticipantOk,
I’m waiting for the fix.November 7, 2018 at 05:50 #22608supportKeymasterHi,
No problem. Please try this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.9.2552.msi
November 11, 2018 at 10:47 #22668salexParticipantHi,
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 ?
November 12, 2018 at 20:36 #22695supportKeymasterHi,
Yes, you should be able to customize the build command line via VisualGDB Project Properties -> CMake project settings -> Make Command.
November 13, 2018 at 16:59 #22701salexParticipantIt 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.
November 13, 2018 at 17:15 #22702supportKeymasterHi,
Strange. Could you please share a screenshot of your settings and the command line shown in the build log?
November 14, 2018 at 14:01 #22705salexParticipantHi,
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.November 16, 2018 at 07:04 #22719supportKeymasterHi,
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
November 18, 2018 at 09:40 #22739salexParticipantHi,
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….
November 20, 2018 at 08:04 #22770supportKeymasterHi,
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”.
-
AuthorPosts
- You must be logged in to reply to this topic.