Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing Qt in Program files directory #133

Closed
bkoops opened this issue Feb 16, 2017 · 22 comments
Closed

Installing Qt in Program files directory #133

bkoops opened this issue Feb 16, 2017 · 22 comments

Comments

@bkoops
Copy link

bkoops commented Feb 16, 2017

I have recieved the following error while working on step 3.4 'Builiding the libraries:

[ 90%] Linking CXX executable "C:\Users\Bram Koops\tudatBundle\tudat\bin\unit_tests\test_ControlSurfaceIncrements.exe"
C:/PROGRA2/Qt/Tools/MINGW41/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x39): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
tudat\Tudat\Astrodynamics\Aerodynamics\CMakeFiles\test_ControlSurfaceIncrements.dir\build.make:122: recipe for target 'C:/Users/Bram Koops/tudatBundle/tudat/bin/unit_tests/test_ControlSurfaceIncrements.exe' failed
mingw32-make.exe[2]: *** [C:/Users/Bram Koops/tudatBundle/tudat/bin/unit_tests/test_ControlSurfaceIncrements.exe] Error 1
CMakeFiles\Makefile2:360: recipe for target 'tudat/Tudat/Astrodynamics/Aerodynamics/CMakeFiles/test_ControlSurfaceIncrements.dir/all' failed
makefile:139: recipe for target 'all' failed
mingw32-make.exe[1]: *** [tudat/Tudat/Astrodynamics/Aerodynamics/CMakeFiles/test_ControlSurfaceIncrements.dir/all] Error 2
mingw32-make.exe: *** [all] Error 2
15:12:14: The process "C:\Program Files (x86)\CMake\bin\cmake.exe" exited with code 2.
Error while building/deploying project TudatBundle (kit: Desktop)
When executing step "Make"

The kits in the build and run menu are all configured as it should be.

How can I fix this issue?

@ifodde
Copy link
Contributor

ifodde commented Feb 16, 2017

I have the same issue
[ 90%] Linking CXX executable C:\tudatBundle\tudat\bin\unit_tests\test_ControlSurfaceIncrements.exe
C:/PROGRA2/Qt/Tools/MINGW41/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x39): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
tudat\Tudat\Astrodynamics\Aerodynamics\CMakeFiles\test_ControlSurfaceIncrements.dir\build.make:122: recipe for target 'C:/tudatBundle/tudat/bin/unit_tests/test_ControlSurfaceIncrements.exe' failed
CMakeFiles\Makefile2:360: recipe for target 'tudat/Tudat/Astrodynamics/Aerodynamics/CMakeFiles/test_ControlSurfaceIncrements.dir/all' failed
makefile:139: recipe for target 'all' failed
mingw32-make.exe[2]: *** [C:/tudatBundle/tudat/bin/unit_tests/test_ControlSurfaceIncrements.exe] Error 1
mingw32-make.exe[1]: *** [tudat/Tudat/Astrodynamics/Aerodynamics/CMakeFiles/test_ControlSurfaceIncrements.dir/all] Error 2
mingw32-make.exe: *** [all] Error 2
15:53:17: The process "C:\Program Files (x86)\CMake\bin\cmake.exe" exited with code 2.
Error while building/deploying project TudatBundle (kit: Desktop)
When executing step "Make"
15:53:17: Elapsed time: 00:40.

@DominicDirkx
Copy link
Member

Could (either or both of) you attach your full compilation output, in the compile output tab at the bottom of the screen here? You can just Ctrl+A Ctrl+C to select all and copy the window.

We'll try to get this resolved as quickly as possible,

Dominic

@bkoops
Copy link
Author

bkoops commented Feb 16, 2017

