remark: Incremental compilation has been disabled: it is not compatible with whole module optimization - apple-m1

Updated to the Xcode 13 beta, now I can't build the project due to an error in several pods
Older Xcode launches an app on iOS 15 too long
I use M1, maybe this is due to architecture

I faced with issue after updating Xcode to version 13. As the compiler complains about whole module compilation, we need to use the incremental mode.
To do this:
Select your target and go to Build Settings -> Compilation Mode -> Switch to "Incremental"

That remark isn't an actual error, just a warning. The real error can be found in the nested Compile Swift source files under the top level section with the same name. Expand the logs for this command and you should see the actual error.

I ran pod update and it fixed the issue for me

In my project, pods deployment target was still iOS 8.0. I have added following to my Podfile to upgrade them iOS 13. Then I clean project and removed derived data. After adding following script you need to call pod install.
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end

I downgraded Xcode to 13.2.1 and that solved my problem. Seems 13.3 have this compat issue with some of 3rd party libraries.

This issue is due to an upgrade to a new Xcode version.
Go to ->About this Mac -> Storage -> Manage
1 - Delete the files in the developer Xcode Project Indexes files
2 - Give it a try again

My Xcode 13.3 can't build for device. But it builds for simulators.
So I downgraded Xcode to 13.2.1. Problem solved.

I think the problem is cause by pod. when you upgrade to 13.3, some pod target's option "ENABLE_BITCODE" have been set "YES", so you just need add code to your Podfile, just like this:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
and clean project and delete cache, archive will be success.

I also have a similar issue, tried multiple ways but no help.
Finally worked for me:
pod deintegrate
Clean up
pod install

This helped me. Answers from developer.apple.com
Add this in Podfile
$iOSVersion = '11.0'
post_install do |installer|
# add these lines:
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=*]"] = "armv7"
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
end
installer.pods_project.targets.each do |target|
# add these lines:
target.build_configurations.each do |config|
if Gem::Version.new($iOSVersion) > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
end
end
end
end

I have that problem on Xcode 13.3, but after downgraded to 13.1, I can archive successful

