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

Qfield Build #4347

Closed
SI-Lab opened this issue Jun 6, 2023 · 19 comments
Closed

Qfield Build #4347

SI-Lab opened this issue Jun 6, 2023 · 19 comments
Labels

Comments

@SI-Lab
Copy link

SI-Lab commented Jun 6, 2023

Describe the issue

Hello Team,
I am compiling Qfield 2.7.6 using Cmake. On reaching qgis:x64-windows dependency file, I got these errors
CMake Warning at scripts/cmake/vcpkg_configure_cmake.cmake:380 (message):
The following variables are not used in CMakeLists.txt:
PYRCC_PROGRAM
PYTHON_LIBRARY
PYUIC_PROGRAM
QSCINTILLA_LIBRARY

How do I solve this error? Thank you..]

Reproduction steps

Steps to reproduce the behavior:

  1. Start cmake 3.2.6
  2. Load source file 2.7.6
  3. Compiling till qgis:x64 file then crash

Expected behavior

[A clear and concise description of what you expected to happen.]

Observed behavior

The following variables are not used in CMakeLists.txt:
PYRCC_PROGRAM
PYTHON_LIBRARY
PYUIC_PROGRAM
QSCINTILLA_LIBRARY

Screenshots and GIFs

[If applicable, add screenshots and GIFs to help explain your problem.]

[Please also attach additional files if a specific project/dataset is useful to investigate the problem.]

Desktop (please complete the following information)

  • OS: Windows 11
  • QGIS Qfield 2.7.6
  • QFieldSync Version [e.g.4.0.0]

Mobile (please complete the following information)

  • Device: [e.g. iPhone6]
  • OS: [e.g. Android 11]
  • QField version: [Enter QField version here including build number found in the about screen after the release name example 2.0.0 (10200993)]

Additional information

  • Problem started happening recently, didn't happen in an older version of QField: [Yes/No]
  • Problem can be reliably reproduced, doesn't happen randomly: [Yes/No]
  • Problem happens with all files and projects, not only some files or projects: [Yes/No]

[If the problem happened with QFieldCloud, please add your username and project name.]

@m-kuhn
Copy link
Member

m-kuhn commented Jun 6, 2023

Supported steps to compile for windows are here. Did you follow these?

https://github.com/opengisch/QField/blob/master/doc/dev.md#windows

@m-kuhn m-kuhn added the feedback label Jun 6, 2023
@SI-Lab
Copy link
Author

SI-Lab commented Jun 7, 2023

Supported steps to compile for windows are here. Did you follow these?

https://github.com/opengisch/QField/blob/master/doc/dev.md#windows

Thank you for the reply.

Yes I followed the listed steps for windows

@m-kuhn
Copy link
Member

m-kuhn commented Jun 7, 2023

The abovementioned output in observed behavior are warnings. Do you have an error message?

@m-kuhn
Copy link
Member

m-kuhn commented Jun 7, 2023

Actually it looks like you are building for x64-windows whereas the docs mention x64-windows-static, or am I missing something here?

@SI-Lab
Copy link
Author

SI-Lab commented Jun 7, 2023

Below are the 5 errors

D:\Build\Qfield8_deps\vcpkg-src\buildtrees\qgis\src\fce5ac5a83-3289c70339.clean\src\core\qgstessellator.cpp(25,10): fatal error C1083: Cannot open include file: 'poly2tri.h': No such file or directory [D:\Build\Qfield8_deps\vcpkg-src\buildtrees\qgis\x64-windows-rel\src\core\qgis_core.vcxproj]
D:\Build\Qfield8_deps\vcpkg-src\buildtrees\qgis\src\fce5ac5a83-3289c70339.clean\src\core\mesh\qgsmesheditor.cpp(26,10): fatal error C1083: Cannot open include file: 'poly2tri.h': No such file or directory [D:\Build\Qfield8_deps\vcpkg-src\buildtrees\qgis\x64-windows-rel\src\core\qgis_core.vcxproj]
D:\Build\Qfield8_deps\vcpkg-src\buildtrees\qgis\src\fce5ac5a83-3289c70339.clean\src\core\mesh\qgstopologicalmesh.cpp(23,10): fatal error C1083: Cannot open include file: 'poly2tri.h': No such file or directory [D:\Build\Qfield8_deps\vcpkg-src\buildtrees\qgis\x64-windows-rel\src\core\qgis_core.vcxproj]
D:\Build\Qfield8_deps\vcpkg-src\buildtrees\qgis\src\fce5ac5a83-3289c70339.clean\src\core\mesh\qgsmeshadvancedediting.cpp(20,10): fatal error C1083: Cannot open include file: 'poly2tri.h': No such file or directory [D:\Build\Qfield8_deps\vcpkg-src\buildtrees\qgis\x64-windows-rel\src\core\qgis_core.vcxproj]
D:\Build\Qfield8_deps\vcpkg-src\buildtrees\qgis\src\fce5ac5a83-3289c70339.clean\src\core\mesh\qgsmeshforcebypolylines.cpp(20,10): fatal error C1083: Cannot open include file: 'poly2tri.h': No such file or directory [D:\Build\Qfield8_deps\vcpkg-src\buildtrees\qgis\x64-windows-rel\src\core\qgis_core.vcxproj]

