Post not yet marked as solved
We are creating a framework to distribute to other application, our framework contains multiple third party library with pods. We are able to successfully generate the framework.
But we are getting error when that framework is used and generating Ad hoc build.
Below is the pod file for the framework project
pod 'Alamofire', '> 4.9.0'
pod 'RealmSwift', '> 3.19.0'
pod 'ObjectMapper', '> 3.5.1'
pod 'ObjectMapper+Realm', '> 0.6'
pod 'ZIPFoundation', '> 0.9.9' #(0.9.9)
pod 'NMSSH', '> 2.3.1'
post_install do |installer|
installer.pods_project.targets.each do |target|
if ['ObjectMapper','ObjectMapper+Realm','Alamofire'].include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.2'
end
end
target.build_configurations.each do |config|
# set valid architecture
# config.build_settings['VALID_ARCHS'] = 'arm64 armv7 armv7s i386 x86_64'
# build active architecture only (Debug build all)
# config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
config.build_settings['ENABLE_BITCODE'] = 'YES'
if config.name == 'Release' || config.name == 'Pro'
config.build_settings['BITCODE_GENERATION_MODE'] = 'bitcode'
else # Debug
config.build_settings['BITCODE_GENERATION_MODE'] = 'marker'
end
cflags = config.build_settings['OTHER_CFLAGS'] || ['$(inherited)']
if config.name == 'Release' || config.name == 'Pro'
cflags << '-fembed-bitcode'
else # Debug
cflags << '-fembed-bitcode-marker'
end
config.build_settings['OTHER_CFLAGS'] = cflags
end
end
end
Post not yet marked as solved
Hi,
OS: macOS 12.4
CPU: Apple M1
I cannot import the new TensorFlow 2.9.0 on Apple M1. I got an error:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/Users/martin/Documents/Projects/Solar-Transformer/Testing.ipynb Cell 3' in <cell line: 1>()
----> 1 from tensorflow.keras.layers import Add, Dense, Dropout, Layer, LayerNormalization, MultiHeadAttention, Normalization
2 from tensorflow.keras.models import Model
3 from tensorflow.keras.initializers import TruncatedNormal
File ~/miniforge3/lib/python3.9/site-packages/tensorflow/__init__.py:37, in <module>
34 import sys as _sys
35 import typing as _typing
---> 37 from tensorflow.python.tools import module_util as _module_util
38 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader
40 # Make sure code inside the TensorFlow codebase can use tf2.enabled() at import.
File ~/miniforge3/lib/python3.9/site-packages/tensorflow/python/__init__.py:42, in <module>
37 from tensorflow.python.eager import context
39 # pylint: enable=wildcard-import
40
41 # Bring in subpackages.
---> 42 from tensorflow.python import data
43 from tensorflow.python import distribute
44 # from tensorflow.python import keras
File ~/miniforge3/lib/python3.9/site-packages/tensorflow/python/data/__init__.py:21, in <module>
15 """`tf.data.Dataset` API for input pipelines.
16
17 See [Importing Data](https://tensorflow.org/guide/data) for an overview.
18 """
20 # pylint: disable=unused-import
---> 21 from tensorflow.python.data import experimental
22 from tensorflow.python.data.ops.dataset_ops import AUTOTUNE
23 from tensorflow.python.data.ops.dataset_ops import Dataset
File ~/miniforge3/lib/python3.9/site-packages/tensorflow/python/data/util/structure.py:22, in <module>
19 import six
20 import wrapt
---> 22 from tensorflow.python.data.util import nest
23 from tensorflow.python.framework import composite_tensor
24 from tensorflow.python.framework import ops
File ~/miniforge3/lib/python3.9/site-packages/tensorflow/python/data/util/nest.py:36, in <module>
16 """## Functions for working with arbitrarily nested sequences of elements.
17
18 NOTE(mrry): This fork of the `tensorflow.python.util.nest` module
(...)
31 arrays.
32 """
34 import six as _six
---> 36 from tensorflow.python.framework import sparse_tensor as _sparse_tensor
37 from tensorflow.python.util import _pywrap_utils
38 from tensorflow.python.util import nest
File ~/miniforge3/lib/python3.9/site-packages/tensorflow/python/framework/sparse_tensor.py:24, in <module>
22 from tensorflow.python import tf2
23 from tensorflow.python.framework import composite_tensor
---> 24 from tensorflow.python.framework import constant_op
25 from tensorflow.python.framework import dtypes
26 from tensorflow.python.framework import ops
File ~/miniforge3/lib/python3.9/site-packages/tensorflow/python/framework/constant_op.py:25, in <module>
23 from tensorflow.core.framework import types_pb2
24 from tensorflow.python.eager import context
---> 25 from tensorflow.python.eager import execute
26 from tensorflow.python.framework import dtypes
27 from tensorflow.python.framework import op_callbacks
File ~/miniforge3/lib/python3.9/site-packages/tensorflow/python/eager/execute.py:23, in <module>
21 from tensorflow.python import pywrap_tfe
22 from tensorflow.python.eager import core
---> 23 from tensorflow.python.framework import dtypes
24 from tensorflow.python.framework import ops
25 from tensorflow.python.framework import tensor_shape
File ~/miniforge3/lib/python3.9/site-packages/tensorflow/python/framework/dtypes.py:29, in <module>
26 from tensorflow.python.lib.core import _pywrap_bfloat16
27 from tensorflow.python.util.tf_export import tf_export
---> 29 _np_bfloat16 = _pywrap_bfloat16.TF_bfloat16_type()
32 @tf_export("dtypes.DType", "DType")
33 class DType(_dtypes.DType):
34 """Represents the type of the elements in a `Tensor`.
35
36 `DType`'s are used to specify the output data type for operations which
(...)
46 See `tf.dtypes` for a complete list of `DType`'s defined.
47 """
Example code:
from tensorflow.keras.layers import Add, Dense, Dropout, Layer, LayerNormalization, MultiHeadAttention, Normalization
from tensorflow.keras.models import Model
from tensorflow.keras.initializers import TruncatedNormal
from tensorflow.keras.utils import timeseries_dataset_from_array
import tensorflow as tf
import tensorflow_probability as tfp
import numpy as np
Post not yet marked as solved
I'm trying to update all my projects to C++20. The C++ only projects work fine. All the Objective-C++ files, though, suddenly stop compiling. Is this supposed to work. I can't imagine [NSString stringWithUTF8String:foo] should be failing. Setting the project back to C++17 works.
I do have -fmodules and -fcxx-modules for clang modules in some projects. Do those all need to be removed for C++20 modules?
Attempting to compile dieharder from source on an M1 Max MacBookPro18,2 (macOS 12 + Xcode 13.3.1 + command line tools) and running into an error:
...
/bin/sh ../libtool --tag=CC --mode=link gcc -std=c99 -Wall -pedantic -I/usr/local/include -I/opt/local/include -L/opt/local/lib -o dieharder dieharder-add_ui_rngs.o dieharder-add_ui_tests.o dieharder-choose_rng.o dieharder-dieharder.o dieharder-dieharder_exit.o dieharder-help.o dieharder-list_rngs.o dieharder-list_tests.o dieharder-output.o dieharder-output_rnds.o dieharder-parsecl.o dieharder-rdieharder.o dieharder-run_all_tests.o dieharder-run_test.o dieharder-set_globals.o dieharder-testbits.o dieharder-time_rng.o dieharder-user_template.o ../libdieharder/libdieharder.la -lgsl -lgslcblas -lm -lgsl -lgslcblas
libtool: link: gcc -std=c99 -Wall -pedantic -I/usr/local/include -I/opt/local/include -o dieharder dieharder-add_ui_rngs.o dieharder-add_ui_tests.o dieharder-choose_rng.o dieharder-dieharder.o dieharder-dieharder_exit.o dieharder-help.o dieharder-list_rngs.o dieharder-list_tests.o dieharder-output.o dieharder-output_rnds.o dieharder-parsecl.o dieharder-rdieharder.o dieharder-run_all_tests.o dieharder-run_test.o dieharder-set_globals.o dieharder-testbits.o dieharder-time_rng.o dieharder-user_template.o -L/opt/local/lib ../libdieharder/.libs/libdieharder.a -lm -lgsl -lgslcblas
Undefined symbols for architecture arm64:
"_insert", referenced from:
_dab_filltree in libdieharder.a(libdieharder_la-dab_filltree.o)
_main_filltree in libdieharder.a(libdieharder_la-dab_filltree.o)
"_insertBit", referenced from:
_dab_filltree2 in libdieharder.a(libdieharder_la-dab_filltree2.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
...
I got to this failure with a MacPorts installed gsl and by executing the following:
$ mkdir dieharder; cd dieharder
$ wget --no-check-certificate https://webhome.phy.duke.edu/~rgb/General/dieharder/dieharder-3.31.1.tgz
$ tar xf dieharder-3.31.1.tgz
$ cd dieharder-3.31.1
$ sudo port install gsl
$ ./configure LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include CFLAGS=-I/opt/local/include --disable-shared
...
$ make
...
I reproduced the failure with Homebrew:
$ brew install gsl
$ make distclean
$ ./configure LDFLAGS=-L/opt/homebrew/lib CPPFLAGS=-I/opt/homebrew/include CFLAGS=-I/opt/homebrew/include --disable-shared
...
$ make
...
/bin/sh ../libtool --tag=CC --mode=link gcc -std=c99 -Wall -pedantic -I/usr/local/include -I/opt/homebrew/include -L/opt/homebrew/lib -o dieharder dieharder-add_ui_rngs.o dieharder-add_ui_tests.o dieharder-choose_rng.o dieharder-dieharder.o dieharder-dieharder_exit.o dieharder-help.o dieharder-list_rngs.o dieharder-list_tests.o dieharder-output.o dieharder-output_rnds.o dieharder-parsecl.o dieharder-rdieharder.o dieharder-run_all_tests.o dieharder-run_test.o dieharder-set_globals.o dieharder-testbits.o dieharder-time_rng.o dieharder-user_template.o ../libdieharder/libdieharder.la -lgsl -lgslcblas -lm -lgsl -lgslcblas
libtool: link: gcc -std=c99 -Wall -pedantic -I/usr/local/include -I/opt/homebrew/include -o dieharder dieharder-add_ui_rngs.o dieharder-add_ui_tests.o dieharder-choose_rng.o dieharder-dieharder.o dieharder-dieharder_exit.o dieharder-help.o dieharder-list_rngs.o dieharder-list_tests.o dieharder-output.o dieharder-output_rnds.o dieharder-parsecl.o dieharder-rdieharder.o dieharder-run_all_tests.o dieharder-run_test.o dieharder-set_globals.o dieharder-testbits.o dieharder-time_rng.o dieharder-user_template.o -L/opt/homebrew/lib ../libdieharder/.libs/libdieharder.a -lm -lgsl -lgslcblas
Undefined symbols for architecture arm64:
"_insert", referenced from:
_dab_filltree in libdieharder.a(libdieharder_la-dab_filltree.o)
_main_filltree in libdieharder.a(libdieharder_la-dab_filltree.o)
"_insertBit", referenced from:
_dab_filltree2 in libdieharder.a(libdieharder_la-dab_filltree2.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [dieharder] Error 1
make: *** [dieharder.time] Error 2
Anyone know what might be going on here and how to properly configure this to complete compilation on and for Apple Silicon systems?
Post not yet marked as solved
I work on a very large project based on Mozilla Firefox, I am getting a crash at -O2 and -O3. It is stable at -O0 and -O1, so I did some research and found a number of optimizations that supposedly get enabled at -O2. The information I found tells me that I should use -mllvm and the optimization flag that gets passed to the LLVM "opt" command in the normal LLVM toolchain. However Apple's command line tools do not have the "opt" command and -mllvm does not seem to accept the "opt" flags.
What is the Apple way of seeing what optimizations are enabled in -O2 and how do I enable or disable them individually?
Post not yet marked as solved
Hi,
I am using, inside my Xcode project, the snacc library (https://github.com/nevali/snacc) which uses the libc++ which comes with Xcode.
I'm using Xcode 13.3 (13E113) on macOS Monterey 12.3.1.
The compilation with the Xcode command-line tool fails with these errors:
In file included from /Users/idplug-middleware/Work/idplug-ios-generic-api/idplug-classic/external_sdks/snacc/src/inc/asn-buf.h:12:
/Applications/Xcode13.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/usr/include/c++/v1/list:1164:11: error: use of undeclared identifier '_A'
list<_Tp, _A*lloc>::__link_nodes(__link_pointer __p, __link_pointer __f, __link_pointer __l)
^
/Applications/Xcode13.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/usr/include/c++/v1/list:1164:14: error: use of undeclared identifier 'lloc'
list<_Tp, _A*lloc>::__link_nodes(__link_pointer __p, __link_pointer __f, __link_pointer __l)
^
/Applications/Xcode13.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/usr/include/c++/v1/list:1164:34: error: unknown type name '__link_pointer'
list<_Tp, _A*lloc>::__link_nodes(__link_pointer __p, __link_pointer __f, __link_pointer __l)
^
/Applications/Xcode13.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/usr/include/c++/v1/list:1164:54: error: unknown type name '__link_pointer'
list<_Tp, _A*lloc>::__link_nodes(__link_pointer __p, __link_pointer __f, __link_pointer __l)
^
/Applications/Xcode13.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/usr/include/c++/v1/list:1164:74: error: unknown type name '__link_pointer'
list<_Tp, _A*lloc>::__link_nodes(__link_pointer __p, __link_pointer __f, __link_pointer __l)
Is there anything wrong with the libc++ library that comes with Xcode 13.3 ? Or am I doing something wrong ?
I have never had this issue before with older versions of Xcode or macOS.
Thank you.
Christophe
Post not yet marked as solved
Just upgraded from Xcode 12 to Xcode 13.3 (latest) and now suddenly am getting a LLVM Error when archiving my app. See error message below.
Google tells me that many users seem to have this issue, some related to unused dependencies or not enough memory, neither of which is the case for me.
Appreciate if one of the experts here can advise, pretty new to Xcode and not sure how to best proceed.
Thank you
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/User/Library/Developer/Xcode/DerivedData/WebViewGold-glchvbqylkvqybgbbhuuzlgneyle/Build/Intermediates.noindex/ArchiveIntermediates/WebViewGold/IntermediateBuildFilesPath/AG-Opus.build/Release-iphoneos/Appname.build/Objects-normal/arm64/WebViewController.bc -embed-bitcode -target arm64-apple-ios12.0 -Xllvm -aarch64-use-tbi -O -disable-llvm-optzns -module-name AG_Opus -o /Users/User/Library/Developer/Xcode/DerivedData/WebViewGold-glchvbqylkvqybgbbhuuzlgneyle/Build/Intermediates.noindex/ArchiveIntermediates/WebViewGold/IntermediateBuildFilesPath/Appname.build/Release-iphoneos/Appname.build/Objects-normal/arm64/WebViewController.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/User/Library/Developer/Xcode/DerivedData/WebViewGold-glchvbqylkvqybgbbhuuzlgneyle/Build/Intermediates.noindex/ArchiveIntermediates/WebViewGold/IntermediateBuildFilesPath/Appname.build/Release-iphoneos/Appname.build/Objects-normal/arm64/WebViewController.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 0x000000010eb13de7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39
1 swift-frontend 0x000000010eb12e38 llvm::sys::RunSignalHandlers() + 248
2 swift-frontend 0x000000010eb14440 SignalHandler(int) + 288
3 libsystem_platform.dylib 0x00007ff804caedfd _sigtramp + 29
4 libsystem_malloc.dylib 0x00007ff804accabb _malloc_zone_malloc + 125
5 libsystem_c.dylib 0x00007ff804be4d24 abort + 123
6 swift-frontend 0x000000010ea60cda llvm::report_bad_alloc_error(char const*, bool) + 106
7 swift-frontend 0x000000010ea60cf2 out_of_memory_new_handler() + 18
8 libc++abi.dylib 0x00007ff804c5696b operator new(unsigned long) + 43
9 swift-frontend 0x000000010e821efd llvm::Function::BuildLazyArguments() const + 77
10 swift-frontend 0x000000010c60ae87 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 0x000000010c61df88 (anonymous namespace)::ObjCARCContract::run(llvm::Function&, llvm::AAResults*, llvm::DominatorTree*) + 1384
12 swift-frontend 0x000000010e859380 llvm::FPPassManager::runOnFunction(llvm::Function&) + 1488
13 swift-frontend 0x000000010e860073 llvm::FPPassManager::runOnModule(llvm::Module&) + 67
14 swift-frontend 0x000000010e859b39 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 1161
15 swift-frontend 0x0000000109d776df swift::performLLVMOptimizations(swift::IRGenOptions const&, llvm::Module*, llvm::TargetMachine*) + 3791
16 swift-frontend 0x0000000109d788cc 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 0x0000000109d81aa5 swift::performLLVM(swift::IRGenOptions const&, swift::ASTContext&, llvm::Module*, llvm::StringRef) + 213
18 swift-frontend 0x000000010983c795 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 16565
19 swift-frontend 0x00000001097fb5d4 swift::mainEntry(int, char const**) + 1108
20 dyld 0x000000011ceb751e start + 462
error: Abort trap: 6 (in target 'Appname' from project 'Projectname')
Post not yet marked as solved
The bridging header works fine for compilation, and with previous version of xcode there were no problems running and debugging the app.
But after switching to 13.2.1, poing a variable leads first to error: expression failed to parse, unknown error, and then to an error hinting at not being able to find header files.
Example:
(lldb) po recipientType
error: expression failed to parse, unknown error
(lldb) po recipientType
warning: Swift error in scratch context: error: /Users/dirk/projects/pEp/src_iOS/pep4ios/pEpForiOS/pEpForiOS-Bridging-Header.h:14:9: error: 'AccountSettings.h' file not found
#import "AccountSettings.h"
^
error: failed to import bridging header '/Users/dirk/projects/pEp/src_iOS/pep4ios/pEpForiOS/pEpForiOS-Bridging-Header.h'
.
Shared Swift state for pEp has developed fatal errors and is being discarded.
REPL definitions and persistent names/types will be lost.
error: expression failed to parse, unknown error
I have experimented with using <> for the import, instead of "", and also setting the framework header path, but no luck so far.
Post not yet marked as solved
Hi
I'm using C++17 in XCode 13 and looking at the release notes it shows that C++20 is only partially supported - does anyone know when C++20 will be fully supported in XCode ?
[C++23 is out next year and would be useful to see some statement from Apple about their plans to support this]
Post not yet marked as solved
Hello everyone,
I'm running some tests and after upgrading my Xcode from 12.5 to 13.2.1, I can't run them anymore.
It shows me "Testing..." and after waiting 10 minutes it fails and this output is presented in the console:
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Note: Profile data not written to file: already written.
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
LLVM Profile Error: Failed to write file : Filename not set
I'm using an iPhone 11 Simulator (version 13.2) running iOS 15.2
Any ideas?
Post not yet marked as solved
I am working with a big project event is take 40 minutes to generate dSYM file.
Is there any way I can replace the dsymutil with custom version.
Post not yet marked as solved
I was attempting to build tapi-1100.0.11 since it is required by ld64 (building which was my initial goal), but it fails due to different issues.
I followed the Readme.md guidelines and used https://github.com/apple/llvm-project/tree/apple/stable/20190104, but there seem to be several issues:
LinkerInterfaceFile.cpp uses MachO::PLATFORM_DRIVERKIT in two switch statements, but this enumeration value is not present in the given tag in llvm-project (https://github.com/apple/llvm-project/blob/729748d085a90bd2a4af36efbfb2dc33b4704de3/llvm/include/llvm/BinaryFormat/MachO.h#L485), and seems to be only added with commit https://github.com/apple/llvm-project/commit/eef41efe0098814ba8445633c7bc6756d4228f8a
Even if I #if 0 out these statements everything fails with linking error regarding missing library -ltapiAPIVerifier, I see that a lot of the cmake files add tapi-api-verifier as a linker input, but I don't see any library targets being added anywhere, so how to resolve this?
Is there a different tapi version that is working with a different llvm version, which I can build without such hassle? I tried reverting ld64 to older tags, but all seem to require tapi. Using newer apple/stable/xxxx tags seem to be incompatible with the tapi source, since they require that projects use add_llvm_install_targets which tapi does not do.
Post not yet marked as solved
objdump seems to always print an error message, example:
malcolm@Malcolms-Air keeperfx % objdump --version
Apple LLVM version 13.0.0 (clang-1300.0.29.30)
Optimized build.
Default target: arm64-apple-darwin21.3.0
Host CPU: vortex
Registered Targets:
aarch64 - AArch64 (little endian)
aarch64_32 - AArch64 (little endian ILP32)
aarch64_be - AArch64 (big endian)
arm - ARM
arm64 - ARM64 (little endian)
arm64_32 - ARM64 (little endian ILP32)
armeb - ARM (big endian)
thumb - Thumb
thumbeb - Thumb (big endian)
x86 - 32-bit X86: Pentium-Pro and above
x86-64 - 64-bit X86: EM64T and AMD64
malcolm@Malcolms-Air keeperfx % clang --version
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: arm64-apple-darwin21.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
malcolm@Malcolms-Air keeperfx % clang -c src/actionpt.c
In file included from src/actionpt.c:19:
In file included from src/actionpt.h:22:
src/bflib_basics.h:153:15: warning: '__stdcall' calling convention is not supported for this target [-Wignored-attributes]
typedef void (__stdcall *TbNetworkCallbackFunc)(struct TbNetworkCallbackData *, void *);
^
1 warning generated.
malcolm@Malcolms-Air keeperfx % objdump -f actionpt.o
actionpt.o: file format mach-o arm64
/Library/Developer/CommandLineTools/usr/bin/objdump: error: 'actionpt.o': Invalid/Unsupported object file format
The warning message should have no impact on objdumps ability to produce a result.
I have been looking for objcopy as I need to rename some functions in a precompiled library. I installed the gnu binutils version (brew install binutils) .. this generates a file that the gnu binutils thinks is perfect. The Apple objdump throws up error messages.
Post not yet marked as solved
How to deduce from NSMethodSignature that a struct argument is passed by pointer?
Specifically on ARM.
For example if I have:
@protocol TestProtocol <NSObject>
- (void)time:(CMTime)time;
- (void)rect:(CGRect)point;
@end
And then I do:
struct objc_method_description methodDescription1 =
protocol_getMethodDescription(@protocol(TestProtocol), @selector(time:), YES, YES);
struct objc_method_description methodDescription2 =
protocol_getMethodDescription(@protocol(TestProtocol), @selector(rect:), YES, YES);
NSMethodSignature *sig1 = [NSMethodSignature signatureWithObjCTypes:methodDescription1.types];
NSMethodSignature *sig2 = [NSMethodSignature signatureWithObjCTypes:methodDescription2.types];
const char *arg1 = [sig1 getArgumentTypeAtIndex:2];
const char *arg2 = [sig2 getArgumentTypeAtIndex:2];
NSLog(@"%s %s", methodDescription1.types, arg1);
NSLog(@"%s %s", methodDescription2.types, arg2);
The output is:
v40@0:8{?=qiIq}16 {?=qiIq}
v48@0:8{CGRect={CGPoint=dd}{CGSize=dd}}16 {CGRect={CGPoint=dd}{CGSize=dd}}
Both look similar, no indication that CMTime will be actually passed as a pointer.
But when I print the debug description:
NSLog(@"%@", [sig1 debugDescription]);
NSLog(@"%@", [sig2 debugDescription]);
The first prints:
...
argument 2: -------- -------- -------- --------
type encoding (^) '^{?=qiIq}'
flags {isPointer}
...
While the second prints:
...
argument 2: -------- -------- -------- --------
type encoding ({) '{CGRect={CGPoint=dd}{CGSize=dd}}'
flags {isStruct}
...
So this information is indeed stored in the method signature, but how do I retrieve it without parsing the debug description?
Are there rules I can use to deduce this myself? I tried to experiment with different structs but it is hard to spot a pattern.
Post not yet marked as solved
I just bought a new m1 pro MBP, and it takes a lot of time to build any project after downloading Xcode from the App Store, such as this https://github.com/devMEremenko/XcodeBenchmark.
It takes 30 minutes, and my old intel mac only takes 3 minutes.
What should I do?
Xcode Version: 13.2.1
Post not yet marked as solved
Hi,
What could be causing this on Monterey (M1 Max)? How to debug further? Reproduction steps filed in https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/301
0 0x104768224 __assert_rtn + 128
1 0x10476e4e8 ld::tool::OutputFile::addDyldInfo(ld::Internal&, ld::Internal::FinalSection*, ld::Atom const*, ld::Fixup*, ld::Fixup*, ld::Fixup*, ld::Atom const*, ld::Atom const*, unsigned long long, unsigned long long) (.cold.1) + 0
2 0x1046b0b98 ld::tool::OutputFile::addDyldInfo(ld::Internal&, ld::Internal::FinalSection*, ld::Atom const*, ld::Fixup*, ld::Fixup*, ld::Fixup*, ld::Atom const*, ld::Atom const*, unsigned long long, unsigned long long) + 0
3 0x1046a3544 ld::tool::OutputFile::generateLinkEditInfo(ld::Internal&) + 1188
4 0x10469da90 ld::tool::OutputFile::write(ld::Internal&) + 140
5 0x10462b1d8 main + 584
A linker snapshot was created at:
/tmp/libHSfuturice-integrations-0-inplace-ghc8.10.7.dylib-2022-00-08-222023.ld-snapshot
ld: Assertion failed: (target->definition() != ld::Atom::definitionProxy), function addChainedFixupLocation, file OutputFile.cpp, line 5903.
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
`clang' failed in phase `Linker'. (Exit code: 1)
Post not yet marked as solved
lldb-rpc-server_2022-01-01-210548_Aamors-MacBook-Pro.crash
Post not yet marked as solved
Since we upgraded a Mac to the latest Xcode (coming from 12.4) to 13.1 or 13.2.1 / commandline tools 13.2 we're hitting an error when linking our executable.
clang: error: unable to execute command: Bus error: 10
clang: error: linker command failed due to signal (use -v to see invocation)
ninja: build stopped: subcommand failed.
It only happens when doing LTO builds. I disabled system hardening to be able to attach LLDB to the linker hoping to find more info on why it might crash and got a huge stack trace:
* frame #0: 0x00000001058087d0 libLTO.dylib`computeKnownBitsFromOperator(llvm::Operator const*, llvm::APInt const&, llvm::KnownBits&, unsigned int, (anonymous namespace)::Query const&) + 32
frame #1: 0x00000001057f6333 libLTO.dylib`computeKnownBits(llvm::Value const*, llvm::APInt const&, llvm::KnownBits&, unsigned int, (anonymous namespace)::Query const&) + 1523
frame #2: 0x00000001057f5cc9 libLTO.dylib`computeKnownBits(llvm::Value const*, llvm::KnownBits&, unsigned int, (anonymous namespace)::Query const&) + 169
frame #3: 0x00000001058097cd libLTO.dylib`computeKnownBitsFromOperator(llvm::Operator const*, llvm::APInt const&, llvm::KnownBits&, unsigned int, (anonymous namespace)::Query const&) + 4125
total stack size is 24824 frames. There is a clear loop pattern here so either this triggers an endless loop causing the stack to get exhausted or we have something in our code that triggers this deepdive that eventually might resolve when stack room would be a plenty.
It actually looks to be the latter as we have a similar issue on Linux compiles which we fixed by changing the ulimit -s 16384 but that command seems to change absolutely nothing on the mac I'm working on. After changing this in the bash shell (users default shell) it still remains a stack of 24824 frames.
Working here on:
Mac OS Monterey 12.1
Mac Pro (2019) - 2.5 GHz 28-Core, 96GB RAM
ld -v :
@(#)PROGRAM:ld PROJECT:ld64-711
BUILD 21:57:11 Nov 17 2021
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
LTO support using: LLVM version 13.0.0, (clang-1300.0.29.30) (static support for 27, runtime is 27)
TAPI support using: Apple TAPI version 13.0.0 (tapi-1300.0.6.5)
Consider a C++ method that retrieve struct of native typed arguments like enum class, sub-structs, std::string, int, etc...
I'd like to create a swift API that return the same struct but in swift variables
for example :
class ErrorMessage {
public:
int status;
std::string message;
};
class serverResponse {
public:
ErrorMessage error;
std::string str_value;
std::uint16_t int_val;
std::time_t last_seen;
EnumVal status;
};
serverResponse getServerResponse();
So I'd like to convert it to the swift equivalent struct with native members
open class serverResponseSwift : NSObject {
open class var error: ErrorMessage { get }
open var str_value: String { get }
open var int_val: UInt16 { get }
open var status: EnumVal { get }
};
I know that direct conversion is not yet possible so I need to use objective-C++ code as a mediator. So I've used a bridging header to include the converting method in objective-C++ which will look like this :
@interface Converter
- (serverResponseSwift) getServerStatusSwift;
@end
and the equivalent .mm file will implement the conversion function, but can I use the swift Class in objective-c in order to fill it up according to the CPP serverResponse ?
@implementation Converter
- (serverResponseSwift) getServerStatusSwift {
serverResponse x = getServerResponse();
/// How do I create serverResponseSwift out of serverResponse
}
Thanks !
Post not yet marked as solved
Currently in Xcode 13, clang static analyzer is not analyzing Swift Language. Will Clang Static Analyzer eventually support Swift Language in the upcoming releases?