pod update
Updating SwiftMessages pod version from 8.0.2 to 9.0.4 (which didn't not work with Swift 5.5) helped me

What worked for me initially was cleaning Xcode project build files.
"About This Mac" -> Storage -> Manage -> Developer
Xcode project build files
This is also a neat way to clear up some space when you are running out.
Then it started happening again. I then tried selecting "Whole Module" for "Compilation Mode" in "Build Settings". Build didn't fail so far.

I've experienced the same problem due to one of my swift packages lacked 'platforms' specifications in manifest, while at the same time utilising some platform specific framework (SwiftUI in my case)..
Package implementation specified the availability of the api as follows:
#available(iOS 14.0, tvOS 14.0, watchOS 7.0, macOS 11, *)
public extension Font {
//
}
Once I've added the corresponding platform specification in package manifest the problem went away:
let package = Package(
name: "package-name",
platforms: [
.iOS(.v14),
.watchOS(.v7),
.tvOS(.v14),
.macCatalyst(.v14)
],
//
//
)

That remark isn't an actual error, just a warning. The real error can be found in the nested Compile Swift source files under the top level section with the same name. Expand the logs for this command and you should see the actual error.
Inspired by ryanavocado.
For me, it was caused by SKPhotoBrowser in my Podfile. After removing it, the error goes away.
LLVM ERROR: out of memory
Allocation failed
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project and the crash backtrace.
Stack dump:
0. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file /Users/***/Library/Developer/Xcode/DerivedData/***/Build/Intermediates.noindex/ArchiveIntermediates/***/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SKPhotoBrowser.build/Objects-normal/arm64/SKPhotoBrowser.bc -embed-bitcode -target arm64-apple-ios13.0 -Xllvm -aarch64-use-tbi -O -disable-llvm-optzns -module-name SKPhotoBrowser -o /Users/***/Library/Developer/Xcode/DerivedData/***/Build/Intermediates.noindex/ArchiveIntermediates/***/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SKPhotoBrowser.build/Objects-normal/arm64/SKPhotoBrowser.o
1. Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)
2. Compiling with the current language version
3. Running pass 'Function Pass Manager' on module '/Users/***/Library/Developer/Xcode/DerivedData/***-hhhfwlkzxdivscfrppsfvbhllnzc/Build/Intermediates.noindex/ArchiveIntermediates/***/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/SKPhotoBrowser.build/Objects-normal/arm64/SKPhotoBrowser.bc'.
4. Running pass 'ObjC ARC contraction' on function '#UI_USER_INTERFACE_IDIOM'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 swift-frontend 0x00000001077f8de7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39
1 swift-frontend 0x00000001077f7e38 llvm::sys::RunSignalHandlers() + 248
2 swift-frontend 0x00000001077f9440 SignalHandler(int) + 288
3 libsystem_platform.dylib 0x00007ff810cf2dfd _sigtramp + 29
4 libsystem_platform.dylib 0x000000031069bae0 _sigtramp + 18446603383459187968
5 libsystem_c.dylib 0x00007ff810c28d24 abort + 123
6 swift-frontend 0x0000000107745cda llvm::report_bad_alloc_error(char const*, bool) + 106
7 swift-frontend 0x0000000107745cf2 out_of_memory_new_handler() + 18
8 libc++abi.dylib 0x00007ff810c9a96b operator new(unsigned long) + 43
9 swift-frontend 0x0000000107506efd llvm::Function::BuildLazyArguments() const + 77
10 swift-frontend 0x00000001052efe87 llvm::objcarc::BundledRetainClaimRVs::insertRVCallWithColors(llvm::Instruction*, llvm::CallBase*, llvm::DenseMap<llvm::BasicBlock*, llvm::TinyPtrVector<llvm::BasicBlock*>, llvm::DenseMapInfo<llvm::BasicBlock*>, llvm::detail::DenseMapPair<llvm::BasicBlock*, llvm::TinyPtrVector<llvm::BasicBlock*> > > const&) + 151
11 swift-frontend 0x0000000105302f88 (anonymous namespace)::ObjCARCContract::run(llvm::Function&, llvm::AAResults*, llvm::DominatorTree*) + 1384
12 swift-frontend 0x000000010753e380 llvm::FPPassManager::runOnFunction(llvm::Function&) + 1488
13 swift-frontend 0x0000000107545073 llvm::FPPassManager::runOnModule(llvm::Module&) + 67
14 swift-frontend 0x000000010753eb39 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 1161
15 swift-frontend 0x0000000102a5c6df swift::performLLVMOptimizations(swift::IRGenOptions const&, llvm::Module*, llvm::TargetMachine*) + 3791
16 swift-frontend 0x0000000102a5d8cc swift::performLLVM(swift::IRGenOptions const&, swift::DiagnosticEngine&, llvm::sys::SmartMutex<false>*, llvm::GlobalVariable*, llvm::Module*, llvm::TargetMachine*, llvm::StringRef, swift::UnifiedStatsReporter*) + 2812
17 swift-frontend 0x0000000102a66aa5 swift::performLLVM(swift::IRGenOptions const&, swift::ASTContext&, llvm::Module*, llvm::StringRef) + 213
18 swift-frontend 0x0000000102521795 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 16565
19 swift-frontend 0x00000001024e05d4 swift::mainEntry(int, char const**) + 1108
20 dyld 0x000000020a16151e start + 462
21 dyld 0x000000020a15c000 start + 18446744073709530288
error: Abort trap: 6 (in target 'SKPhotoBrowser' from project 'Pods')

I had same remark for multiple libraries (ObjectMapper, Alamofire) but that wasn't the actual error (as ryanavocado suggested). In my case I also had segmentation fault error in SKPhotoBrowser so I tried updating the SKPhotoBrowser pod and that didn't work. Luckily this worked:
pod 'SKPhotoBrowser', :git => 'https://github.com/suzuki-0000/SKPhotoBrowser.git', :branch => 'master'
As suggested here.
So in conclusion the problem is not that actual remark but some other error.

I faced similar issue before I got it fixed. None of the solutions mentioned worked in isolation.
After two days of research and google searches, here is the combination that worked :
1. On the main project (Runner) I updated the compilation mode to incremental by clicking on Build Setting and searching for compilation.
I cleaned the build folder and tried archiving again and got the same error, then I proceeded to the second step.
2. I changed the Apple clang code generation optimisation level to None
I cleaned the build folder and tried archiving again and got the same error. Then I checked that the error message referenced some plugins in the pod
e.g error: Segmentation fault: 11 (in target 'twilio_voice' from project 'Pods')
So, I proceeded to repeating the steps 1 and two above for each pod plugin that had the error.
3. Repeat steps 1 and two above for each pod plugin that had the error. By clicking on the pod and selecting the plugin in context.
I then cleaned the build folder and tried archiving again and still got the same error, then finally after several researches and google searches I executed the following step
4.
A. I Added
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
to the pod file post install script .
The complete script looks like this :
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
'PERMISSION_CAMERA=1',
'PERMISSION_MICROPHONE=1',
# Add other permissions required by your app
]
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
B. Foreach Pod plugin that had the error, I then changed Enable Bitcode to No, like this :
I then cleaned the build folder and tried archiving again and boom, it worked .
I should also mention that I changed target IOS version to 11, not sure if it had any effect.
Good luck.

