Project

General

Profile

Bug #11839

Jsonschema fails to validate noiseprofiles.json during build

Added by R - over 1 year ago. Updated over 1 year ago.

Status:
Fixed
Priority:
Low
Assignee:
-
Category:
Buildsystem
Target version:
Start date:
11/30/2017
Due date:
% Done:

100%

Affected Version:
git master branch
System:
other GNU/Linux
bitness:
64-bit
hardware architecture:
amd64/x86

Description

usage: jsonschema [-h] [-i INSTANCES] [-F ERROR_FORMAT] [-V VALIDATOR] schema
jsonschema: error: argument -i/--instance: invalid _json_file value: '/tmp/makepkg/darktable-git/src/darktable/data/noiseprofiles.json'
make[2]: *** [data/CMakeFiles/validate_noiseprofiles_json.dir/build.make:59: data/CMakeFiles/validate_noiseprofiles_json] Error 2
make[1]: *** [CMakeFiles/Makefile2:7762: data/CMakeFiles/validate_noiseprofiles_json.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

My localization variables are:
LANG=en_US.UTF-8
LANGUAGE=en_US

The culprit seems to be a change made in 595f4d614f. Reverting that commit allows the build to succeed (Cmake 3.10.0)

diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 545777957..e71929096 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -108,7 +108,7 @@ install(FILES gdb_commands DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/darktable CO
 if(${VALIDATE_JSON})
   add_custom_target(
     validate_noiseprofiles_json ALL
-    COMMAND ${CMAKE_COMMAND} -E env LANG=C.UTF-8 LC_ALL=C.UTF-8 ${jsonschema_BIN} -i ${CMAKE_CURRENT_SOURCE_DIR}/noiseprofiles.json ${CMAKE_CURRENT_SOURCE_DIR}/noiseprofiles.schema
+    COMMAND ${jsonschema_BIN} -i ${CMAKE_CURRENT_SOURCE_DIR}/noiseprofiles.json ${CMAKE_CURRENT_SOURCE_DIR}/noiseprofiles.schema
     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/noiseprofiles.json ${CMAKE_CURRENT_SOURCE_DIR}/noiseprofiles.schema
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
     COMMENT "Checking validity of noiseprofiles.json" 

Associated revisions

Revision 0cbcb91c
Added by Roman Lebedev over 1 year ago

Revert "Revert "Revert "CMake: set LC_ALL too when running jsonschema". Fixes #11464""

Fixes #11839.

This reverts commit de499ce0a7ce2a242c74ed91cd76c3b62d24611c.
This reverts commit 595f4d614f602be905df3a596a04c7f33c9ae2fd.

History

#1 Updated by Roman Lebedev over 1 year ago

R - wrote:

[...]

My localization variables are:
LANG=en_US.UTF-8
LANGUAGE=en_US

The culprit seems to be a change made in 595f4d614f. Reverting that commit allows the build to succeed (Cmake 3.10.0)
[...]

Perhaps your system somehow does not have C.UTF-8?

#2 Updated by R - over 1 year ago

Roman Lebedev wrote:

R - wrote:

[...]

My localization variables are:
LANG=en_US.UTF-8
LANGUAGE=en_US

The culprit seems to be a change made in 595f4d614f. Reverting that commit allows the build to succeed (Cmake 3.10.0)
[...]

Perhaps your system somehow does not have C.UTF-8?

My distribution is Archlinux which doesn't seem to have a C.UTF-8 locale. At least one google result pointed to the possibility that it specific to debian flavors of distributions?
https://github.com/commercialhaskell/stack/issues/856

#3 Updated by Roman Lebedev over 1 year ago

  • % Done changed from 0 to 100
  • Status changed from New to Fixed

#4 Updated by Roman Lebedev over 1 year ago

  • Target version set to 2.4.0

Also available in: Atom PDF