Flutter / Dart Error: The argument type 'Null Function(Key)' can't be assigned to the parameter type 'void Function(Object)' - android-studio

Android Studio: Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Compiler message:
/Users/[User]/.pub-cache/hosted/pub.dartlang.org/reorderables-0.2.12/lib/src/widgets/reorderable_flex.dart:727:18: Error: The argument type 'Null Function(Key)' can't be assigned to the parameter type 'void Function(Object)'.
- 'Key' is from 'package:flutter/src/foundation/key.dart' ('/Users/[User]/Development/flutter/packages/flutter/lib/src/foundation/key.dart').
- 'Object' is from 'dart:core'.
onLeave: (Key leaving) {},
^
/Users/[User]/.pub-cache/hosted/pub.dartlang.org/reorderables-0.2.12/lib/src/widgets/reorderable_wrap.dart:951:18: Error: The argument type 'Null Function(int)' can't be assigned to the parameter type 'void Function(Object)'.
- 'Object' is from 'dart:core'.
onLeave: (int leaving) {},
^
/Users/[User]/.pub-cache/hosted/pub.dartlang.org/reorderables-0.2.12/lib/src/widgets/reorderable_wrap.dart:957:18: Error: The argument type 'Null Function(int)' can't be assigned to the parameter type 'void Function(Object)'.
- 'Object' is from 'dart:core'.
onLeave: (int leaving) {},
^
/Users/[User]/.pub-cache/hosted/pub.dartlang.org/reorderables-0.2.12/lib/src/widgets/reorderable_sliver.dart:842:18: Error: The argument type 'Null Function(int)' can't be assigned to the parameter type 'void Function(Object)'.
- 'Object' is from 'dart:core'.
onLeave: (int leaving) {},
^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
Failed to build bundle.
Error launching application on iPhone 11 Pro Max.
Can't get an answer to pass trough this issue, any help will be greatly appreciated ☃

Answered by Simon Binder via dart-lang/TALK-general:
This is an error in the reorderables package, which you probably depend on. A report and workaround is here: hanshengchiu/reorderables#52
Change in pubspec.yaml:
# reorderables: ^0.2.12
reorderables:
git:
url: git://github.com/hanshengchiu/reorderables.git

Related

Error when trying to upload G-Cloud-Function