Make sure your pods are the same swift version as your project.

I found that it was due to a mismatch between a framework and project optimisation build settings.
To fix it the target of the project should be optimised e.g. -Os in BuildSettings -> Apple Clang Code Generation -> Optimisation Level on your project target
It seems swift expects optimisations if compilation mode is set to whole module. Eray's answer works, but might not create optimal assembly/bitcode for a release build of the framework.
Project level compilation mode also needs to be Whole module.
Also noticed this can occur if the dependancy order is incorrect. During a parallel build if a required dependancy of a dependancy has not yet been built, this error can exhibit. Fixed by explicitly adding to the the 1st level dependants Build Phases->Link with Libraries list.

I did Product -> Clean, then Xcode -> Preferences -> Locations -> Derived Data, go to directory and delete everything. Then close Xcode and reopened and did my build (Archive). All better.

I went with Podfile update as suggested by atalaysa.
Then Preferences > Derived Data > Force Quit Xcode > Deleted Derived Data > Pod Install > Opened the Xcode project > Let the project run through indexing > Archived successfully.

Delete iOS Podfile.lock and pubspec.lock and pod deintegrate and pod install. Set in iOS/Flutter folder ApplicationFramework.plist file iOS minimum target to 9.0 and below code in Podfile post install script
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end

you can check once by setting bitcode enbaled false, if u are using framework.

I have a solution!!!
You need to upgrade the iOS version for problem pods to 11 or higher. I hope this helps you because it helped me, but none of the solutions worked before.photo where change

Related

Pintos - UserProg all tests fail is_kernel_vaddr()

