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

Build jsonschemabuilder for all platforms from source #23419

Merged
merged 4 commits into from Jun 23, 2023

Conversation

fuzzard
Copy link
Contributor

@fuzzard fuzzard commented Jun 19, 2023

Description

Build jsonschemabuilder from source for all platforms

Motivation and context

Less prebuilt windows dependencies. Its a one source file program, so building in tree always is a minimal time add.

How has this been tested?

Jenkins

What is the effect on users?

N/A

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

@fuzzard fuzzard added this to the Omega 21.0 Alpha 3 milestone Jun 19, 2023
@jenkins4kodi jenkins4kodi added the Rebase needed PR that does not apply/merge cleanly to current base branch label Jun 20, 2023
fuzzard added 4 commits June 20, 2023 14:54
copy CMakeLists.txt and readme/license to src folder
Update CMakeLists.txt to be located in src folder. Add c++17 standard
…S macro

In the event we dont have/need a VERSION file to exist, we can skip the use of it
Update FindJsonSchemaBuilder.cmake to build in tree for all platforms.
JsonSchemaBuilder doesnt have versioning, but its a single file build, so just build always
unless WITH_JSONSCHEMABUILDER is provided
@fuzzard fuzzard force-pushed the cmake_jsonschemabuilderupdate branch from 5ef4167 to 0a8e90d Compare June 20, 2023 04:54
@jenkins4kodi jenkins4kodi removed the Rebase needed PR that does not apply/merge cleanly to current base branch label Jun 20, 2023
@basilgello
Copy link
Collaborator

This will probably work on Linux since we don't ship it.

@fuzzard fuzzard merged commit 1bb5fee into xbmc:master Jun 23, 2023
2 checks passed
@fuzzard fuzzard deleted the cmake_jsonschemabuilderupdate branch June 23, 2023 00:12
@MediaBrasil
Copy link

@fuzzard

Please when I run buildsetup win x64

I receive this message error

Have one tip how I solve, please

-- Configuring incomplete, errors occurred!
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): e
rror MSB8066: Custom build for 'C:\xbmc_omega\kodi-build.x64\CMakeFiles\8dbac698ecefa7b2f1417bbce9142d36\JsonSchemaBuil
der-mkdir.rule;C:\xbmc_omega\kodi-build.x64\CMakeFiles\8dbac698ecefa7b2f1417bbce9142d36\JsonSchemaBuilder-download.rule
;C:\xbmc_omega\kodi-build.x64\CMakeFiles\8dbac698ecefa7b2f1417bbce9142d36\JsonSchemaBuilder-update.rule;C:\xbmc_omega\k
odi-build.x64\CMakeFiles\8dbac698ecefa7b2f1417bbce9142d36\JsonSchemaBuilder-patch.rule;C:\xbmc_omega\kodi-build.x64\CMa
keFiles\8dbac698ecefa7b2f1417bbce9142d36\JsonSchemaBuilder-configure.rule;C:\xbmc_omega\kodi-build.x64\CMakeFiles\8dbac
698ecefa7b2f1417bbce9142d36\JsonSchemaBuilder-build.rule;C:\xbmc_omega\kodi-build.x64\CMakeFiles\8dbac698ecefa7b2f1417b
bce9142d36\JsonSchemaBuilder-install.rule;C:\xbmc_omega\kodi-build.x64\CMakeFiles\aef7ff1d23731aa4dc75a168f2cd29f5\Json
SchemaBuilder-complete.rule;C:\xbmc_omega\kodi-build.x64\CMakeFiles\46b16891b65497034a41d48277f68d02\JsonSchemaBuilder.
rule;C:\xbmc_omega\CMakeLists.txt' exited with code 1. [C:\xbmc_omega\kodi-build.x64\JsonSchemaBuilder.vcxproj]
Creating directories for 'libdvdcss'

@thexai
Copy link
Member

thexai commented Jul 1, 2023

@MediaBrasil
Works fine but you need clean, download, and rebuild Windows dependencies:

  • delete kodi\project\BuildDependencies\x64 folder
  • run kodi\tools\buildsteps\windows\x64\download-dependencies.bat
  • run BuildSetup.bat

@MediaBrasil
Copy link