33 Warning(s)
5 Error(s)

Time Elapsed 00:44:36.50

@SI-Lab
Copy link
Author

SI-Lab commented Jun 7, 2023

Cannot open include file: 'poly2tri.h': No such file or directory

Qfield error

@m-kuhn
Copy link
Member

m-kuhn commented Jun 7, 2023

It seems you are building for x64-windows whereas the instructions mention x64-windows-static, am I missing something?

@SI-Lab
Copy link
Author

SI-Lab commented Jun 7, 2023

Oooh

Kindly, where do I change from x64-windows to x64-windows-static?

Thank you.

@m-kuhn
Copy link
Member

m-kuhn commented Jun 7, 2023

If you follow the steps in the windows section on https://github.com/opengisch/QField/blob/master/doc/dev.md it should be static

@SI-Lab
Copy link
Author

SI-Lab commented Jun 8, 2023

If you follow the steps in the windows section on https://github.com/opengisch/QField/blob/master/doc/dev.md it should be static

Even after declaring VCPKG_TARGET_TRIPLET=x64-windows-static on windows environment, I still get the same error.

@m-kuhn
Copy link
Member

m-kuhn commented Jun 8, 2023

The best information you will get is probably in the log file that is mentioned in your screenshot #4347 (comment)

@SI-Lab
Copy link
Author

SI-Lab commented Jun 9, 2023

The best information you will get is probably in the log file that is mentioned in your screenshot #4347 (comment)

Happy to inform you that I managed to compile and have qfield.sln file. Now while building on VS 2019, I got these repeated error LNK2038. Kindly help.

Errorlnk2038

@m-kuhn
Copy link
Member

m-kuhn commented Jun 9, 2023

I never work with VS and just build on the console.

It's almost certainly related to the following line from the dev doc

CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded\$<\$<CONFIG:Debug>:Debug>

Do you have any suggestions to improve the windows build doc?

@SI-Lab
Copy link
Author

SI-Lab commented Jun 12, 2023

I never work with VS and just build on the console.

It's almost certainly related to the following line from the dev doc

CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded\$<\$<CONFIG:Debug>:Debug>

Do you have any suggestions to improve the windows build doc?

I realize that i will end up with .exe for windows while what i need is .apk. Started all over again for Android(Android Sdk/Qt/Cmake).
After doing all the required setups,Cmake give libpg dependency error.How do i solve it on windows platform? Thank you.
libpq

@m-kuhn
Copy link
Member

m-kuhn commented Jun 12, 2023

Do you have any suggestions to improve the windows build doc?

Please let me kindly re-raise this question. This is a community where everyone helps each other and your feedback is valuable!

@SI-Lab
Copy link
Author

SI-Lab commented Jun 12, 2023

Do you have any suggestions to improve the windows build doc?

Please let me kindly re-raise this question. This is a community where everyone helps each other and your feedback is valuable!

I followed microsoft/vcpkg#30327

It worked.

@m-kuhn
Copy link
Member

m-kuhn commented Jun 18, 2023

Good!
Is there something useful we should add to the windows build instructions in doc/dev?

@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2023

The QField project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue.
In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue.
If there is no further activity on this issue, it will be closed in a week.

@github-actions github-actions bot added the stale label Jul 3, 2023
@nirvn
Copy link
Member

nirvn commented Jul 9, 2023

Closing this now. @SI-Lab , if what made it work for you is relevant to others, please consider adding details in the windows build instruction documentation (https://github.com/opengisch/QField/blob/master/doc/dev.md).

@nirvn nirvn closed this as completed Jul 9, 2023
@github-actions github-actions bot removed the stale label Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants