fatal error C1189: #error: <hash_map> is deprecated and will be REMOVED.

本文探讨了在Win10环境下,如何解决VS2017编译器中关于hash_map的弃用警告,并介绍了unordered_map作为替代方案。重点讲解了两者之间的区别,以及为何推荐unordered_set而非hash_set。

环境:win10,vs2017

报错:

hash_map(17): fatal error C1189: #error: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning.

解决方法:

1)使用unordered_map代替hash_map(推荐)

2)在项目属性->c/c++->预编译器,增加_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS定义

3)在使用include之前,加上define
_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS 1定义

hash_map和unordered_map的区别:

这里为什么将二者一起说呢?因为hash_map和unordered_map都是用哈希表实现的,它们有什么区别吗?其实区别不大,但是推荐使用unordered_map,因为unordered_map在C++11就被录入标准库了,而hash并没有进入标准库。

说到这那到底hash_set与unordered_set哪个更好呢?实际上unordered_set在C++11的时候被引入标准库了,而hash_set并没有,所以建议还是使用unordered_set比较好,这就好比一个是官方认证的,一个是民间流传的。在编译器中,Visual Studio(当然需要支持C++11的版本)库中两个数据结构都有定义,而在gcc/g++中并不支持hash_set。
————————————————
原文链接:https://blog.youkuaiyun.com/FX677588/article/details/76400389

参考:https://www.jmwww.net/file/9859.html
https://blog.youkuaiyun.com/csdn9990/article/details/112281363