16:43:17: Running steps for project TudatBundle...
16:43:17: Starting: "C:\Program Files (x86)\CMake\bin\cmake.exe" --build . --target all
[ 82%] Built target cspice
[ 82%] Built target nrlmsise00
[ 83%] Built target tudat_aerodynamics
[ 84%] Built target tudat_simulation_setup
[ 84%] Built target tudat_ephemerides
[ 84%] Built target tudat_basic_astrodynamics
[ 85%] Built target tudat_electro_magnetism
[ 85%] Built target tudat_gravitation
[ 86%] Built target tudat_mission_segments
[ 87%] Built target tudat_reference_frames
[ 87%] Built target tudat_relativity
[ 87%] Built target tudat_propagators
[ 88%] Built target tudat_system_models
[ 89%] Built target tudat_input_output
[ 89%] Built target tudat_propulsion
[ 89%] Built target tudat_basics
[ 89%] Built target tudat_basic_mathematics
[ 90%] Built target tudat_geometric_shapes
[ 90%] Built target tudat_numerical_integrators
[ 90%] Built target tudat_spice_interface
[ 90%] Linking CXX executable "C:\Users\Bram Koops\tudatBundle\tudat\bin\unit_tests\test_ControlSurfaceIncrements.exe"
C:/PROGRA2/Qt/Tools/MINGW41/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x39): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
tudat\Tudat\Astrodynamics\Aerodynamics\CMakeFiles\test_ControlSurfaceIncrements.dir\build.make:122: recipe for target 'C:/Users/Bram Koops/tudatBundle/tudat/bin/unit_tests/test_ControlSurfaceIncrements.exe' failed
CMakeFiles\Makefile2:360: recipe for target 'tudat/Tudat/Astrodynamics/Aerodynamics/CMakeFiles/test_ControlSurfaceIncrements.dir/all' failed
mingw32-make.exe[2]: *** [C:/Users/Bram Koops/tudatBundle/tudat/bin/unit_tests/test_ControlSurfaceIncrements.exe] Error 1
mingw32-make.exe[1]: *** [tudat/Tudat/Astrodynamics/Aerodynamics/CMakeFiles/test_ControlSurfaceIncrements.dir/all] Error 2
makefile:139: recipe for target 'all' failed
mingw32-make.exe: *** [all] Error 2
16:43:58: The process "C:\Program Files (x86)\CMake\bin\cmake.exe" exited with code 2.
Error while building/deploying project TudatBundle (kit: Desktop)
When executing step "Make"
16:43:58: Elapsed time: 00:41.

@DominicDirkx
Copy link
Member

DominicDirkx commented Feb 16, 2017

Thanks for the quick reply!

In your Tudat/Astrodynamics/Aerodynamics/CMakeLists.txt file, there are the lines:

add_executable(test_ControlSurfaceIncrements 
"${SRCROOT}${AERODYNAMICSDIR}/UnitTests/unitTestControlSurfaceIncrements.cpp")
setup_custom_test_program(test_ControlSurfaceIncrements "${SRCROOT}${AERODYNAMICSDIR}")
target_link_libraries(test_ControlSurfaceIncrements ${TUDAT_PROPAGATION_LIBRARIES} ${Boost_LIBRARIES})

Could you comment these out (# is comment symbol in CMake), run it again and give the output here?

Thanks!

@magnific0
Copy link
Member

I noticed that both @bkoops and @ifodde have place Qt in C:\Program File (x86)\Qt. Was this location suggested by default or did you choose this? In my experience Qt will suggest C:\Qt.

I just tried to replicate this by moving Qt to Program Files too. I did get different (but perhaps related) compilation errors where there were none before. So I wasn't able to replicate it 100%.

If @DominicDirkx approach still yields errors, perhaps someone could you try to uninstall Qt and reinstall it in a different location (preferably short and without spaces), like C:\Qt.

@DominicDirkx
Copy link
Member

@magnific0 : Could you post the errors you go with Qt in the new directory?

@ifodde
Copy link
Contributor

ifodde commented Feb 16, 2017

This is the output I now get:

[ 82%] Built target cspice
[ 82%] Built target nrlmsise00
[ 83%] Built target tudat_aerodynamics
[ 84%] Built target tudat_simulation_setup
[ 84%] Built target tudat_basic_astrodynamics
[ 85%] Built target tudat_electro_magnetism
[ 85%] Built target tudat_ephemerides
[ 86%] Built target tudat_mission_segments
[ 86%] Built target tudat_gravitation
[ 87%] Built target tudat_reference_frames
[ 87%] Built target tudat_propagators
[ 87%] Built target tudat_relativity
[ 87%] Built target tudat_propulsion
[ 88%] Built target tudat_system_models
[ 88%] Built target tudat_basics
[ 89%] Built target tudat_input_output
[ 89%] Built target tudat_basic_mathematics
[ 89%] Built target tudat_numerical_integrators
[ 90%] Built target tudat_geometric_shapes
[ 90%] Built target tudat_spice_interface
Scanning dependencies of target test_AerodynamicCoefficientsFromFile
[ 90%] Building CXX object tudat/Tudat/Astrodynamics/Aerodynamics/CMakeFiles/test_AerodynamicCoefficientsFromFile.dir/UnitTests/unitTestAerodynamicCoefficientsFromFile.cpp.obj
[ 90%] Linking CXX executable C:\tudatBundle\tudat\bin\unit_tests\test_AerodynamicCoefficientsFromFile.exe
C:/PROGRA2/Qt/Tools/MINGW41/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x39): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
tudat\Tudat\Astrodynamics\Aerodynamics\CMakeFiles\test_AerodynamicCoefficientsFromFile.dir\build.make:122: recipe for target 'C:/tudatBundle/tudat/bin/unit_tests/test_AerodynamicCoefficientsFromFile.exe' failed
CMakeFiles\Makefile2:358: recipe for target 'tudat/Tudat/Astrodynamics/Aerodynamics/CMakeFiles/test_AerodynamicCoefficientsFromFile.dir/all' failed
makefile:139: recipe for target 'all' failed
mingw32-make.exe[2]: *** [C:/tudatBundle/tudat/bin/unit_tests/test_AerodynamicCoefficientsFromFile.exe] Error 1
mingw32-make.exe[1]: *** [tudat/Tudat/Astrodynamics/Aerodynamics/CMakeFiles/test_AerodynamicCoefficientsFromFile.dir/all] Error 2
mingw32-make.exe: *** [all] Error 2
17:39:22: The process "C:\Program Files (x86)\CMake\bin\cmake.exe" exited with code 2.
Error while building/deploying project TudatBundle (kit: Desktop)
When executing step "Make"
17:39:22: Elapsed time: 02:20.