I am doing the Pintos project on the side to learn more about operating systems. I had tons of devops trouble at first with it not running well on an 18.04 Ubuntu droplet. I am now running it on the VirtualBox image that UCCS tells students to download for pintos.
I finished project 1 and started to map out my solution to project 2. Following the instructions to create a file I ran
pintos-mkdisk filesys.dsk --filesys-size=2
pintos -- -f -q
but am getting error
Kernel PANIC at ../../threads/vaddr.h:87 in vtop(): assertion
`is_kernel_vaddr (vaddr)' failed.
I then tried running make check (all the tests). They are all failing for the same reason.
Am I missing something? Is there something I need to implement to fix this? I reread the instructions and didnt see anything?
Would appreciate help!
Thanks
I had a similar problem. My code for Project 1 ran fine, but I could not format the filesystem for Project 2.
The failure for me came from the following call chain:
thread_init() -> ... -> thread_schedule_tail() -> process_activate() -> pagedir_activate() -> vtop()
The problem is that init_page_dir is still NULL when pagedir_activate() is called. init_page_dir should have been initialized in paging_init() but this is called after thread_init().
The root cause was that my scheduler was being called too early, i.e. before the call to thread_start(). The reason for my problem was that I had built in a call to thread_yield() upon completion of every call to lock_release() which makes sense from a priority donation standpoint. Unfortunately, locks are used prior to the scheduler being ready! To fix this, I installed a flag called threading_started that bails in the first line of my thread_block() and thread_yield() functions if thread_start() has not yet been called.
Good luck!

pyinstaller ImportError: C extension: No module named np_datetime not built

I am running a virtual environment with Python 2.7 for my program.
There seems to be a problem after creating the executable file on windows.
I ran venv/Scripts/pyinstaller.exe -F main.py
everything seems fine. But when i click on the created executable main.exe.
There is an error.
Tried and tested
I have re-installed of pandas and pyinstaller
Implemented the hook-pandas.py to the hooks folder in the environment.
hook-pandas
Ensured the environment is activated.
Checked that the program is running fine before building executable.
Re-created the environment.
Yet after all that, I am prompted with this issue [see Importerror] when I run the executable file.
It is an extreme pain to debug this because the command prompt displaying the error will not pause but close almost immediately.
Similar issues
Looking for Suggestions
I am hoping for suggestions to troubleshoot Pyinstaller. Any resources to read up on would be nice.
Usually, I have no trouble with python as Pycharm has several handy debugging tools that will help me identify the problem
I ran into the same problem and found this thread, but I managed to solve it borrowing from the reference you posted (about pandas._libs.tslibs.timedeltas), so thank you for that!
In that article, the module that resulted in the ImportError was, in fact pandas._libs.tslibs.timedeltas, if you look at the poster's logs. But the error you and I ran into refers to np_datetime instead. So, from the traceback logs, I finally figured out that the code we have to write in hook-pandas.py should be the following:
hiddenimports = ['pandas._libs.tslibs.np_datetime']
Maybe that alone will solve your problem, HOWEVER, in my case, once I solved the np_datetime issue, other very similar ImportError problems arose (also related to hiddenimports regarding pandas), so, in case you run into the same issues, just define hiddenimports as follows:
hiddenimports = ['pandas._libs.tslibs.np_datetime','pandas._libs.tslibs.nattype','pandas._libs.skiplist']
TL;DR:
You can first try to write
hiddenimports = ['pandas._libs.tslibs.np_datetime']
into hook-pandas.py. However, if for some reason you run into the exact same issues I did afterwards, try
hiddenimports = ['pandas._libs.tslibs.np_datetime','pandas._libs.tslibs.nattype','pandas._libs.skiplist']
If you wish to dive deeper (or run into a different pandas ImportError than the ones I did), this is the code in pandas's __init__.py referenced in your traceback log (lines 23 to 35):
from pandas.compat.numpy import *
try:
from pandas._libs import (hashtable as _hashtable,
lib as _lib,
tslib as _tslib)
except ImportError as e: # pragma: no cover
# hack but overkill to use re
module = str(e).replace('cannot import name ', '')
raise ImportError("C extension: {0} not built. If you want to import "
"pandas from the source directory, you may need to run "
"'python setup.py build_ext --inplace --force' to build "
"the C extensions first.".format(module))
From that I went into the
C:\Python27\Lib\site-packages\pandas_libs
and
C:\Python27\Lib\site-packages\pandas_libs\tslibs
folders and found the exact names of the modules that resulted the errors.
I hope that solves your problem as it did mine.
Cheers!

Multiple warnings using RealmSwift 3.1.1 in Xcode 9

I get 23 compiler warnings after adding the above versioned RealmSwift CocoaPod to any of my Xcode 9.2 projects (see screenshot).
Cocoapods versions installed (1.4.0, 1.3.1)
RealmSwift version 3.1.1
The specific message reads:
/Users/myname/Repos/iOS Projects/My
Projects/TestRealmPods/Pods/Realm/Realm/RLMArray.mm:256:10: Block
implicitly retains 'self'; explicitly mention 'self' to indicate this
is intended behaviour
The warnings only appear if I try to Build / Run the project.
The warnings relate to the RLMArray.mm & RLMManagedArray.mm classes only.
I have tried updating both CocoaPods & Realm versions from previous versions, but get the same warnings in both cases.
Any help provided is much appreciated.
This warning happens because, CocoaPods is moving to enable CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF by
default. I think, this warning will be fixed in next Realm releases. But as temporary solution you can add this code to your Podfile file to silence a warnings.
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF'] = false
end
end
end

"svn: E175012: Connection timed out" when I compile my first Shogun program

I am new Shogun user,besides, this is my first time to use SVN.(I think the problem is SVN not Shogun)
those are the environment what I use:
Windows 10
Shogun 4.0.0
TortoiseSVN-1.9.3.27038-x64-svn-1.9.3;
VisualSVN-5.1.3;
VisualSVN-Server-3.5.1-x64;
VS 2013
Now I am in trouble when I want to get started an simple example of Shogun(copy in Documentation) as follow:
#include <shogun/base/init.h>
using namespace shogun;
int main(int argc, char** argv)
{
init_shogun();
exit_shogun();
return 0;
}
then, I try to compile it in Vs 2013, it tell me:
1> Generating version header
3> Building Custom Rule E:/shogun/CMakeLists.txt
3> CMake does not need to re-run because E:\shogun-configure\CMakeFiles\generate.stamp is up-to-date.
3> Creating directories for 'MSIntTypes'
3> Performing download step (SVN checkout) for 'MSIntTypes'
3> svn: E170013: Unable to connect to a repository at URL ' http://msinttypes.googlecode.com/svn/trunk '
3> svn: E175012: Connection timed out
3> C:\ProgramFiles(x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006:
"cmd.exe" has exited. code is 1.
Then, I considerd that maybe some problems with SVN, I try to checkout some respositories:
At first, I try to checkout an respositories what I create myself:'_http://burningbear:8443/!/#new_rep', it can be checkout normally.
Then I try to chekout the respository:'_http ://msinttypes.googlecode.com/svn/trunk', but the Tortoise just not responding for a long time, then it reply me that:
Command: Checkout from _http://msinttypes.googlecode.com/svn/trunk, revision HEAD, Fully recursive, Externals included
Error: Unable to connect to a repository at URL
Error: '_http://msinttypes.googlecode.com/svn/trunk'
Error: Error running context: 你的主机中的软件中止了一个已建立的连接。(what I use is Chinese,it means "the software in your host stop an connected connection")
In China, We can not access googlecode unless we use VPN, so I change the server, to enable Proxy Server, the following is my setting:
Server address: 127.0.0.1
Port: 8087
Then I try to checkout again as:
When I check out _http://msinttypes.googlecode.com/svn/trunk
Checkout from _http://msinttypes.googlecode.com/svn/trunk, revision HEAD, Fully recursive, Externals included
Unable to connect to a repository at URL'_http://msinttypes.googlecode.com/svn/trunk'
The HTTP method 'OPTIONS' is not allowed on '/svn/trunk'
When I update the repositories what I have checkout before(URL is :_http://burningbear:8443/!/#new_rep). It move slowly, I spend about half hour, SVN tell me: "2 kBytes transferred in 20 minutes and 2 seconds"
Command: Update
Updating: E:\test2
Error: Unable to connect to a repository at URL 'https://burningbear:8443/svn/new_rep'
Error: Connection timed out
Completed!:
Now, I don't know what's the problem. It take me several days and I still can not solve it. Please help me! Thank you in advanced!
(I can not post more than 2 links now, so all of URL above I add an '_' mark before 'http')
Currently there's no way to compile natively shogun on Windows unfortunately. Although your problem seems to be unrelated, and it fails with svn, which is weird because the official repo of the shogun is using git: http://github.com/shogun-toolbox/shogun/
worked on the weekend on the native Windows support of shogun, you can find it in the feature/windows branch of the official repository: https://github.com/shogun-toolbox/shogun/tree/feature/windows
UPDATE: the feature branch has been merged into develop branch. from now on shogun can be compiled on windows natively.
Google Code is not available anymore: http://msinttypes.googlecode.com/svn/trunk. That's why the tool fails to access googlecode.com.

Heroku & HHVM & WordPress installation problems

I'm trying to install Heroku / HHVM / WordPress on a Debian 6 64 bits VPS to test this kind of setup for my blog (Nginx + MySQL + HP-FPM + Varnish + WordPress on another Debian 6 64 bits VPS) following the recent and promising guide done by Xiao Yu and available on GitHub.
I'm absolutelly new to Heroku/Ruby and I'm affraid I'm quite lost when something not expected is happening. The installation guide seemed to be straightforward, but it isn't clear which packages do I need to install first (PHP-FPM? Nginx? Or does this script install those by itself?) and I'm stuck on this step:
git push heroku production:master
When I execute that, I get this:
Initializing repository, done.
Counting objects: 344, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (162/162), done.
Writing objects: 100% (344/344), 72.73 KiB, done.
Total 344 (delta 139), reused 342 (delta 139)
-----> PHP app detected
! ERROR: Could not resolve composer.lock requirement for HHVM 3.1.0,
please adjust the version selector. The following runtimes are available:
hhvm-3.2.0 php-5.5.11 php-5.5.12 php-5.5.13 php-5.5.14 php-5.5.15
php-5.6.0RC4
! Push rejected, failed to compile PHP app
To git#heroku.com:xxxxxx-fortress-xxxx.git
! [remote rejected] production -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:xxxxxxx-fortress-xxxx.git'
I've tried to take a look at composer.json, edit it and include a
"php": "~5.5.11",
line on the require section, but that doesn't work... unless I have to do something before (update composer.lock? How?), which I'm not sure about.
What am I doing wrong?
Thanks!
HHVM 3.1.0 is not available (anymore), as the error message points out. You would however have to update composer.lock too.
Your best bet is to just update from the template; it's been fixed there: https://github.com/xyu/heroku-wp/commit/2a0ea2097597f72c401a63c070a14ec5031ffc9d

Resources