i got a problem when uploading my Cloud-Functions to Firebase.
Using Typescript i need to do some XML-Parsing and therefore i need a package called xmldom-ts, but it shows me this abstract error:
tsc
node_modules/typescript/lib/lib.dom.d.ts:6059:11 - error TS2320: Interface 'HTMLAnchorElement' cannot simultaneously extend types 'HTMLElement' and 'HTMLHyperlinkElementUtils'.
Named property 'toString' of types 'HTMLElement' and 'HTMLHyperlinkElementUtils' are not identical.
6059 interface HTMLAnchorElement extends HTMLElement, HTMLHyperlinkElementUtils {
~~~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:6168:11 - error TS2320: Interface 'HTMLAreaElement' cannot simultaneously extend types 'HTMLElement' and 'HTMLHyperlinkElementUtils'.
Named property 'toString' of types 'HTMLElement' and 'HTMLHyperlinkElementUtils' are not identical.
6168 interface HTMLAreaElement extends HTMLElement, HTMLHyperlinkElementUtils {
~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/document.d.ts:24:5 - error TS2416: Property 'createElement' in type 'DocumentImpl' is not assignable to the same property in base type 'DummyDocument'.
Type '(tagName: string) => ElementImpl' is not assignable to type '(_tagName: string) => HTMLElement'.
Property 'autofocus' is missing in type 'ElementImpl' but required in type 'HTMLElement'.
24 createElement(tagName: string): ElementImpl;
~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:7989:5
7989 autofocus: boolean;
~~~~~~~~~
'autofocus' is declared here.
node_modules/xmldom-ts/dist/types/document.d.ts:25:5 - error TS2416: Property 'createDocumentFragment' in type 'DocumentImpl' is not assignable to the same property in base type 'DummyDocument'.
Type '() => DocumentFragmentImpl' is not assignable to type '() => DocumentFragment'.
Call signature return types 'DocumentFragmentImpl' and 'DocumentFragment' are incompatible.
The types of 'previousSibling' are incompatible between these types.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
25 createDocumentFragment(): DocumentFragmentImpl;
~~~~~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/document.d.ts:26:5 - error TS2416: Property 'createTextNode' in type 'DocumentImpl' is not assignable to the same property in base type 'DummyDocument'.
Type '(data: string) => TextImpl' is not assignable to type '(_data: string) => Text'.
Call signature return types 'TextImpl' and 'Text' are incompatible.
The types of 'previousSibling' are incompatible between these types.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
26 createTextNode(data: string): TextImpl;
~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/document.d.ts:27:5 - error TS2416: Property 'createComment' in type 'DocumentImpl' is not assignable to the same property in base type 'DummyDocument'.
Type '(data: string) => CommentImpl' is not assignable to type '(_data: string) => Comment'.
Call signature return types 'CommentImpl' and 'Comment' are incompatible.
The types of 'previousSibling' are incompatible between these types.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
27 createComment(data: string): CommentImpl;
~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/document.d.ts:28:5 - error TS2416: Property 'createCDATASection' in type 'DocumentImpl' is not assignable to the same property in base type 'DummyDocument'.
Type '(data: string) => CDATASectionImpl' is not assignable to type '(_data: string) => CDATASection'.
Call signature return types 'CDATASectionImpl' and 'CDATASection' are incompatible.
The types of 'previousSibling' are incompatible between these types.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
28 createCDATASection(data: string): CDATASectionImpl;
~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/document.d.ts:29:5 - error TS2416: Property 'createProcessingInstruction' in type 'DocumentImpl' is not assignable to the same property in base type 'DummyDocument'.
Type '(target: string, data: string) => ProcessingInstructionImpl' is not assignable to type '(_target: string, _data: string) => ProcessingInstruction'.
Property 'sheet' is missing in type 'ProcessingInstructionImpl' but required in type 'ProcessingInstruction'.
29 createProcessingInstruction(target: string, data: string): ProcessingInstructionImpl;
~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:9677:14
9677 readonly sheet: CSSStyleSheet | null;
~~~~~
'sheet' is declared here.
node_modules/xmldom-ts/dist/types/document.d.ts:30:5 - error TS2416: Property 'createAttribute' in type 'DocumentImpl' is not assignable to the same property in base type 'DummyDocument'.
Type '(name: string) => AttrImpl' is not assignable to type '(_name: string) => Attr'.
Call signature return types 'AttrImpl' and 'Attr' are incompatible.
The types of 'previousSibling' are incompatible between these types.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
30 createAttribute(name: string): AttrImpl;
~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/document.d.ts:31:5 - error TS2416: Property 'createEntityReference' in type 'DocumentImpl' is not assignable to the same property in base type 'DummyDocument'.
Type '(name: string) => EntityReferenceImpl' is not assignable to type '(_name: string) => Node'.
Call signature return types 'EntityReferenceImpl' and 'Node' are incompatible.
The types of 'previousSibling' are incompatible between these types.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
31 createEntityReference(name: string): EntityReferenceImpl;
~~~~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/document.d.ts:33:5 - error TS2416: Property 'createAttributeNS' in type 'DocumentImpl' is not assignable to the same property in base type 'DummyDocument'.
Type '(namespaceURI: string, qualifiedName: string) => AttrImpl' is not assignable to type '(_namespaceURI: string, _qualifiedName: string) => Attr'.
Type 'AttrImpl' is not assignable to type 'Attr'.
33 createAttributeNS(namespaceURI: string, qualifiedName: string): AttrImpl;
~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dom-implementation.d.ts:12:5 - error TS2416: Property 'createDocument' in type 'DOMImplementationImpl' is not assignable to the same property in base type 'DummyDOMIMplementation'.
Type '(namespaceURI: string | null, qualifiedName: string | null, doctype: DocumentType | null) => DocumentImpl' is not assignable to type '(_namespaceURI: string | null, _qualifiedName: string | null, _doctype: DocumentType | null) => Document'.
Call signature return types 'DocumentImpl' and 'Document' are incompatible.
The types of 'defaultView' are incompatible between these types.
Type 'Window | null' is not assignable to type '(Window & typeof globalThis) | null'.
Type 'Window' is not assignable to type 'Window & typeof globalThis'.
Type 'Window' is not assignable to type 'typeof globalThis'.
12 createDocument(namespaceURI: string | null, qualifiedName: string | null, doctype: DocumentType | null): DocumentImpl;
~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dom-implementation.d.ts:13:5 - error TS2416: Property 'createDocumentType' in type 'DOMImplementationImpl' is not assignable to the same property in base type 'DummyDOMIMplementation'.
Type '(qualifiedName: string, publicId: string, systemId: string) => DocumentTypeImpl' is not assignable to type '(_qualifiedName: string, _publicId: string, _systemId: string) => DocumentType'.
Call signature return types 'DocumentTypeImpl' and 'DocumentType' are incompatible.
The types of 'previousSibling' are incompatible between these types.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
13 createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentTypeImpl;
~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-attr.d.ts:3:31 - error TS2420: Class 'DummyAttr' incorrectly implements interface 'Attr'.
Types of property 'previousSibling' are incompatible.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
3 export declare abstract class DummyAttr extends NodeImpl implements Attr {
~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-cdata-section.d.ts:3:22 - error TS2420: Class 'DummyCDATASection' incorrectly implements interface 'CDATASection'.
Types of property 'previousSibling' are incompatible.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
3 export declare class DummyCDATASection extends CharacterDataImpl implements CDATASection {
~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-character-data.d.ts:3:31 - error TS2420: Class 'DummyCharacterData' incorrectly implements interface 'CharacterData'.
Types of property 'previousSibling' are incompatible.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
3 export declare abstract class DummyCharacterData extends NodeImpl implements CharacterData {
~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-comment.d.ts:3:22 - error TS2420: Class 'DummyComment' incorrectly implements interface 'Comment'.
Types of property 'previousSibling' are incompatible.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
3 export declare class DummyComment extends CharacterDataImpl implements Comment {
~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-document-fragment.d.ts:3:22 - error TS2420: Class 'DummyDocumentFragment' incorrectly implements interface 'DocumentFragment'.
Types of property 'previousSibling' are incompatible.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
3 export declare class DummyDocumentFragment extends NodeImpl implements DocumentFragment {
~~~~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-document-type.d.ts:3:22 - error TS2420: Class 'DummyDocumentType' incorrectly implements interface 'DocumentType'.
Types of property 'previousSibling' are incompatible.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
3 export declare class DummyDocumentType extends NodeImpl implements DocumentType {
~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-document.d.ts:126:14 - error TS2416: Property 'defaultView' in type 'DummyDocument' is not assignable to the same property in base type 'Document'.
Type 'Window | null' is not assignable to type '(Window & typeof globalThis) | null'.
Type 'Window' is not assignable to type 'Window & typeof globalThis'.
Type 'Window' is missing the following properties from type 'typeof globalThis': globalThis, eval, parseInt, parseFloat, and 721 more.
126 readonly defaultView: Window | null;
~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-document.d.ts:147:14 - error TS2416: Property 'onreadystatechange' in type 'DummyDocument' is not assignable to the same property in base type 'Document'.
Type '((this: Document, ev: ProgressEvent<EventTarget>) => any) | null' is not assignable to type '((this: Document, ev: Event) => any) | null'.
Type '(this: Document, ev: ProgressEvent<EventTarget>) => any' is not assignable to type '(this: Document, ev: Event) => any'.
Types of parameters 'ev' and 'ev' are incompatible.
Type 'Event' is missing the following properties from type 'ProgressEvent<EventTarget>': lengthComputable, loaded, total
147 readonly onreadystatechange: ((this: Document, ev: ProgressEvent) => any) | null;
~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-element.d.ts:148:5 - error TS2416: Property 'getBoundingClientRect' in type 'DummyElement' is not assignable to the same property in base type 'Element'.
Type '() => DOMRect | ClientRect' is not assignable to type '() => DOMRect'.
Type 'DOMRect | ClientRect' is not assignable to type 'DOMRect'.
Type 'ClientRect' is missing the following properties from type 'DOMRect': x, y, toJSON
148 getBoundingClientRect(): ClientRect | DOMRect;
~~~~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-element.d.ts:148:5 - error TS2416: Property 'getBoundingClientRect' in type 'DummyElement' is not assignable to the same property in base type 'HTMLElement'.
Type '() => DOMRect | ClientRect' is not assignable to type '() => DOMRect'.
148 getBoundingClientRect(): ClientRect | DOMRect;
~~~~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-element.d.ts:149:5 - error TS2416: Property 'getClientRects' in type 'DummyElement' is not assignable to the same property in base type 'Element'.
Type '() => ClientRectList | DOMRectList' is not assignable to type '() => DOMRectList'.
Type 'ClientRectList | DOMRectList' is not assignable to type 'DOMRectList'.
Type 'ClientRectList' is not assignable to type 'DOMRectList'.
The types returned by 'item(...)' are incompatible between these types.
Type 'ClientRect' is not assignable to type 'DOMRect'.
149 getClientRects(): ClientRectList | DOMRectList;
~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-element.d.ts:149:5 - error TS2416: Property 'getClientRects' in type 'DummyElement' is not assignable to the same property in base type 'HTMLElement'.
Type '() => ClientRectList | DOMRectList' is not assignable to type '() => DOMRectList'.
149 getClientRects(): ClientRectList | DOMRectList;
~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-entity-reference.d.ts:3:22 - error TS2420: Class 'DummyEntityReference' incorrectly implements interface 'Node'.
Types of property 'previousSibling' are incompatible.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
3 export declare class DummyEntityReference extends NodeImpl implements EntityReference {
~~~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-node.d.ts:8:14 - error TS2416: Property 'previousSibling' in type 'DummyNode' is not assignable to the same property in base type 'Node'.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is missing the following properties from type 'ChildNode': after, before, remove, replaceWith
8 abstract previousSibling: Node | null;
~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-processing-instruction.d.ts:3:31 - error TS2420: Class 'DummyProcessingInstruction' incorrectly implements interface 'ProcessingInstruction'.
Property 'sheet' is missing in type 'DummyProcessingInstruction' but required in type 'ProcessingInstruction'.
3 export declare abstract class DummyProcessingInstruction extends CharacterDataImpl implements ProcessingInstruction {
~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:9677:14
9677 readonly sheet: CSSStyleSheet | null;
~~~~~
'sheet' is declared here.
node_modules/xmldom-ts/dist/types/dummy/dummy-text.d.ts:3:22 - error TS2420: Class 'DummyText' incorrectly implements interface 'Text'.
Types of property 'previousSibling' are incompatible.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
3 export declare class DummyText extends CharacterDataImpl implements Text {
~~~~~~~~~
Found 29 errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! functions# build: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the functions# build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Any idea why i get this error? My package.json:
"dependencies": {
"es6-promise-pool": "^2.5.0",
"firebase-admin": "^8.12.1",
"firebase-functions": "^3.7.0",
"stripe": "^8.67.0",
"xmldom-ts": "^0.3.1",
"xpath-ts": "^1.3.13"
},
npm tsc and vscode show no problems / warnings & i tried npm reinstall multiple times.
Removing xmldom-ts from packages solved the Problem
npm uninstall xmldom-ts

Facing error while using image_picker in flutter

Hy, I am new to flutter and while working with an app that uses image_picker to get images from the gallery I was facing this error.
C:\Users\Hrishabh Mishra\Desktop\FDR\Flutter\course\08\mycameraapp>flutter run
Launching lib\main.dart on Redmi Note 5 Pro in debug mode...
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:15: error: package android.support.annotation does not exist
import android.support.annotation.VisibleForTesting;
^
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:16: error: cannot find symbol
import android.support.v4.app.ActivityCompat;
^
symbol: class ActivityCompat
location: package android.support.v4.app
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:17: error: package android.support.v4.content does not exist
import android.support.v4.content.FileProvider;
^
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerFileProvider.java:3: error: package android.support.v4.content does not exist
import android.support.v4.content.FileProvider;
^
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerFileProvider.java:10: error: cannot find symbol
public class ImagePickerFileProvider extends FileProvider {}
^
symbol: class FileProvider
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerPlugin.java:8: error: package android.support.annotation does not exist
import android.support.annotation.VisibleForTesting;
^
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:68: error: cannot find symbol
#VisibleForTesting static final int REQUEST_CODE_CHOOSE_IMAGE_FROM_GALLERY = 2342;
^
symbol: class VisibleForTesting
location: class ImagePickerDelegate
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:69: error: cannot find symbol
#VisibleForTesting static final int REQUEST_CODE_TAKE_IMAGE_WITH_CAMERA = 2343;
^
symbol: class VisibleForTesting
location: class ImagePickerDelegate
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:70: error: cannot find symbol
#VisibleForTesting static final int REQUEST_EXTERNAL_IMAGE_STORAGE_PERMISSION = 2344;
^
symbol: class VisibleForTesting
location: class ImagePickerDelegate
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:71: error: cannot find symbol
#VisibleForTesting static final int REQUEST_CAMERA_IMAGE_PERMISSION = 2345;
^
symbol: class VisibleForTesting
location: class ImagePickerDelegate
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:72: error: cannot find symbol
#VisibleForTesting static final int REQUEST_CODE_CHOOSE_VIDEO_FROM_GALLERY = 2352;
^
symbol: class VisibleForTesting
location: class ImagePickerDelegate
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:73: error: cannot find symbol
#VisibleForTesting static final int REQUEST_CODE_TAKE_VIDEO_WITH_CAMERA = 2353;
^
symbol: class VisibleForTesting
location: class ImagePickerDelegate
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:74: error: cannot find symbol
#VisibleForTesting static final int REQUEST_EXTERNAL_VIDEO_STORAGE_PERMISSION = 2354;
^
symbol: class VisibleForTesting
location: class ImagePickerDelegate
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:75: error: cannot find symbol
#VisibleForTesting static final int REQUEST_CAMERA_VIDEO_PERMISSION = 2355;
^
symbol: class VisibleForTesting
location: class ImagePickerDelegate
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:77: error: cannot find symbol
#VisibleForTesting final String fileProviderName;
^
symbol: class VisibleForTesting
location: class ImagePickerDelegate
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:164: error: cannot find symbol
#VisibleForTesting
^
symbol: class VisibleForTesting
location: class ImagePickerDelegate
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerPlugin.java:40: error: cannot find symbol
#VisibleForTesting
^
symbol: class VisibleForTesting
location: class ImagePickerPlugin
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:122: error: cannot find symbol
return ActivityCompat.checkSelfPermission(activity, permissionName)
^
symbol: variable ActivityCompat
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:128: error: cannot find symbol
ActivityCompat.requestPermissions(activity, new String[] {permissionName}, requestCode);
^
symbol: variable ActivityCompat
H:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:140: error: cannot find symbol
return FileProvider.getUriForFile(activity, fileProviderName, file);
^
symbol: variable FileProvider
20 errors
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':image_picker:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 28s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 32.5s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin image_picker...
Running Gradle task 'assembleAarRelease'...
Running Gradle task 'assembleAarRelease'... Done 22.3s
WARNING: The option setting 'android.enableR8=true' is experimental and unsupported.
The current default is 'false'
Consider disabling R8 by removing 'android.enableR8=true' from your gradle.properties before publishing your app.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'imagepicker'.
SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 16s
The plugin image_picker could not be built due to the issue above.
SDK location not found. Define location with sdk.dir in the local.properties file or
with an ANDROID_HOME environment variable.
Configure the Android SDK first.
Method 1:
Go to Settings
Expand Language & Frameworks
Select Flutter
Enter the flutter sdk path in Flutter SDK Path textbox
Click Ok
Method 2:
Flutter provides a command to update the Android SDK path:
Use flutter config --android-sdk <path-to-your-android-sdk-path>

Error building CXX object gnuradio-runtime

I am trying to install a specific version of gnuradio (3.7.10.1). To do so I am not using Pybombs, but I try to do it from source (I am following this).
First I've cloned the github repository, then checkout the appropriate version. It worked fine until I've tried to invoke CMake and build GNU Radio:
mkdir build
cd build
cmake ../
make
During the make, after 6% done, I have the following error:
In file included from /usr/include/c++/7/type_traits:35:0,
from /usr/include/cppunit/tools/StringHelper.h:7,
from /usr/include/cppunit/TestAssert.h:8,
from /usr/include/cppunit/TestCase.h:6,
from /usr/include/cppunit/TestCaller.h:5,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/c++/7/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
^~~~~
In file included from /usr/include/cppunit/TestAssert.h:8:0,
from /usr/include/cppunit/TestCase.h:6,
from /usr/include/cppunit/TestCaller.h:5,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/tools/StringHelper.h:22:15: error: ‘enable_if’ in namespace ‘std’ does not name a template type
typename std::enable_if<!std::is_enum<T>::value, std::string>::type toString(const T& x)
^~~~~~~~~
/usr/include/cppunit/tools/StringHelper.h:22:24: error: expected unqualified-id before ‘<’ token
typename std::enable_if<!std::is_enum<T>::value, std::string>::type toString(const T& x)
^
/usr/include/cppunit/tools/StringHelper.h:31:15: error: ‘enable_if’ in namespace ‘std’ does not name a template type
typename std::enable_if<std::is_enum<T>::value, std::string>::type toString(const T& x)
^~~~~~~~~
/usr/include/cppunit/tools/StringHelper.h:31:24: error: expected unqualified-id before ‘<’ token
typename std::enable_if<std::is_enum<T>::value, std::string>::type toString(const T& x)
In file included from /usr/include/cppunit/TestCase.h:6:0,
from /usr/include/cppunit/TestCaller.h:5,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/TestAssert.h: In static member function ‘static std::__cxx11::string CppUnit::assertion_traits<T>::toString(const T&)’:
/usr/include/cppunit/TestAssert.h:74:42: error: ‘toString’ is not a member of ‘CppUnit::StringHelper’
return CPPUNIT_NS::StringHelper::toString(x);
^~~~~~~~
In file included from /usr/include/cppunit/extensions/HelperMacros.h:9:0,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/TestCaller.h: At global scope:
/usr/include/cppunit/TestCaller.h:159:37: error: ‘std::function’ has not been declared
TestCaller(std::string name, std::function<void()> test_function, Fixture* fixture):
^~~~~~~~
/usr/include/cppunit/TestCaller.h:159:45: error: expected ‘,’ or ‘...’ before ‘<’ token
TestCaller(std::string name, std::function<void()> test_function, Fixture* fixture):
^
/usr/include/cppunit/TestCaller.h:200:8: error: ‘function’ in namespace ‘std’ does not name a template type
std::function<void()> m_test_function;
^~~~~~~~
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, CppUnit::TestCaller<Fixture>::TestMethod)’:
/usr/include/cppunit/TestCaller.h:121:6: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function( std::bind(test, m_fixture) )
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:121:28: error: ‘bind’ is not a member of ‘std’
m_test_function( std::bind(test, m_fixture) )
^~~~
/usr/include/cppunit/TestCaller.h:121:28: note: suggested alternative: ‘find’
m_test_function( std::bind(test, m_fixture) )
^~~~
find
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, CppUnit::TestCaller<Fixture>::TestMethod, Fixture&)’:
/usr/include/cppunit/TestCaller.h:138:6: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function( std::bind(test, &fixture) )
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:138:28: error: ‘bind’ is not a member of ‘std’
m_test_function( std::bind(test, &fixture) )
^~~~
/usr/include/cppunit/TestCaller.h:138:28: note: suggested alternative: ‘find’
m_test_function( std::bind(test, &fixture) )
^~~~
find
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, CppUnit::TestCaller<Fixture>::TestMethod, Fixture*)’:
/usr/include/cppunit/TestCaller.h:155:6: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function( std::bind(test, fixture) )
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:155:28: error: ‘bind’ is not a member of ‘std’
m_test_function( std::bind(test, fixture) )
^~~~
/usr/include/cppunit/TestCaller.h:155:28: note: suggested alternative: ‘find’
m_test_function( std::bind(test, fixture) )
^~~~
find
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, int)’:
/usr/include/cppunit/TestCaller.h:162:17: error: ‘fixture’ was not declared in this scope
m_fixture(fixture),
^~~~~~~
/usr/include/cppunit/TestCaller.h:162:17: note: suggested alternative: ‘Fixture’
m_fixture(fixture),
^~~~~~~
Fixture
/usr/include/cppunit/TestCaller.h:163:7: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function(test_function)
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:163:23: error: ‘test_function’ was not declared in this scope
m_test_function(test_function)
^~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h: In member function ‘void CppUnit::TestCaller<Fixture>::runTest()’:
/usr/include/cppunit/TestCaller.h:175:7: error: there are no arguments to ‘m_test_function’ that depend on a template parameter, so a declaration of ‘m_test_function’ must be available [-fpermissive]
m_test_function();
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:175:7: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
In file included from /usr/include/cppunit/extensions/HelperMacros.h:14:0,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/extensions/TestNamer.h: In member function ‘std::__cxx11::string CppUnit::TestNamer::getTestNameFor(const string&, const E&) const’:
/usr/include/cppunit/extensions/TestNamer.h:70:95: error: ‘toString’ is not a member of ‘CppUnit::StringHelper’
return getTestNameFor(testMethodName) + " with parameter: " + CPPUNIT_NS::StringHelper::toString(val);
^~~~~~~~
In file included from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26:0,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h: In static member function ‘static CppUnit::TestSuite* qa_fxpt::suite()’:
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:36:3: error: ‘unique_ptr’ is not a member of ‘std’
CPPUNIT_TEST_SUITE_END();
^
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:36:3: error: expected primary-expression before ‘>’ token
CPPUNIT_TEST_SUITE_END();
^
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:36:3: error: ‘guard’ was not declared in this scope
CPPUNIT_TEST_SUITE_END();
^
In file included from /usr/include/cppunit/extensions/HelperMacros.h:9:0,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/TestCaller.h: In instantiation of ‘void CppUnit::TestCaller<Fixture>::runTest() [with Fixture = qa_fxpt]’:
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:102:1: required from here
/usr/include/cppunit/TestCaller.h:175:22: error: ‘m_test_function’ was not declared in this scope
m_test_function();
~~~~~~~~~~~~~~~^~
/usr/include/cppunit/TestCaller.h:175:22: note: suggested alternative: ‘__fortify_function’
m_test_function();
~~~~~~~~~~~~~~~^~
__fortify_function
gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/build.make:62: recipe for target 'gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/math/qa_fxpt.cc.o' failed
make[2]: *** [gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/math/qa_fxpt.cc.o] Error 1
CMakeFiles/Makefile2:726: recipe for target 'gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/all' failed
make[1]: *** [gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
I am not a Linux expert and I am not very familiar to this compiler/library support. I don't really understand where the error comes from and how to correct it.
I use Ubuntu 18.04.
Coud you give me a hand on this please?
Any help would be very appreciated.
Thanks a lot.
/usr/include/c++/7/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
To resolve the above error you need to compile with -std=c++11 flag. Open CMakeLists.txt, find all occurrences or -std=c++98 and change them to -std=c++11. Then go to the build directory, remove CMakeCache.txt and rebuild
sed -i 's/-std=c++98/-std=c++11/g' CMakeLists.txt
cd build
rm CMakeCache.txt
cmake ..
make
Also as the error is in the cppunit and it's used for testing you can try disabling all tests
cd build
rm CMakeCache.txt
cmake -DENABLE_TESTING=OFF ..
make

bcrypt warnings inside of Docker

Is there some solution to get rid of this warning? Console displays it during the Docker image creating. There are a lot of topics all over the internet and no working solution. Since bcrypt js lib creators think that it's fine to not fixing it for years maybe it's possible to import something manually or anything like that.
Node.js v12
bcrypt v3
Docker v19
> bcrypt#3.0.6 install /usr/src/app/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
make: Entering directory '/usr/src/app/node_modules/bcrypt/build'
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
In file included from ../src/bcrypt_node.cc:1:
../../nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker*)':
../../nan/nan.h:2232:62: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
, reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
^
In file included from ../../nan/nan.h:53,
from ../src/bcrypt_node.cc:1:
../src/bcrypt_node.cc: At global scope:
/root/.node-gyp/12.4.0/include/node/node.h:556:43: warning: cast between incompatible function types from 'void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)' {aka 'void (*)(v8::Local<v8::Object>)'} to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
(node::addon_register_func) (regfunc), \
^
/root/.node-gyp/12.4.0/include/node/node.h:590:3: note: in expansion of macro 'NODE_MODULE_X'
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^~~~~~~~~~~~~
../src/bcrypt_node.cc:378:1: note: in expansion of macro 'NODE_MODULE'
NODE_MODULE(bcrypt_lib, init);
^~~~~~~~~~~
In file included from /root/.node-gyp/12.4.0/include/node/node.h:63,
from ../../nan/nan.h:53,
from ../src/bcrypt_node.cc:1:
/root/.node-gyp/12.4.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]':
/root/.node-gyp/12.4.0/include/node/node_object_wrap.h:84:78: required from here
/root/.node-gyp/12.4.0/include/node/v8.h:9817:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<node::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
reinterpret_cast<Callback>(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.node-gyp/12.4.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]':
../../nan/nan_object_wrap.h:65:61: required from here
/root/.node-gyp/12.4.0/include/node/v8.h:9817:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]```
the warning is there for a reason, if you want to hide it, you have few choices
submit a fix to upstream to actually fix the code to remove the warning
hide it by submitting a fix to upstream and add -Wno-cast-function-type to gcc. it's up to maintainer to accept it.
submit a fix to upstream to add prebuilt binary for node 12 so that you won't have to compile every time (hence it won't trigger gcc to build). right now looks like only windows have prebuilt binary for node 12 (search for v72-linux)
https://github.com/kelektiv/node.bcrypt.js/releases/tag/v3.0.6
Are you able to use bycryptjs to avoid this issue?
The bycrypt entirely depends on the node version. Or you have to choose the suitable version of bycrypt or downgrade the version of bycrypt

Make error when trying to build OpenShadingLanguage on Ubuntu

I have all dependencies set up, as far as I'm aware, ccmake shows everything has been found. However, when I run make, I get the following output:
shanesimmsart#shanesimmsart-pc:~/OpenShadingLanguage/build$ make
[ 1%] Building CXX object src/liboslcomp/CMakeFiles/oslcomp.dir/ast.cpp.o
In file included from /home/shanesimmsart/OpenShadingLanguage/src/include/osl_pvt.h:31:0,
from /home/shanesimmsart/OpenShadingLanguage/src/liboslcomp/ast.cpp:35:
/home/shanesimmsart/OpenShadingLanguage/src/include/OSL/oslconfig.h:109:13: error: ‘OIIO::string_view’ has not been declared
using OIIO::string_view;
^
In file included from /home/shanesimmsart/OpenShadingLanguage/src/liboslcomp/ast.cpp:35:0:
/home/shanesimmsart/OpenShadingLanguage/src/include/osl_pvt.h:54:1: error: ‘string_view’ does not name a type
string_view shadertypename (ShaderType s);
^
/home/shanesimmsart/OpenShadingLanguage/src/include/osl_pvt.h:58:34: error: ‘string_view’ was not declared in this scope
ShaderType shadertype_from_name (string_view name);
^
/home/shanesimmsart/OpenShadingLanguage/src/include/osl_pvt.h:76:32: error: ‘string_view’ was not declared in this scope
ShaderUse shaderuse_from_name (string_view name);
^
In file included from /home/shanesimmsart/OpenShadingLanguage/src/liboslcomp/oslcomp_pvt.h:36:0,
from /home/shanesimmsart/OpenShadingLanguage/src/liboslcomp/ast.cpp:36:
/home/shanesimmsart/OpenShadingLanguage/src/include/OSL/oslcomp.h:52:19: error: ‘string_view’ has not been declared
bool compile (string_view filename,
^
/home/shanesimmsart/OpenShadingLanguage/src/include/OSL/oslcomp.h:54:19: error: ‘string_view’ has not been declared
string_view stdoslpath = string_view());
^
/home/shanesimmsart/OpenShadingLanguage/src/include/OSL/oslcomp.h:59:26: error: ‘string_view’ has not been declared
bool compile_buffer (string_view sourcecode, std::string &osobuffer,
^
/home/shanesimmsart/OpenShadingLanguage/src/include/OSL/oslcomp.h:61:26: error: ‘string_view’ has not been declared
string_view stdoslpath = string_view());
^
/home/shanesimmsart/OpenShadingLanguage/src/include/OSL/oslcomp.h:65:5: error: ‘string_view’ does not name a type
string_view output_filename () const;
^
/home/shanesimmsart/OpenShadingLanguage/src/include/OSL/oslcomp.h:54:56: error: ‘string_view’ was not declared in this scope
string_view stdoslpath = string_view());
^
/home/shanesimmsart/OpenShadingLanguage/src/include/OSL/oslcomp.h:61:63: error: ‘string_view’ was not declared in this scope
string_view stdoslpath = string_view());
^
In file included from /home/shanesimmsart/OpenShadingLanguage/src/liboslcomp/oslcomp_pvt.h:37:0,
from /home/shanesimmsart/OpenShadingLanguage/src/liboslcomp/ast.cpp:36:
/home/shanesimmsart/OpenShadingLanguage/src/liboslcomp/ast.h:354:5: error: ‘string_view’ does not name a type
string_view shadertypename () const;
^
In file included from /home/shanesimmsart/OpenShadingLanguage/src/liboslcomp/ast.cpp:36:0:
/home/shanesimmsart/OpenShadingLanguage/src/liboslcomp/oslcomp_pvt.h:69:19: error: ‘string_view’ has not been declared
bool compile (string_view filename,
^
/home/shanesimmsart/OpenShadingLanguage/src/liboslcomp/oslcomp_pvt.h:71:19: error: ‘string_view’ has not been declared
string_view stdoslpath);
^
/home/shanesimmsart/OpenShadingLanguage/src/liboslcomp/oslcomp_pvt.h:73:26: error: ‘string_view’ has not been declared
bool compile_buffer (string_view sourcecode,
^
/home/shanesimmsart/OpenShadingLanguage/src/liboslcomp/oslcomp_pvt.h:76:26: error: ‘string_view’ has not been declared
string_view stdoslpath);
^
/home/shanesimmsart/OpenShadingLanguage/src/liboslcomp/oslcomp_pvt.h:249:5: error: ‘string_view’ does not name a type
string_view output_filename () const { return m_output_filename; }
^
/home/shanesimmsart/OpenShadingLanguage/src/liboslcomp/ast.cpp: In member function ‘virtual void OSL::pvt::ASTshader_declaration::print(std::ostream&, int) const’:
/home/shanesimmsart/OpenShadingLanguage/src/liboslcomp/ast.cpp:195:59: error: ‘shadertypename’ was not declared in this scope
out << "(" << nodetypename() << " " << shadertypename()
^
/home/shanesimmsart/OpenShadingLanguage/src/liboslcomp/ast.cpp: At global scope:
/home/shanesimmsart/OpenShadingLanguage/src/liboslcomp/ast.cpp:204:1: error: ‘string_view’ does not name a type
string_view
^
make[2]: *** [src/liboslcomp/CMakeFiles/oslcomp.dir/ast.cpp.o] Error 1
make[1]: *** [src/liboslcomp/CMakeFiles/oslcomp.dir/all] Error 2
make: *** [all] Error 2
This appears to be an issue with string_view.h, included from OpenImageIO, however when I look in /usr/include/OpenImageIO/, string_view.h is right there. As far as I can tell, OIIO is up to date with version 1.5, so I can't imagine it's a version issue either, although I'm not ruling that out.
Any advice would be greatly appreciated.

Resources