@DominicDirkx
Copy link
Member

Ok, so it looks like it's not anything specific to the test_ControlSurfaceIncrements file, but rather something systemic.

Could you post a screenshot of the Tools -> Options -> Build & Run -> Kits window (like on http://tudat.tudelft.nl/attachments/download/3091).

Also, could you post a screenshot of your projects tab (left of your window):

http://tudat.tudelft.nl/attachments/download/2895/7_Qt_Select_Compile.png

The contents of this tab probably look a bit different for you

@ifodde
Copy link
Contributor

ifodde commented Feb 16, 2017

kit
projects

Dit zijn ze als het goed is.

@DominicDirkx
Copy link
Member

Nothing strange there...

Could you replace the contents of your Tudat/Astrodynamics/Aerodynamics/UnitTests/unitTestAerodynamicCoefficientsFromFile.cpp file with the
contents of the attachment here (attached file is .txt instead of .cpp, github doesn't allow .cpp as attachments), and show the output?

unitTestAerodynamicCoefficientsFromFile.txt

@ifodde
Copy link
Contributor

ifodde commented Feb 16, 2017

Now this comes out:

18:05:22: Running steps for project TudatBundle...
18:05:22: Starting: "C:\Program Files (x86)\CMake\bin\cmake.exe" --build . --target all
[ 82%] Built target cspice
[ 82%] Built target nrlmsise00
[ 83%] Built target tudat_aerodynamics
[ 84%] Built target tudat_simulation_setup
[ 84%] Built target tudat_basic_astrodynamics
[ 85%] Built target tudat_electro_magnetism
[ 85%] Built target tudat_ephemerides
[ 86%] Built target tudat_mission_segments
[ 86%] Built target tudat_gravitation
[ 87%] Built target tudat_reference_frames
[ 87%] Built target tudat_propagators
[ 87%] Built target tudat_relativity
[ 87%] Built target tudat_propulsion
[ 88%] Built target tudat_system_models
[ 88%] Built target tudat_basics
[ 89%] Built target tudat_input_output
[ 89%] Built target tudat_basic_mathematics
[ 89%] Built target tudat_numerical_integrators
[ 90%] Built target tudat_geometric_shapes
[ 90%] Built target tudat_spice_interface
Scanning dependencies of target test_AerodynamicCoefficientsFromFile
[ 90%] Building CXX object tudat/Tudat/Astrodynamics/Aerodynamics/CMakeFiles/test_AerodynamicCoefficientsFromFile.dir/UnitTests/unitTestAerodynamicCoefficientsFromFile.cpp.obj
C:\tudatBundle\tudat\Tudat\Astrodynamics\Aerodynamics\UnitTests\unitTestAerodynamicCoefficientsFromFile.cpp: In function 'int main()':
C:\tudatBundle\tudat\Tudat\Astrodynamics\Aerodynamics\UnitTests\unitTestAerodynamicCoefficientsFromFile.cpp:386:33: warning: variable 'computedPerturbedMomentCoefficients' set but not used [-Wunused-but-set-variable]
Eigen::Vector3d computedPerturbedMomentCoefficients =
^
C:\tudatBundle\tudat\Tudat\Astrodynamics\Aerodynamics\UnitTests\unitTestAerodynamicCoefficientsFromFile.cpp:318:20: warning: unused variable 'sideslipAngle' [-Wunused-variable]
double sideslipAngle = variableIterator->second( 2 );
^
C:\tudatBundle\tudat\Tudat\Astrodynamics\Aerodynamics\UnitTests\unitTestAerodynamicCoefficientsFromFile.cpp:319:20: warning: unused variable 'bankAngle' [-Wunused-variable]
double bankAngle = variableIterator->second( 3 );
^
C:\tudatBundle\tudat\Tudat\Astrodynamics\Aerodynamics\UnitTests\unitTestAerodynamicCoefficientsFromFile.cpp:327:29: warning: variable 'momentCoefficients' set but not used [-Wunused-but-set-variable]
Eigen::Vector3d momentCoefficients = variableIterator->second.segment( 4 + parameterAddition, 3 );
^
C:\tudatBundle\tudat\Tudat\Astrodynamics\Aerodynamics\UnitTests\unitTestAerodynamicCoefficientsFromFile.cpp:328:29: warning: variable 'forceCoefficients' set but not used [-Wunused-but-set-variable]
Eigen::Vector3d forceCoefficients = variableIterator->second.segment( 7 + parameterAddition, 3 );
^
C:\tudatBundle\tudat\Tudat\Astrodynamics\Aerodynamics\UnitTests\unitTestAerodynamicCoefficientsFromFile.cpp:343:29: warning: variable 'computedForceCoefficients' set but not used [-Wunused-but-set-variable]
Eigen::Vector3d computedForceCoefficients = apolloCoefficientInterface->getCurrentForceCoefficients( );
^
C:\tudatBundle\tudat\Tudat\Astrodynamics\Aerodynamics\UnitTests\unitTestAerodynamicCoefficientsFromFile.cpp:344:29: warning: variable 'computedMomentCoefficients' set but not used [-Wunused-but-set-variable]
Eigen::Vector3d computedMomentCoefficients = apolloCoefficientInterface->getCurrentMomentCoefficients( );
^
C:\tudatBundle\tudat\Tudat\Astrodynamics\Aerodynamics\UnitTests\unitTestAerodynamicCoefficientsFromFile.cpp:370:20: warning: unused variable 'directCl' [-Wunused-variable]
double directCl = clInterpolator->interpolate( aerodynamicCoefficientInput );
^
C:\tudatBundle\tudat\Tudat\Astrodynamics\Aerodynamics\UnitTests\unitTestAerodynamicCoefficientsFromFile.cpp:404:29: warning: variable 'computedPerturbedMomentCoefficients' set but not used [-Wunused-but-set-variable]
Eigen::Vector3d computedPerturbedMomentCoefficients = apolloCoefficientInterface->getCurrentMomentCoefficients( );
^
[ 90%] Linking CXX executable C:\tudatBundle\tudat\bin\unit_tests\test_AerodynamicCoefficientsFromFile.exe
[ 90%] Built target test_AerodynamicCoefficientsFromFile
Scanning dependencies of target test_AerodynamicsNamespace
[ 90%] Building CXX object tudat/Tudat/Astrodynamics/Aerodynamics/CMakeFiles/test_AerodynamicsNamespace.dir/UnitTests/unitTestAerodynamicsNamespace.cpp.obj
[ 90%] Linking CXX executable C:\tudatBundle\tudat\bin\unit_tests\test_AerodynamicsNamespace.exe
C:/PROGRA2/Qt/Tools/MINGW41/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x39): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
tudat\Tudat\Astrodynamics\Aerodynamics\CMakeFiles\test_AerodynamicsNamespace.dir\build.make:102: recipe for target 'C:/tudatBundle/tudat/bin/unit_tests/test_AerodynamicsNamespace.exe' failed
mingw32-make.exe[2]: *** [C:/tudatBundle/tudat/bin/unit_tests/test_AerodynamicsNamespace.exe] Error 1
CMakeFiles\Makefile2:395: recipe for target 'tudat/Tudat/Astrodynamics/Aerodynamics/CMakeFiles/test_AerodynamicsNamespace.dir/all' failed
mingw32-make.exe[1]: *** [tudat/Tudat/Astrodynamics/Aerodynamics/CMakeFiles/test_AerodynamicsNamespace.dir/all] Error 2
makefile:139: recipe for target 'all' failed
mingw32-make.exe: *** [all] Error 2
18:07:42: The process "C:\Program Files (x86)\CMake\bin\cmake.exe" exited with code 2.
Error while building/deploying project TudatBundle (kit: Desktop)
When executing step "Make"
18:07:42: Elapsed time: 02:20.

@DominicDirkx
Copy link
Member

Ok, the problem seems to be that the

#define BOOST_TEST_MAIN

line is not parsed correctly. This line should provide the executable with a main function from which to start running the unit tests. Replacing the boost framework with a main function fixes the linking error, so your setup is not inherently incapable of compiling a main function.

The issue may be the path in which your compiler/libraries are stored. My advice would be to follow Jacco's advice, uninstall Qt, and reinstall it in C:/. Try this and reopen the Tudat using the newly installed Qt. If it doesn't run, please attach the same screenshots as before.

@ifodde
Copy link
Contributor

ifodde commented Feb 16, 2017

Should I also redo the steps you suggested? Thus uncomment and put the text back?

@DominicDirkx
Copy link
Member

Yes, indeed, uncomment the CMakeLists.txt and replace the original contents of unit test file.

@ifodde
Copy link
Contributor

ifodde commented Feb 16, 2017

I got this error because now the Qt path has changed, is there a way to solve this?

Running Windows Runtime device detection.
No winrtrunner.exe found.
Running "C:\Program Files (x86)\CMake\bin\cmake.exe C:/tudatBundle "-GCodeBlocks - MinGW Makefiles" "-DCMAKE_CXX_COMPILER:STRING=C:/Program Files (x86)/Qt/Tools/mingw492_32/bin/g++.exe" "-DCMAKE_C_COMPILER:STRING=C:/Program Files (x86)/Qt/Tools/mingw492_32/bin/gcc.exe" "-DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}" "-DQT_QMAKE_EXECUTABLE:STRING="" in C:\build-tudatBundle-Desktop-Default.
CMake Error at CMakeLists.txt:14 (project):
The CMAKE_C_COMPILER:

C:/Program Files (x86)/Qt/Tools/mingw492_32/bin/gcc.exe

is not a full path to an existing compiler tool.

Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.

CMake Error at CMakeLists.txt:14 (project):
The CMAKE_CXX_COMPILER:

C:/Program Files (x86)/Qt/Tools/mingw492_32/bin/g++.exe

is not a full path to an existing compiler tool.

Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!
See also "C:/build-tudatBundle-Desktop-Default/CMakeFiles/CMakeOutput.log".
*** cmake process exited with exit code 1.

@DominicDirkx
Copy link
Member

Yes, in your build-tudatBundle... folder there should be a CMakeCache.txt file. Close qt, delete it, and reopen Qt and Tudat.

If it doesnt work, please attach the output again and new versions of the screenshots you attached earlier.

@magnific0
Copy link
Member

magnific0 commented Feb 16, 2017

@DominicDirkx I ended the build before it finished, but this was the log up till that point. As I mentioned, the errors are different from the ones reported here, however the build ran fine before moving Qt into Program Files.
buildlog.txt

The errors occur at 84%.

@ifodde
Copy link
Contributor

ifodde commented Feb 17, 2017

Unfortunately it didn't work.
Here is the output and the screenshots again
error_qt.txt
kit_2
projects_2

@DominicDirkx
Copy link
Member