[root@yfw jsxc-master]# npx webpack serve --mode development --host 0.0.0.0 --port 8091 --hot git: 'git' is not a git command. See 'git --help'. The most similar command is init [Git] Not available: Command failed: git git rev-parse HEAD git: 'git' is not a git command. See 'git --help'. The most similar command is init ℹ 「wds」: Project is running at http://0.0.0.0:8091/ ℹ 「wds」: webpack output is served from /dist/ ℹ 「wds」: Content not from webpack is served from /www/wwwroot/szrengjing.com/jsxc/jsxc-master Deprecation Warning [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0. More info: https://sass-lang.com/d/legacy-js-api Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0. More info and automated migrator: https://sass-lang.com/d/import ╷ 10 │ @import "../fonts/jsxc-icons"; │ ^^^^^^^^^^^^^^^^^^^^^ ╵ scss/main.scss 10:9 root stylesheet Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0. More info and automated migrator: https://sass-lang.com/d/import ╷ 12 │ @import "modules/all"; │ ^^^^^^^^^^^^^ ╵ scss/main.scss 12:9 root stylesheet Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0. More info and automated migrator: https://sass-lang.com/d/import ╷ 13 │ @import "vendor/all"; │ ^^^^^^^^^^^^ ╵ scss/main.scss 13:9 root stylesheet Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0. More info and automated migrator: https://sass-lang.com/d/import ╷ 20 │ @import "partials/avatar"; │ ^^^^^^^^^^^^^^^^^ ╵ scss/main.scss 20:9 root stylesheet Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0. More info and automated migrator: https://sass-lang.com/d/import ╷ 21 │ @import "partials/button"; │ ^^^^^^^^^^^^^^^^^ ╵ scss/main.scss 21:9 root stylesheet Deprecation Warning [global-builtin]: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0. Use map.get instead. More info and automated migrator: https://sass-lang.com/d/import ╷ 67 │ content: map-get($jsxc-icons-map, "attachment"); │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ fonts/jsxc-icons.scss 67:14 @import scss/main.scss 10:9 root stylesheet Deprecation Warning [global-builtin]: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0. Use map.get instead. More info and automated migrator: https://sass-lang.com/d/import ╷ 70 │ content: map-get($jsxc-icons-map, "bell"); │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ fonts/jsxc-icons.scss 70:14 @import scss/main.scss 10:9 root stylesheet Deprecation Warning [global-builtin]: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0. Use map.get instead. More info and automated migrator: https://sass-lang.com/d/import ╷ 73 │ content: map-get($jsxc-icons-map, "bookmark"); │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ fonts/jsxc-icons.scss 73:14 @import scss/main.scss 10:9 root stylesheet Deprecation Warning [global-builtin]: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0. Use map.get instead. More info and automated migrator: https://sass-lang.com/d/import ╷ 76 │ content: map-get($jsxc-icons-map, "camera-disabled"); │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ fonts/jsxc-icons.scss 76:14 @import scss/main.scss 10:9 root stylesheet Deprecation Warning [global-builtin]: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0. Use map.get instead. More info and automated migrator: https://sass-lang.com/d/import ╷ 79 │ content: map-get($jsxc-icons-map, "camera"); │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ fonts/jsxc-icons.scss 79:14 @import scss/main.scss 10:9 root stylesheet Deprecation Warning [color-functions]: lighten() is deprecated. Suggestions: color.scale($color, $lightness: 20%) color.adjust($color, $lightness: 20%) More info: https://sass-lang.com/d/color-functions ╷ 60 │ $gray20: lighten($black, 20%); │ ^^^^^^^^^^^^^^^^^^^^ ╵ scss/modules/_colors.scss 60:10 @import scss/modules/_all.scss 1:9 @import scss/main.scss 12:9 root stylesheet Deprecation Warning [color-functions]: lighten() is deprecated. Suggestions: color.scale($color, $lightness: 30%) color.adjust($color, $lightness: 30%) More info: https://sass-lang.com/d/color-functions ╷ 61 │ $gray30: lighten($black, 30%); │ ^^^^^^^^^^^^^^^^^^^^ ╵ scss/modules/_colors.scss 61:10 @import scss/modules/_all.scss 1:9 @import scss/main.scss 12:9 root stylesheet Deprecation Warning [color-functions]: lighten() is deprecated. Suggestions: color.scale($color, $lightness: 50%) color.adjust($color, $lightness: 50%) More info: https://sass-lang.com/d/color-functions ╷ 62 │ $gray50: lighten($black, 50%); │ ^^^^^^^^^^^^^^^^^^^^ ╵ scss/modules/_colors.scss 62:10 @import scss/modules/_all.scss 1:9 @import scss/main.scss 12:9 root stylesheet Deprecation Warning [color-functions]: lighten() is deprecated. Suggestions: color.scale($color, $lightness: 60%) color.adjust($color, $lightness: 60%) More info: https://sass-lang.com/d/color-functions ╷ 63 │ $gray60: lighten($black, 60%); │ ^^^^^^^^^^^^^^^^^^^^ ╵ scss/modules/_colors.scss 63:10 @import scss/modules/_all.scss 1:9 @import scss/main.scss 12:9 root stylesheet Deprecation Warning [color-functions]: lighten() is deprecated. Suggestions: color.scale($color, $lightness: 70%) color.adjust($color, $lightness: 70%) More info: https://sass-lang.com/d/color-functions ╷ 64 │ $gray70: lighten($black, 70%); │ ^^^^^^^^^^^^^^^^^^^^ ╵ scss/modules/_colors.scss 64:10 @import scss/modules/_all.scss 1:9 @import scss/main.scss 12:9 root stylesheet Warning: 241 repetitive deprecation warnings omitted. ℹ 「wdm」: assets by path images/emojione/*.svg 3.05 MiB 1832 assets assets by path images/icons/*.svg 95.1 KiB 42 assets assets by path images/filetypes/ 29.9 KiB 40 assets assets by path example/ 249 KiB 12 assets assets by path images/*.svg 14.8 KiB 9 assets assets by path assets/ 262 KiB 6 assets assets by path images/emoticons/*.svg 36.7 KiB 6 assets assets by path images/presence/*.svg 9.21 KiB 5 assets assets by path sound/ 102 KiB 4 assets assets by path fonts/ 28 KiB 4 assets assets by chunk 13.1 MiB (name: main) 2 assets + 4 assets Entrypoint main [big] 13.1 MiB (262 KiB) = styles/jsxc.bundle.css 300 KiB jsxc.bundle.js 12.8 MiB 6 auxiliary assets runtime modules 30.3 KiB 17 modules modules by path ./node_modules/ 3.13 MiB 387 modules modules by path ./src/ 1.12 MiB 226 modules modules by path ./template/ 95.6 KiB 32 modules modules by path ./locales/ 462 KiB 31 modules modules by path ./sound/*.mp3 158 bytes ./sound/notification.mp3 55 bytes [built] [code generated] + 2 modules modules by path ./scss/*.scss 365 bytes (javascript) 299 KiB (css/mini-extract) ./scss/main.scss 365 bytes [built] [code generated] css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./node_modules/sass-loader/dist/cjs.js!./scss/main.scss 299 KiB [built] [code generated] modules by path ./images/ 106 bytes ./images/XMPP_logo.png 52 bytes [built] [code generated] ./images/icons/placeholder.svg 54 bytes [built] [code generated] + 6 modules webpack 5.102.1 compiled successfully in 18090 ms ℹ 「wdm」: Compiled successfully. ERROR in src/api/v1/register.ts:140:44 TS2345: Argument of type 'string' is not assignable to parameter of type 'Record<string, string>'. 138 | 139 | if (values && values.length === 1) { > 140 | queryStanza.c(allowedField, values[0]).up(); | ^^^^^^^^^ 141 | } 142 | } 143 | } ERROR in src/connection/AbstractConnection.ts:222:29 TS2345: Argument of type '{ xmlns: any; hash: string; node: string; ver: String; }' is not assignable to parameter of type 'Record<string, string>'. Property 'ver' is incompatible with index signature. Type 'String' is not assignable to type 'string'. 'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible. 220 | let presenceStanza = $pres(); 221 | > 222 | presenceStanza.c('c', this.generateCapsAttributes()).up(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 223 | 224 | if (typeof presence !== 'undefined' && presence !== Presence.online) { 225 | presenceStanza.c('show').t(Presence[presence]).up(); ERROR in src/connection/services/MUC.ts:130:27 TS2345: Argument of type 'string' is not assignable to parameter of type 'Record<string, string>'. 128 | 129 | if (exitMessage) { > 130 | pres.c('status', exitMessage); | ^^^^^^^^^^^ 131 | } 132 | 133 | return this.send(pres); ERROR in src/connection/services/PubSub.ts:243:13 TS2322: Type 'IJID' is not assignable to type 'string'. 241 | .c('options', { 242 | node, > 243 | jid: this.jid, | ^^^ 244 | }); 245 | 246 | if (subId) { ERROR in src/connection/services/Vcard.ts:64:16 TS2345: Argument of type 'XMLDocument' is not assignable to parameter of type 'Element'. Type 'XMLDocument' is missing the following properties from type 'Element': attributes, classList, className, clientHeight, and 99 more. 62 | type: 'set', 63 | to: jid.bare, > 64 | }).cnode(newVCard.get(0)); | ^^^^^^^^^^^^^^^ 65 | 66 | return this.sendIQ(setVcardIQStanza); 67 | } ERROR in src/connection/xmpp/ConnectHelper.ts:1:10 TS2305: Module '"strophe.js"' has no exported member 'Strophe'. > 1 | import { Strophe } from 'strophe.js'; | ^^^^^^^ 2 | import Log from '../../util/Log'; 3 | import SM from '../../StateMachine'; 4 | import Client from '../../Client'; ERROR in src/plugins/AvatarPEPPlugin.ts:92:13 TS2322: Type 'number' is not assignable to type 'string'. 90 | }) 91 | .c('info', { > 92 | bytes: imageSize, | ^^^^^ 93 | id: imageId, 94 | type: 'image/png', 95 | }) ERROR in src/plugins/httpUpload/HttpUploadService.ts:48:10 TS2322: Type 'number' is not assignable to type 'string'. 46 | xmlns: this.namespace, 47 | filename: file.name, > 48 | size: file.size, | ^^^^ 49 | 'content-type': file.type, 50 | }); 51 | ERROR in src/plugins/omemo/lib/Bundle.ts:40:13 TS2322: Type 'number' is not assignable to type 'string'. 38 | xmlBundle 39 | .c('signedPreKeyPublic', { > 40 | signedPreKeyId: this.bundle.signedPreKey.getId(), | ^^^^^^^^^^^^^^ 41 | }) 42 | .t(ArrayBufferUtils.toBase64(this.bundle.signedPreKey.getPublic())) 43 | .up(); ERROR in src/plugins/omemo/lib/Bundle.ts:54:16 TS2322: Type 'number' is not assignable to type 'string'. 52 | xmlBundle 53 | .c('preKeyPublic', { > 54 | preKeyId: preKey.getId(), | ^^^^^^^^ 55 | }) 56 | .t(ArrayBufferUtils.toBase64(preKey.getPublic())) 57 | .up(); ERROR in src/plugins/omemo/lib/BundleManager.ts:134:32 TS2322: Type 'number' is not assignable to type 'string'. 132 | 133 | for (let id of deviceIds) { > 134 | xmlList.c('device', { id }).up(); | ^^ 135 | } 136 | 137 | return this.pepService.publish(NS_DEVICELIST, xmlList.tree(), 'current'); ERROR in src/plugins/omemo/util/Stanza.ts:12:10 TS2322: Type 'number' is not assignable to type 'string'. 10 | 11 | encryptedElement.c('header', { > 12 | sid: ownDeviceId, | ^^^ 13 | }); 14 | 15 | for (let key of <EncryptedDeviceMessage[]>message.keys) { ERROR in src/plugins/omemo/util/Stanza.ts:25:36 TS2345: Argument of type '{ rid: number; prekey: any; }' is not assignable to parameter of type 'Record<string, string>'. Property 'rid' is incompatible with index signature. Type 'number' is not assignable to type 'string'. 23 | } 24 | > 25 | encryptedElement.c('key', attrs).t(btoa(key.getCiphertext().body)).up(); | ^^^^^ 26 | } 27 | 28 | encryptedElement.c('iv', ArrayBufferUtils.toBase64(message.iv)).up().up(); ERROR in src/plugins/omemo/util/Stanza.ts:28:32 TS2345: Argument of type 'string' is not assignable to parameter of type 'Record<string, string>'. 26 | } 27 | > 28 | encryptedElement.c('iv', ArrayBufferUtils.toBase64(message.iv)).up().up(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 29 | 30 | encryptedElement.c('payload').t(ArrayBufferUtils.toBase64(message.payload)); 31 | ERROR in src/vendor/Strophe.ts:3:63 TS2339: Property '$iq' does not exist on type 'typeof import("/www/wwwroot/szrengjing.com/jsxc/jsxc-master/node_modules/@types/strophe.js/index")'. 1 | import * as StropheLib from 'strophe.js'; 2 | > 3 | export let $iq: (attrs?: any) => Strophe.Builder = StropheLib.$iq; | ^^^ 4 | export let $build: (name: string, attrs?: any) => Strophe.Builder = StropheLib.$build; 5 | export let $msg: (attrs?: any) => Strophe.Builder = StropheLib.$msg; 6 | export let $pres: (attrs?: any) => Strophe.Builder = StropheLib.$pres; ERROR in src/vendor/Strophe.ts:4:80 TS2339: Property '$build' does not exist on type 'typeof import("/www/wwwroot/szrengjing.com/jsxc/jsxc-master/node_modules/@types/strophe.js/index")'. 2 | 3 | export let $iq: (attrs?: any) => Strophe.Builder = StropheLib.$iq; > 4 | export let $build: (name: string, attrs?: any) => Strophe.Builder = StropheLib.$build; | ^^^^^^ 5 | export let $msg: (attrs?: any) => Strophe.Builder = StropheLib.$msg; 6 | export let $pres: (attrs?: any) => Strophe.Builder = StropheLib.$pres; 7 | export let Strophe = StropheLib.Strophe; ERROR in src/vendor/Strophe.ts:5:64 TS2339: Property '$msg' does not exist on type 'typeof import("/www/wwwroot/szrengjing.com/jsxc/jsxc-master/node_modules/@types/strophe.js/index")'. 3 | export let $iq: (attrs?: any) => Strophe.Builder = StropheLib.$iq; 4 | export let $build: (name: string, attrs?: any) => Strophe.Builder = StropheLib.$build; > 5 | export let $msg: (attrs?: any) => Strophe.Builder = StropheLib.$msg; | ^^^^ 6 | export let $pres: (attrs?: any) => Strophe.Builder = StropheLib.$pres; 7 | export let Strophe = StropheLib.Strophe; 8 | export let NS = StropheLib.Strophe.NS; ERROR in src/vendor/Strophe.ts:6:65 TS2339: Property '$pres' does not exist on type 'typeof import("/www/wwwroot/szrengjing.com/jsxc/jsxc-master/node_modules/@types/strophe.js/index")'. 4 | export let $build: (name: string, attrs?: any) => Strophe.Builder = StropheLib.$build; 5 | export let $msg: (attrs?: any) => Strophe.Builder = StropheLib.$msg; > 6 | export let $pres: (attrs?: any) => Strophe.Builder = StropheLib.$pres; | ^^^^^ 7 | export let Strophe = StropheLib.Strophe; 8 | export let NS = StropheLib.Strophe.NS; 9 | export let Status: IStatus = StropheLib.Strophe.Status; ERROR in src/vendor/Strophe.ts:7:33 TS2339: Property 'Strophe' does not exist on type 'typeof import("/www/wwwroot/szrengjing.com/jsxc/jsxc-master/node_modules/@types/strophe.js/index")'. 5 | export let $msg: (attrs?: any) => Strophe.Builder = StropheLib.$msg; 6 | export let $pres: (attrs?: any) => Strophe.Builder = StropheLib.$pres; > 7 | export let Strophe = StropheLib.Strophe; | ^^^^^^^ 8 | export let NS = StropheLib.Strophe.NS; 9 | export let Status: IStatus = StropheLib.Strophe.Status; 10 | ERROR in src/vendor/Strophe.ts:8:28 TS2339: Property 'Strophe' does not exist on type 'typeof import("/www/wwwroot/szrengjing.com/jsxc/jsxc-master/node_modules/@types/strophe.js/index")'. 6 | export let $pres: (attrs?: any) => Strophe.Builder = StropheLib.$pres; 7 | export let Strophe = StropheLib.Strophe; > 8 | export let NS = StropheLib.Strophe.NS; | ^^^^^^^ 9 | export let Status: IStatus = StropheLib.Strophe.Status; 10 | 11 | interface IStatus { ERROR in src/vendor/Strophe.ts:9:41 TS2339: Property 'Strophe' does not exist on type 'typeof import("/www/wwwroot/szrengjing.com/jsxc/jsxc-master/node_modules/@types/strophe.js/index")'. 7 | export let Strophe = StropheLib.Strophe; 8 | export let NS = StropheLib.Strophe.NS; > 9 | export let Status: IStatus = StropheLib.Strophe.Status; | ^^^^^^^ 10 | 11 | interface IStatus { 12 | ATTACHED: number;
最新发布
11-11
fatal: not a git repository (or any of the parent directories): .git Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Version: 1.10.1 Commit hash: <none> Launching Web UI with arguments: D:\software\Stable-Diffusion\SD\stable-diffusion-webui\venv\lib\site-packages\timm\models\layers\__init__.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.layers", FutureWarning) no module 'xformers'. Processing without... no module 'xformers'. Processing without... No module 'xformers'. Proceeding without it. D:\software\Stable-Diffusion\SD\stable-diffusion-webui\venv\lib\site-packages\torch\cuda\__init__.py:215: UserWarning: NVIDIA GeForce RTX 5090 with CUDA capability sm_120 is not compatible with the current PyTorch installation. The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_61 sm_70 sm_75 sm_80 sm_86 sm_90. If you want to use the NVIDIA GeForce RTX 5090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/ warnings.warn( Loading weights [6ce0161689] from D:\software\Stable-Diffusion\SD\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors Creating model from config: D:\software\Stable-Diffusion\SD\stable-diffusion-webui\configs\v1-inference.yaml Running on local URL: http://127.0.0.1:7860 D:\software\Stable-Diffusion\SD\stable-diffusion-webui\venv\lib\site-packages\huggingface_hub\file_download.py:945: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`. warnings.warn( To create a public link, set `share=True` in `launch()`. Startup time: 5.3s (prepare environment: 1.3s, import torch: 1.9s, import gradio: 0.5s, setup paths: 0.3s, initialize shared: 0.1s, other imports: 0.3s, load scripts: 0.4s, create ui: 0.2s, gradio launch: 0.3s). loading stable diffusion model: RuntimeError Traceback (most recent call last): File "D:\software\Python\lib\threading.py", line 973, in _bootstrap self._bootstrap_inner() File "D:\software\Python\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "D:\software\Python\lib\threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "D:\software\Stable-Diffusion\SD\stable-diffusion-webui\modules\initialize.py", line 149, in load_model shared.sd_model # noqa: B018 File "D:\software\Stable-Diffusion\SD\stable-diffusion-webui\modules\shared_items.py", line 175, in sd_model return modules.sd_models.model_data.get_sd_model() File "D:\software\Stable-Diffusion\SD\stable-diffusion-webui\modules\sd_models.py", line 693, in get_sd_model load_model() File "D:\software\Stable-Diffusion\SD\stable-diffusion-webui\modules\sd_models.py", line 845, in load_model load_model_weights(sd_model, checkpoint_info, state_dict, timer) File "D:\software\Stable-Diffusion\SD\stable-diffusion-webui\modules\sd_models.py", line 440, in load_model_weights model.load_state_dict(state_dict, strict=False) File "D:\software\Stable-Diffusion\SD\stable-diffusion-webui\modules\sd_disable_initialization.py", line 223, in <lambda> module_load_state_dict = self.replace(torch.nn.Module, 'load_state_dict', lambda *args, **kwargs: load_state_dict(module_load_state_dict, *args, **kwargs)) File "D:\software\Stable-Diffusion\SD\stable-diffusion-webui\modules\sd_disable_initialization.py", line 221, in load_state_dict original(module, state_dict, strict=strict) File "D:\software\Stable-Diffusion\SD\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 2138, in load_state_dict load(self, state_dict) File "D:\software\Stable-Diffusion\SD\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 2126, in load load(child, child_state_dict, child_prefix) File "D:\software\Stable-Diffusion\SD\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 2126, in load load(child, child_state_dict, child_prefix) File "D:\software\Stable-Diffusion\SD\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 2126, in load load(child, child_state_dict, child_prefix) [Previous line repeated 1 more time] File "D:\software\Stable-Diffusion\SD\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 2120, in load module._load_from_state_dict( File "D:\software\Stable-Diffusion\SD\stable-diffusion-webui\modules\sd_disable_initialization.py", line 225, in <lambda> linear_load_from_state_dict = self.replace(torch.nn.Linear, '_load_from_state_dict', lambda *args, **kwargs: load_from_state_dict(linear_load_from_state_dict, *args, **kwargs)) File "D:\software\Stable-Diffusion\SD\stable-diffusion-webui\modules\sd_disable_initia
08-23
DEPRECATION: Building 'Hydra' using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the `--use-pep517` option, (possibly combined with `--no-build-isolation`), or adding a `pyproject.toml` file to the source tree of 'Hydra'. Discussion can be found at https://github.com/pypa/pip/issues/6334 error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [30 lines of output] /home/jfq/anaconda3/envs/pinn/lib/python3.12/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'test_suite' warnings.warn(msg) /home/jfq/anaconda3/envs/pinn/lib/python3.12/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: MIT License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() running bdist_wheel running build running build_py creating build/lib.linux-x86_64-cpython-312 copying src/hydra.py -> build/lib.linux-x86_64-cpython-312 running build_ext building '_hydra' extension creating build/temp.linux-x86_64-cpython-312/src gcc -pthread -B /home/jfq/anaconda3/envs/pinn/compiler_compat -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/jfq/anaconda3/envs/pinn/include -fPIC -O2 -isystem /home/jfq/anaconda3/envs/pinn/include -fPIC -I/tmp/pip-install-j12sv4vn/hydra_2797c4714e864bdc8eb1e9d9f1367604/src -I/home/jfq/anaconda3/envs/pinn/include/python3.12 -c src/MurmurHash3.c -o build/temp.linux-x86_64-cpython-312/src/MurmurHash3.o -std=gnu99 -O2 -D_LARGEFILE64_SOURCE gcc -pthread -B /home/jfq/anaconda3/envs/pinn/compiler_compat -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/jfq/anaconda3/envs/pinn/include -fPIC -O2 -isystem /home/jfq/anaconda3/envs/pinn/include -fPIC -I/tmp/pip-install-j12sv4vn/hydra_2797c4714e864bdc8eb1e9d9f1367604/src -I/home/jfq/anaconda3/envs/pinn/include/python3.12 -c src/_hydra.c -o build/temp.linux-x86_64-cpython-312/src/_hydra.o -std=gnu99 -O2 -D_LARGEFILE64_SOURCE src/_hydra.c:61:12: fatal error: longintrepr.h: No such file or directory 61 | #include "longintrepr.h" | ^~~~~~~~~~~~~~~ compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for Hydra error: failed-wheel-build-for-install × Failed to build installable wheels for some pyproject.toml based projects ╰─> Hydra
09-20
make[12]: Entering directory '/home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code' compile /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_aec.cpp... compile /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_agc.cpp... compile /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_ai.cpp... compile /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_anr.cpp... compile /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_ao.cpp... fatal: Not a git repository (or any of the parent directories): .git compile /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_apc.cpp... compile /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_det.cpp... compile /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_bf.cpp... compile /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_disp.cpp... compile /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_empty.cpp... compile /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_eq.cpp... compile /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_exp.cpp... compile /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_file.cpp... fatal: Not a git repository (or any of the parent directories): .git compile /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_isp.cpp... compile /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_ext/commands/amigos_command_base.cpp... /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/../common/stb_truetype/ss_font.cpp: In static member function ‘static SS_Font::FontFile* SS _Font::FontFile::GetIns(const string&)’: /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/../common/stb_truetype/ss_font.cpp:49:104: error: no matching function for call to ‘std::pa ir<const std::__cxx11::basic_string<char>, std::shared_ptr<SS_Font::FontFile> >::pair(const string&, SS_Font::FontFile*&)’ auto pair = SS_Font::FontFile::map_file_font.insert(MapFileFont::value_type(filepath, font_file)); ^ In file included from /usr/include/c++/5/bits/stl_algobase.h:64:0, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/string:40, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/codecvt:40, from /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/../common/stb_truetype/ss_font.cpp:16: /usr/include/c++/5/bits/stl_pair.h:206:9: note: candidate: template<class ... _Args1, long unsigned int ..._Indexes1, class ... _Args2, long unsigned int ..._Indexes2> std::pair< _T1, _T2>::pair(std::tuple<_Args1 ...>&, std::tuple<_Args2 ...>&, std::_Index_tuple<_Indexes1 ...>, std::_Index_tuple<_Indexes2 ...>) pair(tuple<_Args1...>&, tuple<_Args2...>&, ^ /usr/include/c++/5/bits/stl_pair.h:206:9: note: template argument deduction/substitution failed: /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/../common/stb_truetype/ss_font.cpp:49:104: note: types ‘std::tuple<_Elements ...>’ and ‘c onst string {aka const std::__cxx11::basic_string<char>}’ have incompatible cv-qualifiers auto pair = SS_Font::FontFile::map_file_font.insert(MapFileFont::value_type(filepath, font_file)); ^ In file included from /usr/include/c++/5/bits/stl_algobase.h:64:0, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/string:40, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/codecvt:40, from /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/../common/stb_truetype/ss_font.cpp:16: /usr/include/c++/5/bits/stl_pair.h:155:9: note: candidate: template<class ... _Args1, class ... _Args2> std::pair<_T1, _T2>::pair(std::piecewise_construct_t, std::tuple<_Args1 .. .>, std::tuple<_Args2 ...>) pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>); ^ /usr/include/c++/5/bits/stl_pair.h:155:9: note: template argument deduction/substitution failed: /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/../common/stb_truetype/ss_font.cpp:49:104: note: cannot convert ‘filepath’ (type ‘const s tring {aka const std::__cxx11::basic_string<char>}’) to type ‘std::piecewise_construct_t’ auto pair = SS_Font::FontFile::map_file_font.insert(MapFileFont::value_type(filepath, font_file)); ^ In file included from /usr/include/c++/5/bits/stl_algobase.h:64:0, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/string:40, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/codecvt:40, from /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/../common/stb_truetype/ss_font.cpp:16: /usr/include/c++/5/bits/stl_pair.h:150:12: note: candidate: template<class _U1, class _U2, class> constexpr std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&&) constexpr pair(pair<_U1, _U2>&& __p) ^ /usr/include/c++/5/bits/stl_pair.h:150:12: note: template argument deduction/substitution failed: /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/../common/stb_truetype/ss_font.cpp:49:104: note: types ‘std::pair<_T1, _T2>’ and ‘const s tring {aka const std::__cxx11::basic_string<char>}’ have incompatible cv-qualifiers auto pair = SS_Font::FontFile::map_file_font.insert(MapFileFont::value_type(filepath, font_file)); ^ In file included from /usr/include/c++/5/bits/stl_algobase.h:64:0, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/string:40, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/codecvt:40, from /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/../common/stb_truetype/ss_font.cpp:16: /usr/include/c++/5/bits/stl_pair.h:144:12: note: candidate: template<class _U1, class _U2, class> constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) constexpr pair(_U1&& __x, _U2&& __y) ^ /usr/include/c++/5/bits/stl_pair.h:144:12: note: template argument deduction/substitution failed: /usr/include/c++/5/bits/stl_pair.h:141:38: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’ template<class _U1, class _U2, class = typename ^ /usr/include/c++/5/bits/stl_pair.h:138:12: note: candidate: template<class _U2, class> constexpr std::pair<_T1, _T2>::pair(const _T1&, _U2&&) constexpr pair(const _T1& __x, _U2&& __y) ^ /usr/include/c++/5/bits/stl_pair.h:138:12: note: template argument deduction/substitution failed: /usr/include/c++/5/bits/stl_pair.h:136:27: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’ template<class _U2, class = typename ^ /usr/include/c++/5/bits/stl_pair.h:133:12: note: candidate: template<class _U1, class> constexpr std::pair<_T1, _T2>::pair(_U1&&, const _T2&) constexpr pair(_U1&& __x, const _T2& __y) ^ /usr/include/c++/5/bits/stl_pair.h:133:12: note: template argument deduction/substitution failed: /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/../common/stb_truetype/ss_font.cpp:49:104: note: cannot convert ‘font_file’ (type ‘SS_Fon t::FontFile*’) to type ‘const std::shared_ptr<SS_Font::FontFile>&’ auto pair = SS_Font::FontFile::map_file_font.insert(MapFileFont::value_type(filepath, font_file)); ^ In file included from /usr/include/c++/5/bits/stl_algobase.h:64:0, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/string:40, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/codecvt:40, from /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/../common/stb_truetype/ss_font.cpp:16: /usr/include/c++/5/bits/stl_pair.h:128:17: note: candidate: constexpr std::pair<_T1, _T2>::pair(std::pair<_T1, _T2>&&) [with _T1 = const std::__cxx11::basic_string<char>; _T2 = s td::shared_ptr<SS_Font::FontFile>] constexpr pair(pair&&) = default; ^ /usr/include/c++/5/bits/stl_pair.h:128:17: note: candidate expects 1 argument, 2 provided /usr/include/c++/5/bits/stl_pair.h:127:17: note: candidate: constexpr std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = const std::__cxx11::basic_string<char>; _T 2 = std::shared_ptr<SS_Font::FontFile>] constexpr pair(const pair&) = default; ^ /usr/include/c++/5/bits/stl_pair.h:127:17: note: candidate expects 1 argument, 2 provided /usr/include/c++/5/bits/stl_pair.h:124:12: note: candidate: template<class _U1, class _U2, class> constexpr std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&) constexpr pair(const pair<_U1, _U2>& __p) ^ /usr/include/c++/5/bits/stl_pair.h:124:12: note: template argument deduction/substitution failed: /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/../common/stb_truetype/ss_font.cpp:49:104: note: ‘const string {aka const std::__cxx11::b asic_string<char>}’ is not derived from ‘const std::pair<_T1, _T2>’ auto pair = SS_Font::FontFile::map_file_font.insert(MapFileFont::value_type(filepath, font_file)); ^ In file included from /usr/include/c++/5/bits/stl_algobase.h:64:0, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/string:40, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/codecvt:40, from /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/../common/stb_truetype/ss_font.cpp:16: /usr/include/c++/5/bits/stl_pair.h:112:26: note: candidate: constexpr std::pair<_T1, _T2>::pair(const _T1&, const _T2&) [with _T1 = const std::__cxx11::basic_string<char>; _T2 = std::shared_ptr<SS_Font::FontFile>] _GLIBCXX_CONSTEXPR pair(const _T1& __a, const _T2& __b) ^ /usr/include/c++/5/bits/stl_pair.h:112:26: note: no known conversion for argument 2 from ‘SS_Font::FontFile*’ to ‘const std::shared_ptr<SS_Font::FontFile>&’ /usr/include/c++/5/bits/stl_pair.h:108:26: note: candidate: constexpr std::pair<_T1, _T2>::pair() [with _T1 = const std::__cxx11::basic_string<char>; _T2 = std::shared_ptr<SS_Fon t::FontFile>] _GLIBCXX_CONSTEXPR pair() ^ /usr/include/c++/5/bits/stl_pair.h:108:26: note: candidate expects 0 arguments, 2 provided /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/build/compile.mk:114: recipe for target '/home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1 .1/SourceCode/sdk/verify/sample_code/../common/stb_truetype/ss_font.user.x86.o' failed make[12]: *** [/home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/../common/stb_truetype/ss_font.user.x86.o] Error 1 make[12]: Leaving directory '/home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code' Makefile:182: recipe for target '../common/stb_truetype_obj_all' failed make[11]: *** [../common/stb_truetype_obj_all] Error 2 make[11]: *** 正在等待未完成的任务.... compile /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_ext/commands/amigos_command_instance.cpp... In file included from /usr/include/c++/5/bits/hashtable.h:35:0, from /usr/include/c++/5/unordered_map:47, from /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos/amigos_base/amigos_module_base.h:25, from /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_empty.h:19, from /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_empty.cpp:17: /usr/include/c++/5/bits/hashtable_policy.h: In instantiation of ‘struct std::__detail::__is_noexcept_hash<stream_type, std::hash<stream_type> >’: /usr/include/c++/5/type_traits:137:12: required from ‘struct std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexcept_hash<stream_type, std::hash< stream_type> > >’ /usr/include/c++/5/type_traits:148:38: required from ‘struct std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexcept_hash<stream_type , std::hash<stream_type> > > >’ /usr/include/c++/5/bits/unordered_map.h:100:66: required from ‘class std::unordered_map<stream_type, std::__cxx11::basic_string<char> >’ /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos/amigos_base/amigos_module_base.h:38:1: required from here /usr/include/c++/5/bits/hashtable_policy.h:85:34: error: no match for call to ‘(const std::hash<stream_type>) (const stream_type&)’ noexcept(declval<const _Hash&>()(declval<const _Key&>()))> ^ In file included from /usr/include/c++/5/bits/move.h:57:0, from /usr/include/c++/5/bits/stl_pair.h:59, from /usr/include/c++/5/bits/stl_algobase.h:64, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/string:40, from /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_empty.cpp:16: /usr/include/c++/5/type_traits: In instantiation of ‘struct std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexcept_hash<stream_type, s td::hash<stream_type> > > >’: /usr/include/c++/5/bits/unordered_map.h:100:66: required from ‘class std::unordered_map<stream_type, std::__cxx11::basic_string<char> >’ /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos/amigos_base/amigos_module_base.h:38:1: required from here /usr/include/c++/5/type_traits:148:38: error: ‘value’ is not a member of ‘std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexcept_hash<stream_type, std::hash<stream_type> > >’ : public integral_constant<bool, !_Pp::value> ^ In file included from /usr/include/c++/5/unordered_map:48:0, from /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos/amigos_base/amigos_module_base.h:25, from /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_empty.h:19, from /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos_gencode/amigos_gencode_empty.cpp:17: /usr/include/c++/5/bits/unordered_map.h: In instantiation of ‘class std::unordered_map<stream_type, std::__cxx11::basic_string<char> >’: /home/tp/Project/Iford_IMD00V5.1.1/Iford_IMD00V5.1.1/SourceCode/sdk/verify/sample_code/libraries/amigos/amigos_base/amigos_module_base.h:38:1: required from here /usr/include/c++/5/bits/unordered_map.h:100:66: error: ‘value’ is not a member of ‘std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexc ept_hash<stream_type, std::hash<stream_type> > > >’ typedef __umap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; ^ /usr/include/c++/5/bits/unordered_map.h:107:45: error: ‘value’ is not a member of ‘std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexc ept_hash<stream_type, std::hash<stream_type> > > >’ typedef typename _Hashtable::key_type key_type; ^ /usr/include/c++/5/bits/unordered_map.h:108:47: error: ‘value’ is not a member of ‘std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexc ept_hash<stream_type, std::hash<stream_type> > > >’ typedef typename _Hashtable::value_type value_type; ^ /usr/include/c++/5/bits/unordered_map.h:109:48: error: ‘value’ is not a member of ‘std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexc ept_hash<stream_type, std::hash<stream_type> > > >’ typedef typename _Hashtable::mapped_type mapped_type; ^ /usr/include/c++/5/bits/unordered_map.h:110:43: error: ‘value’ is not a member of ‘std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexc ept_hash<stream_type, std::hash<stream_type> > > >’ typedef typename _Hashtable::hasher hasher; ^ /usr/include/c++/5/bits/unordered_map.h:111:46: error: ‘value’ is not a member of ‘std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexc ept_hash<stream_type, std::hash<stream_type> > > >’ typedef typename _Hashtable::key_equal key_equal; ^ /usr/include/c++/5/bits/unordered_map.h:112:51: error: ‘value’ is not a member of ‘std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexc ept_hash<stream_type, std::hash<stream_type> > > >’ typedef typename _Hashtable::allocator_type allocator_type; ^ /usr/include/c++/5/bits/unordered_map.h:117:45: error: ‘value’ is not a member of ‘std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexc ept_hash<stream_type, std::hash<stream_type> > > >’ typedef typename _Hashtable::pointer pointer; ^ /usr/include/c++/5/bits/unordered_map.h:118:50: error: ‘value’ is not a member of ‘std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexc ept_hash<stream_type, std::hash<stream_type> > > >’ typedef typename _Hashtable::const_pointer const_pointer; ^ /usr/include/c++/5/bits/unordered_map.h:119:47: error: ‘value’ is not a member of ‘std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexc ept_hash<stream_type, std::hash<stream_type> > > >’ typedef typename _Hashtable::reference reference; ^ /usr/include/c++/5/bits/unordered_map.h:120:52: error: ‘value’ is not a member of ‘std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexc ept_hash<stream_type, std::hash<stream_type> > > >’ typedef typename _Hashtable::const_reference const_reference; ^ /usr/include/c++/5/bits/unordered_map.h:121:46: error: ‘value’ is not a member of ‘std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexc ept_hash<stream_type, std::hash<stream_type> > > >’ typedef typename _Hashtable::iterator iterator; ^ /usr/include/c++/5/bits/unordered_map.h:122:51: error: ‘value’ is not a member of ‘std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexc ept_hash<stream_type, std::hash<stream_type> > > >’ typedef typename _Hashtable::const_iterator const_iterator; ^ /usr/include/c++/5/bits/unordered_map.h:123:51: error: ‘value’ is not a member of ‘std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexc ept_hash<stream_type, std::hash<stream_type> > > >’ typedef typename _Hashtable::local_iterator local_iterator; ^ /usr/include/c++/5/bits/unordered_map.h:124:57: error: ‘value’ is not a member of ‘std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexc ept_hash<stream_type, std::hash<stream_type> > > >’ typedef typename _Hashtable::const_local_iterator const_local_iterator; ^ /usr/include/c++/5/bits/unordered_map.h:125:47: error: ‘value’ is not a member of ‘std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexc ept_hash<stream_type, std::hash<stream_type> > > >’ typedef typename _Hashtable::size_type size_type; ^ /usr/include/c++/5/bits/unordered_map.h:126:52: error: ‘value’ is not a member of ‘std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexc ept_hash<stream_type, std::hash<stream_type> > > >’ typedef typename _Hashtable::difference_type difference_type; ^ /usr/include/c++/5/bits/unordered_map.h:280:7: error: ‘value’ is not a member of ‘std::__not_<std::__and_<std::__is_fast_hash<std::hash<stream_type> >, std::__detail::__is_noexce pt_hash<stream_type, std::hash<stream_type> > > >’ operator=(initializer_list<value_type> __l) ^ 不考虑代码错误的可能,问题在哪
09-16
<think>好的,用户提供的错误信息显示在编译过程中遇到了两个主要问题。首先,有几个地方提示“fatal: Not a git repository (or any of the parent directories): .git”,这说明某些目录下缺少.git文件夹,但用户可能并不关心这个问题,因为问题可能不在代码错误上。其次,最严重的错误出现在ss_font.cpp文件的第49,涉及std::pair的构造问题,编译器无法匹配到合适的构造函数。 首先,我需要分析ss_font.cpp中的错误错误信息指出在插入MapFileFont::value_type(filepath, font_file)时,无法找到匹配的std::pair构造函数。用户提到不考虑代码错误的可能性,所以可能需要从编译器版本或标准库兼容性方面入手。 用户的交叉编译链使用的是uclibc 9.1,但错误信息中的编译器路径可能涉及到了主机系统的gcc 5版本(/usr/include/c++/5/...)。这可能意味着虽然交叉编译器路径已经设置,但编译时可能错误地使用了主机系统的标准库头文件,而不是交叉编译器提供的。 另一个可能性是编译器选项中没有正确指定C++标准,导致std::pair的为与代码预期不符。例如,代码可能依赖C++11或更高版本,而编译器默认使用了较旧的标准。 此外,用户之前的问题是关于PATH设置导致交叉编译器路径优先级的问题,可能当前的编译环境仍然没有正确使用交叉编译器,而是调用了主机系统的gcc,导致标准库版本不一致。 需要验证交叉编译器是否正确应用,检查make时使用的编译器路径,以及包含的头文件路径是否正确。可能需要检查Makefile中的CC变量是否正确指向交叉编译器,并且CXXFLAGS中包含正确的头文件路径和标准设置。 总结可能的问题点: 1. 编译器未正确使用交叉编译工具链,导致标准库版本不匹配。 2. 编译器选项未指定正确的C++标准,导致std::pair构造失败。 3. 包含路径错误,引用了主机系统的头文件而非交叉编译器的。</think>### 问题定位 1. **交叉编译器未正确使用** - 错误信息中显示编译器路径为 `/usr/include/c++/5/...`,表明实际使用的是 **主机系统默认的 GCC 5**,而非交叉编译器(uclibc 9.1)。 - **根本原因**:`Makefile` 或编译命令中未强制使用交叉编译器(`arm-sigmastar-linux-uclibcgnueabihf-gcc`)。 2. **C++ 标准不匹配** - `std::pair` 构造错误可能由 **C++ 标准版本不一致** 引起。代码可能依赖 C++11 或更高标准,而系统默认使用 C++98。 3. **头文件路径冲突** - 编译器可能引用了 **主机系统的标准库头文件**(如 `/usr/include/c++/5`),而非交叉编译器自带的头文件。 --- ### 解决方案 #### 1. **强制使用交叉编译器** - **检查 `Makefile` 中的 `CC` 和 `CXX` 设置**: 确保 `Makefile` 中显式定义了交叉编译器: ```makefile CC := arm-sigmastar-linux-uclibcgnueabihf-gcc CXX := arm-sigmastar-linux-uclibcgnueabihf-g++ ``` - **命令覆盖**: 直接在 `make` 命令中指定编译器: ```bash make CC=arm-sigmastar-linux-uclibcgnueabihf-gcc CXX=arm-sigmastar-linux-uclibcgnueabihf-g++ ``` #### 2. **指定 C++ 标准** - **添加 `-std=c++11` 或更高版本**: 在 `CXXFLAGS` 中指定 C++ 标准: ```makefile CXXFLAGS += -std=c++11 ``` - **验证编译器支持**: 检查交叉编译器是否支持 C++11: ```bash arm-sigmastar-linux-uclibcgnueabihf-g++ -dM -E -x c++ /dev/null | grep __cplusplus # 输出应为 `#define __cplusplus 201103L` 或更高 ``` #### 3. **修正头文件路径** - **显式指定交叉编译器的头文件路径**: 确保编译器优先查找交叉编译器的头文件(而非系统路径): ```makefile CXXFLAGS += -I/tools/toolchain/arm-sigmastar-linux-uclibcgnueabihf-9.1.0/arm-sigmastar-linux-uclibcgnueabihf/include ``` - **禁用系统路径**: 避免编译器自动包含系统路径(如 `/usr/include`): ```makefile CXXFLAGS += -nostdinc -nostdinc++ ``` #### 4. **验证交叉编译器环境** - **检查编译器版本**: ```bash arm-sigmastar-linux-uclibcgnueabihf-gcc --version # 应显示 GCC 9.1.0 ``` - **检查头文件路径**: ```bash arm-sigmastar-linux-uclibcgnueabihf-gcc -print-search-dirs # 确认输出中的 `include` 路径指向交叉编译器目录 ``` --- ### 完整修复步骤 1. **确保交叉编译器路径优先**: 在 `~/.bashrc` 中设置: ```bash export PATH=/tools/toolchain/arm-sigmastar-linux-uclibcgnueabihf-9.1.0/bin:$PATH export CROSS_COMPILE=arm-sigmastar-linux-uclibcgnueabihf- export ARCH=arm ``` 然后重新加载配置: ```bash source ~/.bashrc ``` 2. **修改 `Makefile` 或命令参数**: - **方法 1**:在 `Makefile` 中显式定义交叉编译器和 C++ 标准: ```makefile CC := $(CROSS_COMPILE)gcc CXX := $(CROSS_COMPILE)g++ CXXFLAGS += -std=c++11 ``` - **方法 2**:直接在命令指定: ```bash make CC=arm-sigmastar-linux-uclibcgnueabihf-gcc CXX=arm-sigmastar-linux-uclibcgnueabihf-g++ CXXFLAGS="-std=c++11" ``` 3. **验证编译器和头文件路径**: ```bash which arm-sigmastar-linux-uclibcgnueabihf-gcc # 应输出工具链路径 arm-sigmastar-linux-uclibcgnueabihf-g++ -dM -E -x c++ /dev/null | grep __cplusplus # 应输出 `#define __cplusplus 201103L` ``` 4. **重新编译项目**: ```bash make clean make ``` --- ### 常见问题排查 | 问题 | 原因 | 解决方案 | |------|------|----------| | 编译器仍使用主机系统版本 | `PATH` 未正确设置或 `Makefile` 覆盖了 `CC` | 检查 `PATH` 和 `Makefile` 中的 `CC` 定义 | | `std::pair` 错误依旧存在 | C++ 标准未指定或交叉编译器不支持 | 添加 `-std=c++11` 或检查编译器版本 | | 头文件冲突 | 编译器包含路径错误 | 使用 `-I` 显式指定交叉编译器头文件路径 | --- ### 总结 通过 **强制使用交叉编译器**、**指定 C++ 标准**、**修正头文件路径**,可以解决编译错误。若问题仍未解决,需检查工具链安装完整性或代码对交叉编译环境的兼容性。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值