'...' is not a postfix unary operator on Travis CI - xcode

I've been slowly updating an old project and suddenly started getting this error from Travis CI...
2018-05-20 13:32:21.393 xcodebuild[1348:5913] Error Domain=IDETestOperationsObserverErrorDomain Code=4 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/travis/Library/Developer/Xcode/DerivedData/CF_Apps-eihscxvvnylkkecahehxquvcotoo/Logs/Test/2B963612-D4B6-4CE6-BD58-FC9C49FFAE11/Session-CF Apps Tests-2018-05-20_133203-xth6Px.log" UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/travis/Library/Developer/Xcode/DerivedData/CF_Apps-eihscxvvnylkkecahehxquvcotoo/Logs/Test/2B963612-D4B6-4CE6-BD58-FC9C49FFAE11/Session-CF Apps Tests-2018-05-20_133203-xth6Px.log}
2018-05-20 13:32:21.394 xcodebuild[1348:7053] Connection peer refused channel request for "dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface"; channel canceled <DTXChannel: 0x7fb70286f820>
Testing failed:
'...' is not a postfix unary operator
'count' is unavailable: there is no universally good answer, see the documentation comment for discussion
Cannot convert value of type 'Int' to expected argument type 'IntMax' (aka 'Int64')
Cannot convert value of type 'Int8' to expected argument type 'IntMax' (aka 'Int64')
Cannot convert value of type 'Int16' to expected argument type 'IntMax' (aka 'Int64')
Cannot convert value of type 'Int32' to expected argument type 'IntMax' (aka 'Int64')
Cannot convert value of type 'UInt' to expected argument type 'UIntMax' (aka 'UInt64')
Cannot convert value of type 'UInt8' to expected argument type 'UIntMax' (aka 'UInt64')
Cannot convert value of type 'UInt16' to expected argument type 'UIntMax' (aka 'UInt64')
Cannot convert value of type 'UInt32' to expected argument type 'UIntMax' (aka 'UInt64')
** TEST FAILED **
The following build commands failed:
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
CompileSwift normal x86_64 /Users/travis/build/osis/cf-apps-ios/Pods/ObjectMapper/Sources/HexColorTransform.swift
CompileSwift normal x86_64 /Users/travis/build/osis/cf-apps-ios/Pods/ObjectMapper/Sources/IntegerOperators.swift
(3 failures)
The command "xcodebuild -workspace CF\ Apps.xcworkspace -scheme CF\ Apps -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone SE' build-for-testing test" exited with 65.
Done. Your build exited with 1.
/Users/travis/.travis/job_stages: line 166: shell_session_update: command not found
I haven't changed any code and this runs properly locally.

While updating many things I overlooked the Xcode bump diff between my local environment and Travis CI.
Changing...
osx_image: xcode8.3
to...
osx_image: xcode9.3
in my .travis.yml fixed this for me.

Related

Why do I get a "0x1004" when trying to deploy my solana anchor IDL?

When I try to deploy an IDL with anchor, I get a cryptic "Custom Error 0x1004" message. What does this mean:?
$ anchor idl init --provider.cluster testnet --filepath ./target/idl/myprogram.json sa3BafcCxwD6G3tUbvTcvnCD28sCXhpasauLtpw9HdA
Error: Error processing Instruction 0: custom program error: 0x1004
0x1004 is hexadecimal for 4100, or the DeclaredProgramIdMismatch error.
So somewhere in your program, you're declaring a different program id than the one you deployed with:
declare_id!("some_other_program_id"); // this is not your program id!

error running yarn build about big integer literals