Ok, if you bring your laptop this afternoon, I'll try to find a few minutes to have a look.

@TommyKranen
Copy link

I had a similar error occurring right around 90%, I also installed Qt inC:\Program File\Qt.
After completely removing Qt and its associated files, re-installing in C:\Qt, the build completed successfully!

@DominicDirkx
Copy link
Member

DominicDirkx commented Feb 17, 2017

Ok, so to summarize.

This problem is caused by Qt being installed in the Program Files directory in Windows

The solution is:

  • Uninstall Qt
  • Delete the CMakeLists.txt.user file in your tudat bundle
  • Delete the build-tudatBundle..... directory (which is in the same folder as your tudat bundle)
  • Reinstall Qt in C:/ (installing in C:/Users//Qt also seems to work. Just make sure does not contain any spaces or special characters. Thanks to @Rimsky for testing it)
  • Continue the installation from http://tudat.tudelft.nl/projects/tudat/wiki/Configure_And_build_Tudat_libraries

@DominicDirkx DominicDirkx changed the title Error while building libraries Installing Qt in Program files directory Feb 17, 2017
@magnific0
Copy link
Member

A warning (added by @DominicDirkx, styled by me) now explicitly states in the Windows installation manual:
http://tudat.tudelft.nl/projects/tudat/wiki/Install_on_Windows#Step-3-Set-installation-directory

I'm closing this issue. @DominicDirkx feel free to reopen in case you want to increase the visibility of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants