Xcode Static Analyzer

RSS for tag

The Xcode Clang Static Analyzer finds bugs in Objective-C, C, and C++ code. It finds hard-to-produce, edge-case bugs without the need to run code and shows the sequence of steps along which the bug occurs.

Posts under Xcode Static Analyzer tag

55 Posts

Post

Replies

Boosts

Views

Activity

Erroneous output of a C++ program in MacOS that gives correct output on Windows PC
Hello. I have a M1 Mac mini with MacOS 12.1 (MacOS Monterey). I have written a C++ program in the inbuilt vim text editor for sorting an Array of integers in ascending order using Merge Sort Algorithm. The compiler I am using is the official Clang compiler. MI tried the g++ command as well as clang++ command to compile the program. (Actually both the commands run clang compiler only) The weird thing I am facing is that sometimes it replaces some integers in the output with random integers. I have attached the screenshot. But this behaviour is not observed when I copied the same program in my windows PC. Please help in this regard. I am attaching the C++ program file as well as the screenshot of the output. MergeSort.cpp
3
0
1.5k
Jan ’22
Using reality kit can we can we scan a human and create a 3D model with skeletal structure
Hello, I know that we can capture object using reality kit and create a 3D model of the real world object. Can we also use reality kit to scan a human and create a 3D model of the human along with the skeletal structure. So we can use the same scanned human in the motion capture and display the motion animation with the real person. Thanks & Regards, Rakesh
0
0
715
Jan ’22
How to view the image(cv::mat) in the debug mode in xcode
Recently, I am learning some knowledge about OpenCV on Mac, refer to the online tutorial to configure OpenCV of C++ on Xcode, and implement some simple examples on Xcode. The biggest problem encountered is how to preview the image in debug mode. The cv::Mat image cannot be previewed directly, which is very unfriendly for debugging. I also found some solutions to this problem on the Internet, and these results are disappointing, at least for me as a programming beginner. I hope that this function implemented by xcode has the corresponding "OpenCV Image Viewer" plug-in on other IDEs on Mac such as Pycharm and CLion, and the "Image Watch" plug-in corresponding to Visual Studio on Windows. For me, this feature is necessary. According to this idea, is it a wrong choice to learn OpenCV C++ with Xcode, and embracing CLion on a Mac is the best choice for me? (Considering that Xcode is an IDE for Swift, I don't know much about Swift.) The process of implementing these simple examples on Xcode is still very enjoyable. I like Xcode's UI design. Therefore, I still hope that there is the best way to solve this problem in Xcode. The following is an example of running C++ OpenCV on Xcode: Xcode Version: 13.2.1 (13C100) OpenCV Version: stable 4.5.3 (bottled)
0
0
1.6k
Jan ’22
iOS 15 app ui keep breaking after few hour kept in background
Hello everyone. I have an issue with an iOS react-native app after the iOS 15 upgrade but with not a crash. If someone opens the app after ~1 hour from the last time he/she opened it, the app skips the SplashScreen, and after that nothing renders correctly. The positioning and order of components are wrong. also only happens in some devices like iPhone 12 pro max running 15.1.1  any help would be highly appreciated I'm counting on these forms other than that there is no way to debug such an issue or to put any log because even log will not identify issue
1
0
2.2k
Jan ’22
Xcode 13.1 not responding every time after first build macbook Air(2020) M1 Chip
Hello Developers, I am using Xcode(Rosetta Enabled) in macBook Air (2020) with M1 Chip. I am facing an issue with Xcode 13.1 in macOS 12.0.1 whenever I run my project in my device first time it's running successfully but when i do some changes in code and re run the project then it's not responding at all. I need to force quit and re open the xcode do all stuff. I am facing this is issue with my project only..for all other projects Xcode working fine and seamless So I am not understanding what is the issue with my project So If anybody face similar issue please help me Thank you Report
1
0
1.2k
Nov ’21
unknown warning showing up
ld: warning: dylib (/usr/local/Cellar/gcc/11.2.0/lib/gcc/11/libstdc++.dylib) was built for newer macOS version (11.3) than being linked (11.0) this warning is showing up in the terminal every time I run C++ code in it using g++ compiler. how to get rid of it ? I have tried to reinstall Xcode- command line tools but it doesn't seem to solve the problem.
1
0
871
Nov ’21
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
Since I have upgraded my macOS to Monterey, it couldn't run the cython files. I already installed xcode and the path of /Library/Developer/CommandLineTools/usr/bin contains clang but by running the following command python setup.py build_ext --inplace it return the error: clang-10: error: linker command failed with exit code 1 (use -v to see invocation) error: command 'x86_64-apple-darwin13.4.0-clang' failed with exit status 1 even it created the build and .c and .so files it couldn't compile and find c/c+ libs like: cython_modules.c:620:10: fatal error: 'numpy/arrayobject.h' file not found #include "numpy/arrayobject.h" ^~~~~~~~~~~~~~~~~~~~~ 1 error generated.
0
0
1.3k
Nov ’21
Xcode13 issue
when I use. low version of Xcode13, I run a iOS project is ok. when I. use Xcode13, I got a link problem, " ld: library not found for -lbz2.1.0.5 clang: error: linker command failed with exit code 1 (use -v to see invocation) " -lbz2.1.0.5 is what framwork? what should I Do? I. just use The Legacy Build System build! I don`t know is there have influence! who can help me !
2
0
1.1k
Oct ’21
Xcode 13.0 Suggest completions while typing is very slow in Objc files
After upgrading to Xcode 13.0 (13a233), the code prompt of our project OC file is super slow. It takes about 10 seconds for smart Lenovo to come out. The swift file is OK, and the prompt is very fast. After trying to create a new project, the prompt is also very fast. It seems that there is a problem with our project settings. But I tried to modify some settings, but I still couldn't solve it. We are a swift mixed project dominated by OC. The project folder has 5.37gb and has not been disassembled into small projects. At present, there are about 1000 warnings. I wonder whether it is related to this. Unrelated to notebook, MacOS version and Xcode settings have been excluded because project members are experiencing this problem. It's no problem to open other similar large swift based hybrid projects. Our project is divided into 10 configurations according to different server environments. It is estimated that it is related to the setting of build setting. It is unclear how to modify it. Does anyone know how modification can make code Association faster? thank you!
0
0
880
Oct ’21
Xcode integration with clang-tidy
Hi, I'm looking for a way to integrate clang-tidy rules with my xcode project. is there a way xcode can read .clang-tidy files and add the rules to each compilation line ? I couldn't find anyway to do it, so i presume it's unsupported. but perhaps there can be some workaround i can use to modify the compilation according to clang-tidy rules that the IDE read from a file. thanks !
1
2
2.4k
Oct ’21
Error compile c++ in xcode
Hi everyone, I got an error when compile c++ with xcode 13. > 'notify_one' is unavailable 'wait' is unavailable This is my code in main.mm : #include <iostream> #include <atomic> #include <thread> std::atomic_flag condAtomicFlag{}; std::atomic<int> counter{}; constexpr int countlimit = 1000000; void ping() {   while(counter <= countlimit) {     condAtomicFlag.clear();     condAtomicFlag.test_and_set();           ++counter;           condAtomicFlag.notify_one();   } } void pong() {   while(counter < countlimit) {     condAtomicFlag.wait(false);     condAtomicFlag.clear();     condAtomicFlag.notify_one();   } } int main() {    auto start = std::chrono::system_clock::now();       condAtomicFlag.test_and_set();   std::thread t1(ping);   std::thread t2(pong);   t1.join();   t2.join();   std::chrono::duration<double> dur = std::chrono::system_clock::now() - start;   std::cout << "Duration: " << dur.count() << " seconds" << std::endl; } I researched and found Apple clang not support "notify_one" and "wait" function If have any solution for my issue Thank you
0
0
964
Oct ’21
Xcode not reporting missing header files
So I'm new to Xcode, but I'm noticing some disturbing behavior with my current c project. it seems it is not reporting headers it can't find, which is making all kinds of harder to diagnose errors, like "implicit function declaration not allowed in c99, etc. Anyone have any other ideas on why this might be? I think the latest one was "ssl.h", so maybe it was finding it in the sdk and not the version under my project I needed to use (boringssl)?
0
0
560
Sep ’21
Clang: No such sysroot
This seems to be a problem that has been popping up quite often with Big Sur. The mentioned solutions for checking the symbolic link for the MacOS.sdk don't seem to solve my problem. I'm trying to build a c++ module for python using a setup.py script. Running in verbose my command line shows: running build running build_ext building 'pparser' extension Compiling with an SDK that doesn't seem to exist:  /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk Please check your Xcode installation clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/Users/john/.pyenv/versions/3.7.9/include/python3.7m -c pparser.cpp -o build/temp.macosx-11.4-x86_64-3.7/pparser.o -Wno-nullability-completeness -Wno-undef-prefix -I/usr/local/opt/flex/include -I/usr/local/opt/bison/include -std=gnu++14 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk --verbose Apple clang version 12.0.5 (clang-1205.0.22.11) Target: x86_64-apple-darwin20.5.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin clang: warning: no such sysroot directory: ' /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk' [-Wmissing-sysroot] ignoring nonexistent directory " /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/c++/v1"  "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple x86_64-apple-macosx11.4.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name pparser.cpp -mrelocation-model pic -pic-level 2 -mframe-pointer=all -fno-strict-return -fno-rounding-math -munwind-tables -fcompatibility-qualified-id-block-type-checking -fvisibility-inlines-hidden-static-local-var -target-cpu penryn -debug-info-kind=standalone -dwarf-version=4 -debugger-tuning=lldb -target-linker-version 650.9 -v -resource-dir /Library/Developer/CommandLineTools/usr/lib/clang/12.0.5 -isysroot " /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk" -D NDEBUG -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I /Users/john/.pyenv/versions/3.7.9/include/python3.7m -I /usr/local/opt/flex/include -I /usr/local/opt/bison/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -stdlib=libc++ -internal-isystem /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1 -internal-isystem " /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/local/include" -internal-isystem /Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include -internal-externc-isystem " /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include" -internal-externc-isystem /Library/Developer/CommandLineTools/usr/include -O3 -Wno-unused-result -Wsign-compare -Wunreachable-code -Wall -Wno-nullability-completeness -Wno-undef-prefix -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -std=gnu++14 -fdeprecated-macro -fdebug-compilation-dir /Users/john/Programming/git/Jupyter/Parsers -ferror-limit 19 -fwrapv -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -fmax-type-align=16 -fcommon -fcolor-diagnostics -vectorize-loops -vectorize-slp -clang-vendor-feature=+disableNonDependentMemberExprInCurrentInstantiation -fno-odr-hash-protocols -mllvm -disable-aligned-alloc-awareness=1 -o build/temp.macosx-11.4-x86_64-3.7/pparser.o -x c++ pparser.cpp clang -cc1 version 12.0.5 (clang-1205.0.22.11) default target x86_64-apple-darwin20.5.0 Yet my directory shows the correct symbolic links: ```~/Programming/git/Jupyter/Parsers  % ls -al /Library/Developer/CommandLineTools/SDKs                                                                                                                                       main total 0 drwxr-xr-x  7 root  wheel  224 Jul 12 19:31 . drwxr-xr-x  5 root  wheel  160 Jul 12 19:27 .. lrwxr-xr-x  1 root  wheel   14 Jul 12 19:31 MacOSX.sdk -> MacOSX11.3.sdk drwxr-xr-x  8 root  wheel  256 Jul 12 19:31 MacOSX10.15.sdk drwxr-xr-x  7 root  wheel  224 Nov 30  2020 MacOSX11.1.sdk drwxr-xr-x  7 root  wheel  224 Jul 12 19:31 MacOSX11.3.sdk lrwxr-xr-x  1 root  wheel   14 Jul 12 19:30 MacOSX11.sdk -> MacOSX11.3.sdk I'm trying to force some of the settings in the setup script: from distutils.core import setup, Extension class custom_build_ext(build_ext): def build_extensions(self): # Override the compiler executables. Importantly, this # removes the "default" compiler flags that would # otherwise get passed on to to the compiler, i.e., # distutils.sysconfig.get_var("CFLAGS"). self.compiler.set_executable("compiler_so", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++") self.compiler.set_executable("compiler_cxx", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++") self.compiler.set_executable("linker_so", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++") build_ext.build_extensions(self) [ setup(name='pparser', version='1.0', \ ext_modules=[Extension('pparser', ['pparser.cpp'], extra_compile_args = ["-Wno-nullability-completeness", "-Wno-undef-prefix", "-I/usr/local/opt/flex/include", "-I/usr/local/opt/bison/include", "-std=gnu++14", "-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk", "--verbose"], extra_link_args=["-flat_namespace"])]) ] I'm lost on what to try next.
0
0
2.9k
Aug ’21
Erroneous output of a C++ program in MacOS that gives correct output on Windows PC
Hello. I have a M1 Mac mini with MacOS 12.1 (MacOS Monterey). I have written a C++ program in the inbuilt vim text editor for sorting an Array of integers in ascending order using Merge Sort Algorithm. The compiler I am using is the official Clang compiler. MI tried the g++ command as well as clang++ command to compile the program. (Actually both the commands run clang compiler only) The weird thing I am facing is that sometimes it replaces some integers in the output with random integers. I have attached the screenshot. But this behaviour is not observed when I copied the same program in my windows PC. Please help in this regard. I am attaching the C++ program file as well as the screenshot of the output. MergeSort.cpp
Replies
3
Boosts
0
Views
1.5k
Activity
Jan ’22
Using reality kit can we can we scan a human and create a 3D model with skeletal structure
Hello, I know that we can capture object using reality kit and create a 3D model of the real world object. Can we also use reality kit to scan a human and create a 3D model of the human along with the skeletal structure. So we can use the same scanned human in the motion capture and display the motion animation with the real person. Thanks & Regards, Rakesh
Replies
0
Boosts
0
Views
715
Activity
Jan ’22
How to view the image(cv::mat) in the debug mode in xcode
Recently, I am learning some knowledge about OpenCV on Mac, refer to the online tutorial to configure OpenCV of C++ on Xcode, and implement some simple examples on Xcode. The biggest problem encountered is how to preview the image in debug mode. The cv::Mat image cannot be previewed directly, which is very unfriendly for debugging. I also found some solutions to this problem on the Internet, and these results are disappointing, at least for me as a programming beginner. I hope that this function implemented by xcode has the corresponding "OpenCV Image Viewer" plug-in on other IDEs on Mac such as Pycharm and CLion, and the "Image Watch" plug-in corresponding to Visual Studio on Windows. For me, this feature is necessary. According to this idea, is it a wrong choice to learn OpenCV C++ with Xcode, and embracing CLion on a Mac is the best choice for me? (Considering that Xcode is an IDE for Swift, I don't know much about Swift.) The process of implementing these simple examples on Xcode is still very enjoyable. I like Xcode's UI design. Therefore, I still hope that there is the best way to solve this problem in Xcode. The following is an example of running C++ OpenCV on Xcode: Xcode Version: 13.2.1 (13C100) OpenCV Version: stable 4.5.3 (bottled)
Replies
0
Boosts
0
Views
1.6k
Activity
Jan ’22
iOS 15 app ui keep breaking after few hour kept in background
Hello everyone. I have an issue with an iOS react-native app after the iOS 15 upgrade but with not a crash. If someone opens the app after ~1 hour from the last time he/she opened it, the app skips the SplashScreen, and after that nothing renders correctly. The positioning and order of components are wrong. also only happens in some devices like iPhone 12 pro max running 15.1.1  any help would be highly appreciated I'm counting on these forms other than that there is no way to debug such an issue or to put any log because even log will not identify issue
Replies
1
Boosts
0
Views
2.2k
Activity
Jan ’22
Will Clang Static Analyzer have a Swift Support?
Currently in Xcode 13, clang static analyzer is not analyzing Swift Language. Will Clang Static Analyzer eventually support Swift Language in the upcoming releases?
Replies
0
Boosts
0
Views
1k
Activity
Dec ’21
Xcode 13.1 not responding every time after first build macbook Air(2020) M1 Chip
Hello Developers, I am using Xcode(Rosetta Enabled) in macBook Air (2020) with M1 Chip. I am facing an issue with Xcode 13.1 in macOS 12.0.1 whenever I run my project in my device first time it's running successfully but when i do some changes in code and re run the project then it's not responding at all. I need to force quit and re open the xcode do all stuff. I am facing this is issue with my project only..for all other projects Xcode working fine and seamless So I am not understanding what is the issue with my project So If anybody face similar issue please help me Thank you Report
Replies
1
Boosts
0
Views
1.2k
Activity
Nov ’21
unknown warning showing up
ld: warning: dylib (/usr/local/Cellar/gcc/11.2.0/lib/gcc/11/libstdc++.dylib) was built for newer macOS version (11.3) than being linked (11.0) this warning is showing up in the terminal every time I run C++ code in it using g++ compiler. how to get rid of it ? I have tried to reinstall Xcode- command line tools but it doesn't seem to solve the problem.
Replies
1
Boosts
0
Views
871
Activity
Nov ’21
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
Since I have upgraded my macOS to Monterey, it couldn't run the cython files. I already installed xcode and the path of /Library/Developer/CommandLineTools/usr/bin contains clang but by running the following command python setup.py build_ext --inplace it return the error: clang-10: error: linker command failed with exit code 1 (use -v to see invocation) error: command 'x86_64-apple-darwin13.4.0-clang' failed with exit status 1 even it created the build and .c and .so files it couldn't compile and find c/c+ libs like: cython_modules.c:620:10: fatal error: 'numpy/arrayobject.h' file not found #include "numpy/arrayobject.h" ^~~~~~~~~~~~~~~~~~~~~ 1 error generated.
Replies
0
Boosts
0
Views
1.3k
Activity
Nov ’21
Xcode error run function
I've received this message when I try to run the program: "Failed to install the requested application The bundle identifier of the application could not be determined. Ensure that the application's Info.plist contains a value for CFBundleIdentifier." What I can do to fix it?
Replies
2
Boosts
0
Views
2.4k
Activity
Nov ’21
Xcode13 issue
when I use. low version of Xcode13, I run a iOS project is ok. when I. use Xcode13, I got a link problem, " ld: library not found for -lbz2.1.0.5 clang: error: linker command failed with exit code 1 (use -v to see invocation) " -lbz2.1.0.5 is what framwork? what should I Do? I. just use The Legacy Build System build! I don`t know is there have influence! who can help me !
Replies
2
Boosts
0
Views
1.1k
Activity
Oct ’21
Xcode 13.0 Suggest completions while typing is very slow in Objc files
After upgrading to Xcode 13.0 (13a233), the code prompt of our project OC file is super slow. It takes about 10 seconds for smart Lenovo to come out. The swift file is OK, and the prompt is very fast. After trying to create a new project, the prompt is also very fast. It seems that there is a problem with our project settings. But I tried to modify some settings, but I still couldn't solve it. We are a swift mixed project dominated by OC. The project folder has 5.37gb and has not been disassembled into small projects. At present, there are about 1000 warnings. I wonder whether it is related to this. Unrelated to notebook, MacOS version and Xcode settings have been excluded because project members are experiencing this problem. It's no problem to open other similar large swift based hybrid projects. Our project is divided into 10 configurations according to different server environments. It is estimated that it is related to the setting of build setting. It is unclear how to modify it. Does anyone know how modification can make code Association faster? thank you!
Replies
0
Boosts
0
Views
880
Activity
Oct ’21
Xcode integration with clang-tidy
Hi, I'm looking for a way to integrate clang-tidy rules with my xcode project. is there a way xcode can read .clang-tidy files and add the rules to each compilation line ? I couldn't find anyway to do it, so i presume it's unsupported. but perhaps there can be some workaround i can use to modify the compilation according to clang-tidy rules that the IDE read from a file. thanks !
Replies
1
Boosts
2
Views
2.4k
Activity
Oct ’21
Error compile c++ in xcode
Hi everyone, I got an error when compile c++ with xcode 13. > 'notify_one' is unavailable 'wait' is unavailable This is my code in main.mm : #include <iostream> #include <atomic> #include <thread> std::atomic_flag condAtomicFlag{}; std::atomic<int> counter{}; constexpr int countlimit = 1000000; void ping() {   while(counter <= countlimit) {     condAtomicFlag.clear();     condAtomicFlag.test_and_set();           ++counter;           condAtomicFlag.notify_one();   } } void pong() {   while(counter < countlimit) {     condAtomicFlag.wait(false);     condAtomicFlag.clear();     condAtomicFlag.notify_one();   } } int main() {    auto start = std::chrono::system_clock::now();       condAtomicFlag.test_and_set();   std::thread t1(ping);   std::thread t2(pong);   t1.join();   t2.join();   std::chrono::duration<double> dur = std::chrono::system_clock::now() - start;   std::cout << "Duration: " << dur.count() << " seconds" << std::endl; } I researched and found Apple clang not support "notify_one" and "wait" function If have any solution for my issue Thank you
Replies
0
Boosts
0
Views
964
Activity
Oct ’21
Xcode not reporting missing header files
So I'm new to Xcode, but I'm noticing some disturbing behavior with my current c project. it seems it is not reporting headers it can't find, which is making all kinds of harder to diagnose errors, like "implicit function declaration not allowed in c99, etc. Anyone have any other ideas on why this might be? I think the latest one was "ssl.h", so maybe it was finding it in the sdk and not the version under my project I needed to use (boringssl)?
Replies
0
Boosts
0
Views
560
Activity
Sep ’21
Clang: No such sysroot
This seems to be a problem that has been popping up quite often with Big Sur. The mentioned solutions for checking the symbolic link for the MacOS.sdk don't seem to solve my problem. I'm trying to build a c++ module for python using a setup.py script. Running in verbose my command line shows: running build running build_ext building 'pparser' extension Compiling with an SDK that doesn't seem to exist:  /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk Please check your Xcode installation clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/Users/john/.pyenv/versions/3.7.9/include/python3.7m -c pparser.cpp -o build/temp.macosx-11.4-x86_64-3.7/pparser.o -Wno-nullability-completeness -Wno-undef-prefix -I/usr/local/opt/flex/include -I/usr/local/opt/bison/include -std=gnu++14 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk --verbose Apple clang version 12.0.5 (clang-1205.0.22.11) Target: x86_64-apple-darwin20.5.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin clang: warning: no such sysroot directory: ' /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk' [-Wmissing-sysroot] ignoring nonexistent directory " /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/c++/v1"  "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple x86_64-apple-macosx11.4.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name pparser.cpp -mrelocation-model pic -pic-level 2 -mframe-pointer=all -fno-strict-return -fno-rounding-math -munwind-tables -fcompatibility-qualified-id-block-type-checking -fvisibility-inlines-hidden-static-local-var -target-cpu penryn -debug-info-kind=standalone -dwarf-version=4 -debugger-tuning=lldb -target-linker-version 650.9 -v -resource-dir /Library/Developer/CommandLineTools/usr/lib/clang/12.0.5 -isysroot " /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk" -D NDEBUG -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I /Users/john/.pyenv/versions/3.7.9/include/python3.7m -I /usr/local/opt/flex/include -I /usr/local/opt/bison/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -stdlib=libc++ -internal-isystem /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1 -internal-isystem " /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/local/include" -internal-isystem /Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include -internal-externc-isystem " /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include" -internal-externc-isystem /Library/Developer/CommandLineTools/usr/include -O3 -Wno-unused-result -Wsign-compare -Wunreachable-code -Wall -Wno-nullability-completeness -Wno-undef-prefix -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -std=gnu++14 -fdeprecated-macro -fdebug-compilation-dir /Users/john/Programming/git/Jupyter/Parsers -ferror-limit 19 -fwrapv -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -fmax-type-align=16 -fcommon -fcolor-diagnostics -vectorize-loops -vectorize-slp -clang-vendor-feature=+disableNonDependentMemberExprInCurrentInstantiation -fno-odr-hash-protocols -mllvm -disable-aligned-alloc-awareness=1 -o build/temp.macosx-11.4-x86_64-3.7/pparser.o -x c++ pparser.cpp clang -cc1 version 12.0.5 (clang-1205.0.22.11) default target x86_64-apple-darwin20.5.0 Yet my directory shows the correct symbolic links: ```~/Programming/git/Jupyter/Parsers  % ls -al /Library/Developer/CommandLineTools/SDKs                                                                                                                                       main total 0 drwxr-xr-x  7 root  wheel  224 Jul 12 19:31 . drwxr-xr-x  5 root  wheel  160 Jul 12 19:27 .. lrwxr-xr-x  1 root  wheel   14 Jul 12 19:31 MacOSX.sdk -> MacOSX11.3.sdk drwxr-xr-x  8 root  wheel  256 Jul 12 19:31 MacOSX10.15.sdk drwxr-xr-x  7 root  wheel  224 Nov 30  2020 MacOSX11.1.sdk drwxr-xr-x  7 root  wheel  224 Jul 12 19:31 MacOSX11.3.sdk lrwxr-xr-x  1 root  wheel   14 Jul 12 19:30 MacOSX11.sdk -> MacOSX11.3.sdk I'm trying to force some of the settings in the setup script: from distutils.core import setup, Extension class custom_build_ext(build_ext): def build_extensions(self): # Override the compiler executables. Importantly, this # removes the "default" compiler flags that would # otherwise get passed on to to the compiler, i.e., # distutils.sysconfig.get_var("CFLAGS"). self.compiler.set_executable("compiler_so", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++") self.compiler.set_executable("compiler_cxx", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++") self.compiler.set_executable("linker_so", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++") build_ext.build_extensions(self) [ setup(name='pparser', version='1.0', \ ext_modules=[Extension('pparser', ['pparser.cpp'], extra_compile_args = ["-Wno-nullability-completeness", "-Wno-undef-prefix", "-I/usr/local/opt/flex/include", "-I/usr/local/opt/bison/include", "-std=gnu++14", "-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk", "--verbose"], extra_link_args=["-flat_namespace"])]) ] I'm lost on what to try next.
Replies
0
Boosts
0
Views
2.9k
Activity
Aug ’21