I'm trying to install crater app and it says to do yarn build. I keep getting errors, and everything is up to date so I am lost on how to fix this one:
error during build:
Error: Transform failed with 3 errors:
assets/vendor.6c423067.js:56507:1751: error: Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
assets/vendor.6c423067.js:56507:3030: error: Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
assets/vendor.6c423067.js:56507:3070: error: Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
at failureErrorWithLog (/var/www/admin.thehigheryougo/crater/node_modules/esbuild/lib/main.js:1493:15)
at /var/www/admin.thehigheryougo/crater/node_modules/esbuild/lib/main.js:1282:29
at /var/www/admin.thehigheryougo/crater/node_modules/esbuild/lib/main.js:629:9
at handleIncomingPacket (/var/www/admin.thehigheryougo/crater/node_modules/esbuild/lib/main.js:726:9)
at Socket.readFromStdout (/var/www/admin.thehigheryougo/crater/node_modules/esbuild/lib/main.js:596:7)
at Socket.emit (events.js:400:28)
at addChunk (internal/streams/readable.js:290:12)
at readableAddChunk (internal/streams/readable.js:265:9)
at Socket.Readable.push (internal/streams/readable.js:204:10)
at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)
error Command failed with exit code 1.
I am familiar with npm and how to fix issues with that, but this is my first time using yarn and I couldnt find a related topic for how to resolve it. Please help!

Error: failed post-processing: 820:39: missing ',' in argument list

protoc-gen-validate is a protoc plugin to generate polyglot message validators.
The project uses Bazel for builds and has an open pull request to add support for customization of validation error messages.
The original code was made in 2020. Recently it was updated with the latest code, and after fixing all merge conflicts now it fails to build, but I can't find the issue:
~/GitHub/protoc-gen-validate (i18n) $ make bazel-tests
bazel test //tests/... --test_output=errors
INFO: Analyzed 68 targets (0 packages loaded, 0 targets configured).
INFO: Found 62 targets and 6 test targets...
ERROR: /Users/mparnisari/GitHub/protoc-gen-validate/tests/harness/cases/BUILD:46:21: Generating into bazel-out/darwin-fastbuild/bin/tests/harness/cases/go_/github.com/envoyproxy/protoc-gen-validate/tests/harness/cases/go failed: (Exit 1): go-protoc-bin failed: error executing command bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/io_bazel_rules_go/go/tools/builders/go-protoc-bin_/go-protoc-bin -protoc bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/com_google_protobuf/protoc ... (remaining 117 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
[error] failed post-processing: 820:39: missing ',' in argument list (and 10 more errors)
--validate_out: protoc-gen-validate: Plugin failed with status code 1.
2021/12/14 23:46:43 error running protoc: exit status 1
ERROR: /Users/mparnisari/GitHub/protoc-gen-validate/tests/harness/cases/BUILD:46:21 GoCompilePkg tests/harness/cases/go.a failed: (Exit 1): go-protoc-bin failed: error executing command bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/io_bazel_rules_go/go/tools/builders/go-protoc-bin_/go-protoc-bin -protoc bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/com_google_protobuf/protoc ... (remaining 117 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
INFO: Elapsed time: 0.962s, Critical Path: 0.48s
INFO: 8 processes: 8 internal.
FAILED: Build did NOT complete successfully
Judging by the fact that the error ([error] failed post-processing: 820:39: missing ',' in argument list (and 10 more errors)) appears immediately after I fire the tests command, I figure this is an issue with Bazel, but I'm not sure.
UPDATE 1: I narrowed it down to this:
~/GitHub/fork/protoc-gen-validate (i18n) $ make testcases
cd tests/harness/cases && \
protoc \
-I . \
-I ../../.. \
--go_out="module=github.com/envoyproxy/protoc-gen-validate/tests/harness/cases/go,Mtests/harness/cases/other_package/embed.proto=github.com/envoyproxy/protoc-gen-validate/tests/harness/cases/other_package/go;other_package,Mtests/harness/cases/yet_another_package/embed.proto=github.com/envoyproxy/protoc-gen-validate/tests/harness/cases/yet_another_package/go,Mvalidate/validate.proto=github.com/envoyproxy/protoc-gen-validate/validate,Mgoogle/protobuf/any.proto=google.golang.org/protobuf/types/known/anypb,Mgoogle/protobuf/duration.proto=google.golang.org/protobuf/types/known/durationpb,Mgoogle/protobuf/struct.proto=google.golang.org/protobuf/types/known/structpb,Mgoogle/protobuf/timestamp.proto=google.golang.org/protobuf/types/known/timestamppb,Mgoogle/protobuf/wrappers.proto=google.golang.org/protobuf/types/known/wrapperspb,Mgoogle/protobuf/descriptor.proto=google.golang.org/protobuf/types/descriptorpb:./go" \
--plugin=protoc-gen-go=/Users/mparnisari/go/bin/protoc-gen-go \
--validate_out="module=github.com/envoyproxy/protoc-gen-validate/tests/harness/cases/go,lang=go,Mtests/harness/cases/other_package/embed.proto=github.com/envoyproxy/protoc-gen-validate/tests/harness/cases/other_package/go,Mtests/harness/cases/yet_another_package/embed.proto=github.com/envoyproxy/protoc-gen-validate/tests/harness/cases/yet_another_package/go:./go" \
./*.proto
filename-with-dash.proto:5:1: warning: Import validate/validate.proto is unused.
[error] failed post-processing: 820:39: missing ',' in argument list (and 10 more errors)
--validate_out: protoc-gen-validate: Plugin failed with status code 1.
make:
*** [testcases] Error 1
UPDATE 2: narrowed it down. if I delete this file: tests/harness/cases/maps.proto
make testcases works
UPDATE 3: narrowed it down. if I remove these lines: https://github.com/envoyproxy/protoc-gen-validate/blob/main/tests/harness/cases/maps.proto#L14-L17
make testcase works
Building with switch --sandbox_debug would provide an untruncated stacktrace.
It's all about one missing comma ...the only question is within which file and line.
It complains about the harness_py_proto tests # 46:21. Running a syntax check on file tests/harness/executor/cases.go suggested, because if 820:39 isn't in some generated file, this might be the file which fits best (by line numbers and also the error message). I'm not that fluent in Go syntax, that's why I cannot spot it at sight - but a syntax checker or linter could:
lint bazel testcases bazel-tests
Also the Makefile might be a possible candidate, but there's not much going on:
.PHONY: harness
harness: testcases tests/harness/go/harness.pb.go tests/harness/go/main/go-harness tests/harness/cc/cc-harness bin/harness ## runs the test harness, validating a series of test cases in all supported languages
./bin/harness -go -cc
.PHONY: bazel-tests
bazel-tests: ## runs all tests with Bazel
bazel test //tests/... --test_output=errors
Ever tried running make harness previously? When it does what the comment says ...
## runs the test harness, validating a series of test cases in all supported languages

Issue with Qt 4.8.6 compilation with qpa configured.

I am getting the following error when I compile qt 4.8.6 source on Mac OS X version 10.8.5.
It looks like some platform related flags are not enabled.
In file included from text/qfontengine_coretext.mm:42:
text/qfontengine_coretext_p.h:64: error: expected `)' before‘font’
text/qfontengine_coretext_p.h:65: error: expected `)' before‘font’
text/qfontengine_coretext_p.h:93: error: ‘CGContextRef’ has not
been declared
text/qfontengine_coretext_p.h:111: error: ‘CTFontRef’ does not
name a type
text/qfontengine_coretext_p.h:112: error: ‘CGFontRef’ does not
name a type
text/qfontengine_coretext_p.h:114: error: ‘CGAffineTransform’ does
not name a type
text/qfontengine_coretext_p.h:122: error: expected ‘,’ or ‘...’
before ‘&’ token
text/qfontengine_coretext_p.h:122: error: ISO C++ forbids
declaration of ‘QCFString’ with no type
text/qfontengine_coretext_p.h:123: error: expected `)' before
‘ctFontRef’
text/qfontengine_coretext_p.h:134: error: ‘CTFontRef’ does not
name a type
text/qfontengine_coretext_p.h:144: error: ‘CTFontRef’ has not been
declared
text/qfontengine_coretext_p.h:145: error: ‘CTFontRef’ does not
name a type
text/qfontengine_coretext_p.h:146: error: ISO C++ forbids
declaration of ‘QCFType’ with no type
text/qfontengine_coretext_p.h:146: error: expected ‘;’ before ‘<’
token
text/qfontengine_coretext_p.h:147: error: ‘CGAffineTransform’ does
not name a type
text/qfontengine_coretext_p.h:152: error: ‘CGAffineTransform’ does
not name a type
text/qfontengine_coretext.mm:53: error: ‘acosf’ was not declared
in this scope
text/qfontengine_coretext.mm:53: error: ‘tanf’ was not declared in
this scope
text/qfontengine_coretext.mm:55: error: variable or field
‘loadAdvancesForGlyphs’ declared void
text/qfontengine_coretext.mm:55: error: ‘CTFontRef’ was not
declared in this scope
text/qfontengine_coretext.mm:56: error: ‘CGGlyph’ was not declared
in this scope
text/qfontengine_coretext.mm:56: error: template argument 1 is
invalid
text/qfontengine_coretext.mm:56: error: ‘cgGlyphs’ was not
declared in this scope
text/qfontengine_coretext.mm:57: error: expected primary-
expression before ‘*’ token
text/qfontengine_coretext.mm:57: error: ‘glyphs’ was not declared
in this scope
text/qfontengine_coretext.mm:57: error: expected primary-
expression before ‘int’
text/qfontengine_coretext.mm:58: error: expected primary-
expression before ‘flags’
text/qfontengine_coretext.mm:59: error: expected primary-
expression before ‘const’
text/qfontengine_coretext.mm:53: warning: ‘SYNTHETIC_ITALIC_SKEW’
defined but not used
make[2]: *** [.obj/debug-shared/qfontengine_coretext.o] Error 1
make[1]: *** [debug] Error 2
make: *** [sub-gui-make_default-ordered] Error 2
Am i missing anything? The configuration command used is:
./configure -debug -opensource -confirm-license -arch "x86_64" -cocoa -qpa
and I have Xcode Mac base SDKs for 10.7 and 10.8.
QPA is Qt platform abstraction, wherein you can develop your own plugin for embedded systems. It basically replaces the platform port.
QPA is well developed in QT5, maybe you can consider using it.
You need to resolve these compilation issues on your own and if you are planning on how to use QPA, minimal plugin is the best choice.
You can resolve these issues, basically by including ApplicationService framework and header. Hope this helps.

Compile Error in using /usr/include/net/if.h

I'm trying to compile existing source code for a network sniffer on my Mac Lion. I installed libpcap. The source includes a header file /usr/include/net/if.h, which is throwing compilation errors as shown below.
Floyd:~ Shastry$ gcc -o arplisten arplisten.c -lpcap
In file included from arplisten.c:4:
/usr/include/net/if.h:265: error: field ‘ifru_addr’ has incomplete type
/usr/include/net/if.h:266: error: field ‘ifru_dstaddr’ has incomplete type
/usr/include/net/if.h:267: error: field ‘ifru_broadaddr’ has incomplete type
/usr/include/net/if.h:308: error: field ‘ifra_addr’ has incomplete type
/usr/include/net/if.h:309: error: field ‘ifra_broadaddr’ has incomplete type
/usr/include/net/if.h:310: error: field ‘ifra_mask’ has incomplete type
/usr/include/net/if.h:393: error: field ‘addr’ has incomplete type
/usr/include/net/if.h:394: error: field ‘dstaddr’ has incomplete type
arplisten.c:6:24: error: netinet/if.h: No such file or directory
arplisten.c: In function ‘main’:
arplisten.c:139: warning: incompatible implicit declaration of built-in function ‘strlen’
Floyd:~ Shastry$
I did a lot of googling for help, in vain. Can someone please help me with this?
It looks like it's the order in which files are included. See this page, which I found via google.

Resources