XCode Command PhaseScriptExecution failed with a nonzero exit code - Mac M1 Max - xcode

I've tried almost every solution on GitHub and StackOverflow, nothing is working. After changing from a Intel based mac to a M1 Max mac, my Flutter app stopped compiling, giving this weird error without any further detail. I'm attaching the XCode logs. I really need help please. Thank you!
Showing Recent Errors Only
PhaseScriptExecution Run\ Script /Users/alessandrodefendenti/Library/Developer/Xcode/DerivedData/Runner-deveoduanwnjibbunuscrmjquxnr/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/Script-9740EEB61CF901F6004384FC.sh (in target 'Runner' from project 'Runner')
cd /Users/alessandrodefendenti/Projects/Flutter/winefriends/ios
*** exports here ***
export variant\=normal
/bin/sh -c /Users/alessandrodefendenti/Library/Developer/Xcode/DerivedData/Runner-deveoduanwnjibbunuscrmjquxnr/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/Script-9740EEB61CF901F6004384FC.sh
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/feature_discovery-0.14.1/lib/src/widgets/layout.dart:92:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/Applications/flutter/packages/flutter/lib/src/widgets/binding.dart').
WidgetsBinding.instance!.addPostFrameCallback((_) {
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/feature_discovery-0.14.1/lib/src/widgets/layout.dart:112:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/Applications/flutter/packages/flutter/lib/src/widgets/binding.dart').
WidgetsBinding.instance!.addPostFrameCallback((_) {
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/multi_image_picker-4.8.01/lib/src/asset.dart:93:21: Warning: Operand of null-aware operation '!' has type 'ServicesBinding' which excludes null.
- 'ServicesBinding' is from 'package:flutter/src/services/binding.dart' ('/Applications/flutter/packages/flutter/lib/src/services/binding.dart').
ServicesBinding.instance!.defaultBinaryMessenger
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/multi_image_picker-4.8.01/lib/src/asset.dart:96:23: Warning: Operand of null-aware operation '!' has type 'ServicesBinding' which excludes null.
- 'ServicesBinding' is from 'package:flutter/src/services/binding.dart' ('/Applications/flutter/packages/flutter/lib/src/services/binding.dart').
ServicesBinding.instance!.defaultBinaryMessenger
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/multi_image_picker-4.8.01/lib/src/asset.dart:122:21: Warning: Operand of null-aware operation '!' has type 'ServicesBinding' which excludes null.
- 'ServicesBinding' is from 'package:flutter/src/services/binding.dart' ('/Applications/flutter/packages/flutter/lib/src/services/binding.dart').
ServicesBinding.instance!.defaultBinaryMessenger
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/multi_image_picker-4.8.01/lib/src/asset.dart:125:23: Warning: Operand of null-aware operation '!' has type 'ServicesBinding' which excludes null.
- 'ServicesBinding' is from 'package:flutter/src/services/binding.dart' ('/Applications/flutter/packages/flutter/lib/src/services/binding.dart').
ServicesBinding.instance!.defaultBinaryMessenger
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/win32-2.3.3/lib/src/structs.g.dart:661:31: Error: Member not found: 'UnicodeChar'.
int get UnicodeChar => Char.UnicodeChar;
^^^^^^^^^^^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/win32-2.3.3/lib/src/structs.g.dart:662:38: Error: Setter not found: 'UnicodeChar'.
set UnicodeChar(int value) => Char.UnicodeChar = value;
^^^^^^^^^^^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/win32-2.3.3/lib/src/structs.g.dart:664:29: Error: Member not found: 'AsciiChar'.
int get AsciiChar => Char.AsciiChar;
^^^^^^^^^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/win32-2.3.3/lib/src/structs.g.dart:665:36: Error: Setter not found: 'AsciiChar'.
set AsciiChar(int value) => Char.AsciiChar = value;
^^^^^^^^^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/flare_flutter-3.0.2/lib/flare_render_box.dart:167:26: Warning: Operand of null-aware operation '?.' has type 'SchedulerBinding' which excludes null.
- 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/Applications/flutter/packages/flutter/lib/src/scheduler/binding.dart').
SchedulerBinding.instance?.cancelFrameCallbackWithId(_frameCallbackID);
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/flare_flutter-3.0.2/lib/flare_render_box.dart:170:28: Warning: Operand of null-aware operation '?.' has type 'SchedulerBinding' which excludes null.
- 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/Applications/flutter/packages/flutter/lib/src/scheduler/binding.dart').
SchedulerBinding.instance?.scheduleFrameCallback(_beginFrame) ?? -1;
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/flare_flutter-3.0.2/lib/flare_render_box.dart:272:26: Warning: Operand of null-aware operation '?.' has type 'SchedulerBinding' which excludes null.
- 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/Applications/flutter/packages/flutter/lib/src/scheduler/binding.dart').
SchedulerBinding.instance?.cancelFrameCallbackWithId(_frameCallbackID);
^
Failed to package /Users/alessandrodefendenti/Projects/Flutter/winefriends.
Command PhaseScriptExecution failed with a nonzero exit code

I think you are using an older flutter version which had WidgetBinding as a nullable value but in flutter 3+ widgetbinding is non nullable. The feature discovery had been resolved to the latest version which probably works only in flutter 3+.
Try downgrading the feature discovery package that supports older version of flutter

Try to install rosetta, this solved my issue.
sudo softwareupdate --install-rosetta --agree-to-license

Related

M1 Command PhaseScriptExecution failed with a nonzero exit code / encounted error while building this device

Good afternoon everyone,
Ive been trying to make the app run and it doesnt work i’ve tried everything please help.
Thank you so much in advance!
MacBook Pro (13-inch, M1, 2020)
macOS Monterey version 12.3.1
Xcode Version 13.3.1 (13E500a)
android studio bumblebee 2021.1.1 patch 3
flutter channel stable
everything running in rosseta 2 including the simulator
Command Flutter build iOS:
Android studio:
Error output from Xcode build:
↳
objc[13420]: Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x1e56e1eb0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1043644f8). One of the two will be used. Which one is undefined.
objc[13420]: Class AppleTypeCRetimerFirmwareAggregateRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x1e56e1f00) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104364548). One of the two will be used. Which one is undefined.
objc[13420]: Class AppleTypeCRetimerFirmwareRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x1e56e1f50) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104364598). One of the two will be used. Which one is undefined.
objc[13420]: Class ATCRTRestoreInfoFTABFile is implemented in both /usr/lib/libauthinstall.dylib (0x1e56e1fa0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1043645e8). One of the two will be used. Which one is undefined.
objc[13420]: Class AppleTypeCRetimerFirmwareCopier is implemented in both /usr/lib/libauthinstall.dylib (0x1e56e1ff0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104364638). One of the two will be used. Which one is undefined.
objc[13420]: Class ATCRTRestoreInfoFTABSubfile is implemented in both /usr/lib/libauthinstall.dylib (0x1e56e2040) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104364688). One of the two will be used. Which one is undefined.
2022-04-26 12:51:00.034 xcodebuild[13420:385696] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-04-26 12:51:00.035 xcodebuild[13420:385696] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/75/1k4jl9xd4qn5p8fstmtzs43h0000gn/T/flutter_tools.Ajgo6z/flutter_ios_build_temp_dirfVfbjn/temporary_xcresult_bundle
/Users/aryuna/studioprojects/Uniyo/ios/Pods/libwebp/src/enc/backward_references_enc.c:694:12: warning: variable 'best_offset' may be uninitialized when used here [-Wconditional-uninitialized]
(best_offset << MAX_LENGTH_BITS) | (uint32_t)best_length;
^~~~~~~~~~~
/Users/aryuna/studioprojects/Uniyo/ios/Pods/libwebp/src/enc/backward_references_enc.c:626:20: note: initialize the variable 'best_offset' to silence this warning
int best_offset;
^
= 0
1 warning generated.
/Users/aryuna/studioprojects/Uniyo/ios/Pods/libwebp/src/enc/backward_references_enc.c:694:12: warning: variable 'best_offset' may be uninitialized when used here [-Wconditional-uninitialized]
(best_offset << MAX_LENGTH_BITS) | (uint32_t)best_length;
^~~~~~~~~~~
/Users/aryuna/studioprojects/Uniyo/ios/Pods/libwebp/src/enc/backward_references_enc.c:626:20: note: initialize the variable 'best_offset' to silence this warning
int best_offset;
^
= 0
1 warning generated.
4 warnings generated.
/Users/aryuna/studioprojects/Uniyo/ios/Pods/libwebp/src/enc/backward_references_enc.c:694:12: warning: variable 'best_offset' may be uninitialized when used here [-Wconditional-uninitialized]
(best_offset << MAX_LENGTH_BITS) | (uint32_t)best_length;
^~~~~~~~~~~
/Users/aryuna/studioprojects/Uniyo/ios/Pods/libwebp/src/enc/backward_references_enc.c:626:20: note: initialize the variable 'best_offset' to silence this warning
int best_offset;
^
= 0
1 warning generated.
/Users/aryuna/studioprojects/flutter/.pub-cache/hosted/pub.dartlang.org/pay_ios-1.0.6/ios/Classes/PaymentExtensions.swift:40:22: warning: expression implicitly coerced from 'String?' to 'Any'
"displayName": displayName,
^~~~~~~~~~~
/Users/aryuna/studioprojects/flutter/.pub-cache/hosted/pub.dartlang.org/pay_ios-1.0.6/ios/Classes/PaymentExtensions.swift:40:22: note: provide a default value to avoid this warning
"displayName": displayName,
^~~~~~~~~~~
?? <#default value#>
/Users/aryuna/studioprojects/flutter/.pub-cache/hosted/pub.dartlang.org/pay_ios-1.0.6/ios/Classes/PaymentExtensions.swift:40:22: note: force-unwrap the value to avoid this warning
"displayName": displayName,
^~~~~~~~~~~
!
/Users/aryuna/studioprojects/flutter/.pub-cache/hosted/pub.dartlang.org/pay_ios-1.0.6/ios/Classes/PaymentExtensions.swift:40:22: note: explicitly cast to 'Any' with 'as Any' to silence this warning
"displayName": displayName,
^~~~~~~~~~~
as Any
/Users/aryuna/studioprojects/flutter/.pub-cache/hosted/pub.dartlang.org/pay_ios-1.0.6/ios/Classes/PaymentExtensions.swift:41:18: warning: expression implicitly coerced from 'String?' to 'Any'
"network": network?.rawValue,
^~~~~~~~~~~~~~~~~
/Users/aryuna/studioprojects/flutter/.pub-cache/hosted/pub.dartlang.org/pay_ios-1.0.6/ios/Classes/PaymentExtensions.swift:41:27: note: provide a default value to avoid this warning
"network": network?.rawValue,
~~~~~~~~~^~~~~~~~
?? <#default value#>
/Users/aryuna/studioprojects/flutter/.pub-cache/hosted/pub.dartlang.org/pay_ios-1.0.6/ios/Classes/PaymentExtensions.swift:41:27: note: force-unwrap the value to avoid this warning
"network": network?.rawValue,
~~~~~~~~~^~~~~~~~
!
/Users/aryuna/studioprojects/flutter/.pub-cache/hosted/pub.dartlang.org/pay_ios-1.0.6/ios/Classes/PaymentExtensions.swift:41:27: note: explicitly cast to 'Any' with 'as Any' to silence this warning
"network": network?.rawValue,
~~~~~~~~~^~~~~~~~
as Any
/Users/aryuna/studioprojects/flutter/.pub-cache/hosted/pub.dartlang.org/pay_ios-1.0.6/ios/Classes/PaymentExtensions.swift:67:21: warning: expression implicitly coerced from 'String?' to 'Any'
"namePrefix": namePrefix,
^~~~~~~~~~
/Users/aryuna/studioprojects/flutter/.pub-cache/hosted/pub.dartlang.org/pay_ios-1.0.6/ios/Classes/PaymentExtensions.swift:67:21: note: provide a default value to avoid this warning
"namePrefix": namePrefix,
^~~~~~~~~~
?? <#default value#>
/Users/aryuna/studioprojects/flutter/.pub-cache/hosted/pub.dartlang.org/pay_ios-1.0.6/ios/Classes/PaymentExtensions.swift:67:21: note: force-unwrap the value to avoid this warning
"namePrefix": namePrefix,
^~~~~~~~~~
!
/Users/aryuna/studioprojects/flutter/.pub-cache/hosted/pub.dartlang.org/pay_ios-1.0.6/ios/Classes/PaymentExtensions.swift:67:21: note: explicitly cast to 'Any' with 'as Any' to silence this warning
"namePrefix": namePrefix,
^~~~~~~~~~
as Any
/Users/aryuna/studioprojects/flutter/.pub-cache/hosted/pub.dartlang.org/pay_ios-1.0.6/ios/Classes/PaymentExtensions.swift:68:20: warning: expression implicitly coerced from 'String?' to 'Any'
"givenName": givenName,
^~~~~~~~~
/Users/aryuna/studioprojects/flutter/.pub-cache/hosted/pub.dartlang.org/pay_ios-1.0.6/ios/Classes/PaymentExtensions.swift:68:20: note: provide a default value to avoid this warning
"givenName": givenName,
^~~~~~~~~
?? <#default value#>
/Users/aryuna/studioprojects/flutter/.pub-cache/hosted/pub.dartlang.org/pay_ios-1.0.6/ios/Classes/PaymentExtensions.swift:68:20: note: force-unwrap the value to avoid this warning
"givenName": givenName,
^~~~~~~~~
!
/Users/aryuna/studioprojects/flutter/.pub-cache/hosted/pub.dartlang.org/pay_ios-1.0.6/ios/Classes/PaymentExtensions.swift:68:20: note: explicitly cast to 'Any' with 'as Any' to silence this warning
"givenName": givenName,
^~~~~~~~~
as Any
/Users/aryuna/studioprojects/flutter/.pub-cache/hosted/pub.dartlang.org/pay_ios-1.0.6/ios/Classes/PaymentExtensions.swift:69:21: warning: expression implicitly coerced from 'String?' to 'Any'
"middleName": middleName,
^~~~~~~~~~
/Users/aryuna/studioprojects/flutter/.pub-cache/hosted/pub.dartlang.org/pay_ios-1.0.6/ios/Classes/PaymentExtensions.swift:69:21: note: provide a default value to avoid this warning
"middleName": middleName,
^~~~~~~~~~
?? <#default value#>
/Users/aryuna/
lib/Screens/me/Selling/selling.dart:436:70: Error: The getter 'TEST' isn't defined for the class 'Screen'.
- 'Screen' is from 'package:uniyo/class/Util.dart' ('lib/class/Util.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'TEST'.
utils.changeScreen(context, utils.screen.TEST);
^^^^
lib/class/Basket.dart:175:33: Error: The getter 'bookingTime' isn't defined for the class 'BasketItem'.
- 'BasketItem' is from 'package:uniyo/class/BasketItem.dart' ('lib/class/BasketItem.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'bookingTime'.
int bookingTime = service.bookingTime;
^^^^^^^^^^^
lib/Screens/home/homepage.dart:140:27: Error: The getter 'SliverStaggeredGrid' isn't defined for the class '_HomePageState'.
- '_HomePageState' is from 'package:uniyo/Screens/home/homepage.dart' ('lib/Screens/home/homepage.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'SliverStaggeredGrid'.
SliverStaggeredGrid.count(
^^^^^^^^^^^^^^^^^^^
lib/Screens/home/homepage.dart:247:42: Error: The getter 'StaggeredTile' isn't defined for the class '_HomePageState'.
- '_HomePageState' is from 'package:uniyo/Screens/home/homepage.dart' ('lib/Screens/home/homepage.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'StaggeredTile'.
return StaggeredTile.count(4, 4);
^^^^^^^^^^^^^
lib/Screens/home/homepage.dart:253:42: Error: The getter 'StaggeredTile' isn't defined for the class '_HomePageState'.
- '_HomePageState' is from 'package:uniyo/Screens/home/homepage.dart' ('lib/Screens/home/homepage.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'StaggeredTile'.
return StaggeredTile.count(2, 4);
^^^^^^^^^^^^^
lib/Screens/home/homepage.dart:262:42: Error: The getter 'StaggeredTile' isn't defined for the class '_HomePageState'.
- '_HomePageState' is from 'package:uniyo/Screens/home/homepage.dart' ('lib/Screens/home/homepage.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'StaggeredTile'.
return StaggeredTile.count(2, 2);
^^^^^^^^^^^^^
lib/Screens/home/homepage.dart:265:42: Error: The getter 'StaggeredTile' isn't defined for the class '_HomePageState'.
- '_HomePageState' is from 'package:uniyo/Screens/home/homepage.dart' ('lib/Screens/home/homepage.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'StaggeredTile'.
return StaggeredTile.count(4, 2);
^^^^^^^^^^^^^
lib/Screens/home/homepage.dart:273:42: Error: The getter 'StaggeredTile' isn't defined for the class '_HomePageState'.
- '_HomePageState' is from 'package:uniyo/Screens/home/homepage.dart' ('lib/Screens/home/homepage.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'StaggeredTile'.
return StaggeredTile.count(2, 2);
^^^^^^^^^^^^^
lib/Screens/home/homepage.dart:275:40: Error: The getter 'StaggeredTile' isn't defined for the class '_HomePageState'.
- '_HomePageState' is from 'package:uniyo/Screens/home/homepage.dart' ('lib/Screens/home/homepage.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'StaggeredTile'.
return StaggeredTile.count(1, 1);
^^^^^^^^^^^^^
lib/widgets/Search.dart:179:60: Error: The getter 'REQUEST2' isn't defined for the class 'Screen'.
- 'Screen' is from 'package:uniyo/class/Util.dart' ('lib/class/Util.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'REQUEST2'.
utils.changeScreen(context, utils.screen.REQUEST2);
^^^^^^^^
lib/Screens/add/supporting_screens_add/reviews4.dart:52:32: Error: The getter 'Lottie' isn't defined for the class 'reviews4'.
- 'reviews4' is from 'package:uniyo/Screens/add/supporting_screens_add/reviews4.dart' ('lib/Screens/add/supporting_screens_add/reviews4.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'Lottie'.
child: Lottie.asset(
^^^^^^
lib/Screens/add/supporting_screens_add/reviews2.dart:26:16: Error: The getter 'Lottie' isn't defined for the class 'reviews2'.
- 'reviews2' is from 'package:uniyo/Screens/add/supporting_screens_add/reviews2.dart' ('lib/Screens/add/supporting_screens_add/reviews2.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'Lottie'.
var anim = Lottie.asset('assets/animations/check9.json',
^^^^^^
Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-uri:package%3Aquick_feedback%2Fquick_feedback.dart; message=StandardFileSystem only supports file:* and data:* URIs)
#0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:34:7)
#1 asFileUri (package:vm/kernel_front_end.dart:623:37)
#2 writeDepfile (package:vm/kernel_front_end.dart:763:21)
<asynchronous suspension>
#3 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:586:9)
<asynchronous suspension>
#4 starter (package:flutter_frontend_server/server.dart:85:12)
<asynchronous suspension>
#5 main (file:///opt/s/w/ir/cache/builder/src/flutter/flutter_frontend_server/bin/starter.dart:13:24)
<asynchronous suspension>
Failed to package /Users/aryuna/studioprojects/Uniyo.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
/Users/aryuna/studioprojects/Uniyo/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.4.99. (in target 'leveldb-library' from project 'Pods')
Result bundle written to path:
/var/folders/75/1k4jl9xd4qn5p8fstmtzs43h0000gn/T/flutter_tools.Ajgo6z/flutter_ios_build_temp_dirfVfbjn/temporary_xcresult_bundle
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
Xcode keeps asking me to update to recommended settings 12 repeatedly after updating something is changing them back even tho its specified in podfile swell
Terminal : Encountered error while building for device.
Flutter 2.10.5 • channel stable •
Tools • Dart 2.16.2 • DevTools 2.9.2

gcc / clang: -fmax-errors / -ferror-limit: why the triggering condition is "exceeded" rather than "reached"?

Sample code (t999.c):
int_ x;
Incvocatoins:
$ gcc t999.c -fmax-errors=1
t999.c:1:1: error: unknown type name ‘int_’; did you mean ‘int’?
1 | int_ x;
| ^~~~
| int
$ clang t999.c -ferror-limit=1
t999.c:1:1: error: unknown type name 'int_'; did you mean 'int'?
int_ x;
^~~~
int
1 error generated.
Here we see that:
gcc have not generated compilation terminated due to -fmax-errors=1.
clang have not generated fatal error: too many errors emitted, stopping now [-ferror-limit=].
Conclusion: in both gcc and clang the triggering condition is "exceeded" rather than "reached".
Descriptions:
-fmax-errors=n
Limits the maximum number of error messages to n, at which point GCC
bails out rather than attempting to continue processing the source
code.
-ferror-limit=123
Stop emitting diagnostics after 123 errors have been produced.
Questions:
Why the triggering condition is "exceeded" rather than "reached"?
Should the triggering condition be "reached" rather than "exceeded"?
(extra) Does the current behavior ("exceeded" rather than "reached") correspond to the descriptions above?

Botan build error 'AutoSeeded_RNG' does not name a type

Trying to build the Botan executable, I am getting the following error:
../src/cli/timing_tests.cpp: In static member function 'static Botan::RandomNumberGenerator& Botan_CLI::Timing_Test::timing_test_rng()':
../src/cli/timing_tests.cpp:100:17: error: 'AutoSeeded_RNG' does not name a type
static AutoSeeded_RNG static_timing_test_rng(Botan::Entropy_Sources::global_sources(), 0);
^~~~~~~~~~~~~~
../src/cli/timing_tests.cpp:101:17: error: 'static_timing_test_rng' was not declared in this scope
return static_timing_test_rng;
^~~~~~~~~~~~~~~~~~~~~~
../src/cli/timing_tests.cpp:101:17: note: suggested alternative: 'timing_test_rng'
return static_timing_test_rng;
^~~~~~~~~~~~~~~~~~~~~~
timing_test_rng
make: *** [Makefile:606: build/obj/cli/timing_tests.o] Error 1
this is the C++ code:
static Botan::RandomNumberGenerator& timing_test_rng()
{
#if defined(BOTAN_HAS_SYSTEM_RNG)
return Botan::system_rng();
#elif defined(BOTAN_HAS_AUTO_SEEDING_RNG)
static AutoSeeded_RNG static_timing_test_rng(Botan::Entropy_Sources::global_sources(), 0);
return static_timing_test_rng;
#else
// we could just use SHA-256 in OFB mode for these purposes
throw CLI_Error("Timing tests require a PRNG");
#endif
}
I am using these settings:
configure.py --prefix=$BUILD_DIR --with-external-includedir=$OPENSSL_PREFIX/include --with-external-libdir=$OPENSSL_PREFIX/lib --os=mingw --cpu=i386 --minimized-build --enable- modules=rsa,dsa,ecdsa,ed25519,hmac,hmac_drbg,mode_pad,bigint,filters,block,auto_rng,x509,cbc,dh --with-openssl
(building with mingw32, in Windows 10. Botan version 2.11.0)
I am pretty new on this. Any ideas?
EDIT: Changed to version 2.10.0, since 2.11.0 is not yet official, however the error did now change, to :
undefined reference to 'Botan::CPUID::state()'
Seems like adding entropy source system_rng solves this problem. Just add it to the enable-modules list. Got this from Jack Lloyd, creator of the Botan lib,

Insert a Node at the Tail of a Linked List

Node* Insert(Node *head,int data)
{
Node *current=head;
Node *new=(Node *)malloc(size0f(Node));
new->data=data;
while(current->next!=NULL)
{
current=current->next;
}
current->next=new;
new->next=NULL;
return head;
}
Error:
solution.cc: In function 'Node* Insert(Node*, int)':
solution.cc:23:10: error: expected unqualified-id before 'new' Node *new=(Node *)malloc(size0f(Node)); ^
solution.cc:23:10: error: expected initializer before 'new'
solution.cc:24:7: error: expected type-specifier before '->' token new->data=data; ^
solution.cc:29:22: error: expected type-specifier before ';' token current->next=new; ^
solution.cc:30:8: error: expected type-specifier before '->' token new->next=NULL;
I think new is a keyword and you are trying to use that as a variable name in
`Node *new=(Node *)malloc(size0f(Node));`
and subsequent code.
Try replacing it with something like newNode, like below
`Node *newNode=(Node *)malloc(size0f(Node));`
And then use newNode in subsequent code instead of new
I guess #vmachan is right, you shouldn't use new as a variable name.
Besides, I think you were looking for sizeof instead of size0f?

Compiling OpenMCU in Linux (Fedora12)

I am tring to compile OpenMCU in fedora 12. Since the orignal project was compiled in VC++, it has some compatiility issues with gcc.
I am using gcc 4.4.4 and febora 12.
The error shows somehting like this.
In file included from mcu.h:84,
from main.cxx:56:
filemembers.h:123: error: ISO C++ forbids declaration of ‘deque’ with no type
filemembers.h:123: error: typedef name may not be a nested-name-specifier
filemembers.h:123: error: expected ‘;’ before ‘<’ token
filemembers.h:124: error: ISO C++ forbids declaration of ‘FilenameList’ with no type
filemembers.h:124: error: expected ‘,’ or ‘...’ before ‘&’ token
In file included from mcu.h:84,
from main.cxx:56:
filemembers.h:149: error: ‘FilenameList’ does not name a type
make: *** [obj_linux_x86_r/main.o] Error 1
when checked in the source code of that perticular file it was something like this...
class ConferenceFileMember : public ConferenceMember
{
PCLASSINFO(ConferenceFileMember, ConferenceMember);
public:
ConferenceFileMember(Conference * conference, const PFilePath & _fn, PFile::OpenMode mode);
*typedef std::deque<PFilePath> FilenameList; //Line 123..*
ConferenceFileMember(Conference * conference, const FilenameList & _fns, PFile::OpenMode mode);
~ConferenceFileMember();
void Unlisten();
Seems to be a simple syntax issue. Can someone help me in this regards?
Thanx in advance..
Looks like std::deque is not defined. Did you #include <deque>?

Resources