@thexai,

All new by zero, same error, and I noticed one error before cmake, but it's installed and worked before

" CMake Error at CMakeLists.txt:2 (project):
No CMAKE_CXX_COMPILER could be found.""

-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_C_COMPILER could be found.

-- Configuring incomplete, errors occurred!
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): e
rror MSB8066: Custom build for 'G:\xbmcomeganew\kodi-build.x64\CMakeFiles\e0850d7bc02f8c425d853e649ea98c51\JsonSchemaBu
ilder-mkdir.rule;G:\xbmcomeganew\kodi-build.x64\CMakeFiles\e0850d7bc02f8c425d853e649ea98c51\JsonSchemaBuilder-download.
rule;G:\xbmcomeganew\kodi-build.x64\CMakeFiles\e0850d7bc02f8c425d853e649ea98c51\JsonSchemaBuilder-update.rule;G:\xbmcom
eganew\kodi-build.x64\CMakeFiles\e0850d7bc02f8c425d853e649ea98c51\JsonSchemaBuilder-patch.rule;G:\xbmcomeganew\kodi-bui
ld.x64\CMakeFiles\e0850d7bc02f8c425d853e649ea98c51\JsonSchemaBuilder-configure.rule;G:\xbmcomeganew\kodi-build.x64\CMak
eFiles\e0850d7bc02f8c425d853e649ea98c51\JsonSchemaBuilder-build.rule;G:\xbmcomeganew\kodi-build.x64\CMakeFiles\e0850d7b
c02f8c425d853e649ea98c51\JsonSchemaBuilder-install.rule;G:\xbmcomeganew\kodi-build.x64\CMakeFiles\76973b8cafed5c2eb1cf4
269bde3657b\JsonSchemaBuilder-complete.rule;G:\xbmcomeganew\kodi-build.x64\CMakeFiles\c9d8234ac857c9aa1db3277f8d3acfaf
JsonSchemaBuilder.rule;G:\xbmcomeganew\CMakeLists.txt' exited with code 1. [G:\xbmcomeganew\kodi-build.x64\JsonSchemaBuilder.vcxproj]

@MediaBrasil
Copy link

here a few more about it

-- Build files have been written to: G:/xbmcomeganew/kodi-build.x64
MSBuild version 17.4.1+9a89d02ff for .NET Framework
Checking Build System
Performing configure step for 'JsonSchemaBuilder'
CUSTOMBUILD : CMake warning : [G:\xbmcomeganew\kodi-build.x64\JsonSchemaBuilder.vcxproj]
Ignoring extra path from command line:

 "G:/xbmcomeganew/project/BuildDependencies/mingwlibs/x64"

CUSTOMBUILD : CMake warning : [G:\xbmcomeganew\kodi-build.x64\JsonSchemaBuilder.vcxproj]
Ignoring extra path from command line:

 "G:/xbmcomeganew/project/BuildDependencies/mingwlibs/x64"

-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.25393.
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_C_COMPILER could be found.

@fuzzard
Copy link
Contributor Author

fuzzard commented Jul 1, 2023

None of those errors have anything to do with this change. The error is it can't find a correct compiler. Use a developer command prompt or set appropriate env cars for target

@MediaBrasil
Copy link

@fuzzard

Thanks for explain, have one simple way to fix it, I never set env cars before,

Uninstall and install cmake work?

@thexai
Copy link
Member

thexai commented Jul 2, 2023

@MediaBrasil

Make sure you have vswhere.exe in this path:

C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe

if not you may fix editing location here:

SET vswhere="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"

Maybe you have Visual Studio installed in custom location, etc.

@MediaBrasil
Copy link

@thexai

Thanks, checked and all is correct, default place. and vswhere.exe is in the correct place.
Work fine compiling nexus, no prob at all, created all zero, and all steps work ok.
When I try Omega I have the issues, and the dependencies are all fine. Probably is another issue.
I have Teamviewer, if you have time to check
ID 808 213 857- Password wgm4q2k7, maybe you find where is the trouble.

Appreciate your time and info about it

@MediaBrasil
Copy link

All is fine now, I remove visual studio and reinstall all, solving the issue.

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

Successfully merging this pull request may close these issues.

None yet

5 participants