Compiler

RSS for tag

Discuss the various compiler and toolchain technologies used in development.

Posts under Compiler tag

91 Posts
Sort by:
Post not yet marked as solved
1 Replies
649 Views
Please help me, really urgent, please. The compatibilty of m1max chip troubled me hundreds of hour. 1、Please show me how to speed up source downloaded from github, such as numpy 、pandas or any other source, by fully using the CPU and GPU chips. (python3.8 and 3.9) can I do it just like this? Step 1: download source from github Step 2: create a file named "site.cfg"in this souce file, and add content: [accelerate] libraries=Metal, Acelerate, vecLib Step 3: Terminal: NPY_LAPACK_Order=accelerate python3 setup.py build Step 4: pip3 install . or python3 setup.py install ? (I am not sure which method to apply) 2、How is the compatibility of Accelate and Metal? Can work with most of the source? Any tips? such as https://github.com/microsoft/qlib 3、which gcc to install? show me the code when I do it, some error happens, gcc(version 4.2.1 installed by brew) cannot compile some source, such as "ecos". Moreover, I cannot compile many sources directly by python3 setup.py install (without accelerate) How to config the gcc? which version to use on m1max 4、sometimes I can compile source by brew. but extremely unconvenient, because I need to install packages on vitual environment (e.g. conda env)other than on base path. what should I do? can I install brew on vitual environment? or just use brew to build the source, then I install by pip on vitual env? or can I config the brew to install on only vitual environment? Just show me the code 5、to compile, do I also need to install g++? witch version, show me the code 6、show me how to speed up python program by GPU and parallel computing on Accelerate
Posted
by jefftang.
Last updated
.
Post marked as solved
1 Replies
1.2k Views
I've built an SDK (which has dependencies) and packaged it up as an XCFramework for clients' use, but when I test it in a project, I'm getting: ...SDK.swiftmodule/arm64-apple-ios.swiftinterface:20:8: Cannot load underlying module for... This occurs in the Compile Swift Sources action and the break is in the import DepedencySDK statement in the swiftinterface file In the SDK project and the demo, the dependencies are loaded into the project via cocoapods. Any ideas? Or suggestions on how to debug this further? Thanks!
Posted
by harikaram.
Last updated
.
Post not yet marked as solved
1 Replies
224 Views
Hey, Ive been trying to run this app from GitHub. It successfully compiled but once it started launching the program only bounced in the dock and didn’t show anything. Here’s what Xcode says Please help me fixing it. I really want to run this app. Many thanks for your help in advance
Posted Last updated
.
Post marked as solved
2 Replies
259 Views
Hey, I'm not bad with computers but not a developer at all. I really want to use the app from this GitHub page. The problem is that the creator hasn't published a release yet so I have to compile it myself. When I hit build in Xcode it immediately shows a number of errors. How can I fix them and get it to build? Please excuse me very much for asking such a noob question but please help me guys. You would make somebody very happy. Thanks very much for your help in advance!
Posted Last updated
.
Post marked as solved
1 Replies
320 Views
When compiling my project for a physical device, Xcode does not reuse the build cache but instead recompiles every file. When compiling for a simulator target instead, Xcode properly uses the build cache, and incremental builds are lightning fast. Is there a configuration I can check to enable incremental builds for physical devices, too?
Posted Last updated
.
Post not yet marked as solved
6 Replies
470 Views
i have osx 12.1 installed, latest Xcode and Command line tools. i also have installed MAMP Pro. i have to install some perl modules. when i use perl from osx it works. when i try to use perl that comes with MAMP i got the following error: /Application/MAMP/Library/bin/cpan install HTML::Parser .... t/uentities.t .......... Can't load '/Users/markus/.cpan/build/HTML-Parser-3.76-0/blib/arch/auto/HTML/Parser/Parser.bundle' for module HTML::Parser: dlopen(/Users/markus/.cpan/build/HTML-Parser-3.76-0/blib/arch/auto/HTML/Parser/Parser.bundle, 0x0002): tried: '/Users/markus/.cpan/build/HTML-Parser-3.76-0/blib/arch/auto/HTML/Parser/Parser.bundle' (code signature in <F2C6AAD0-D2A8-34D6-A697-A817A2334036> '/Users/markus/.cpan/build/HTML-Parser-3.76-0/blib/arch/auto/HTML/Parser/Parser.bundle' not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.), '/usr/lib/Parser.bundle' (no such file) at /Applications/MAMP/Library/lib/perl5/5.30.1/darwin-thread-multi-2level/DynaLoader.pm line 197. this must have something to do with code signing or gatekeeper. this error comes even if i try to do it manually: /Applications/MAMP/Library/bin/perl Makefile.PL Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for HTML::Parser Writing MYMETA.yml and MYMETA.json make cc -mmacosx-version-min=10.12 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector-strong Parser.o -o blib/arch/auto/HTML/Parser/Parser.bundle \ \ chmod 755 blib/arch/auto/HTML/Parser/Parser.bundle make test .... t/uentities.t .......... Can't load '/Users/markus/.cpan/build/HTML-Parser-3.76-0/blib/arch/auto/HTML/Parser/Parser.bundle' for module HTML::Parser: dlopen(/Users/markus/.cpan/build/HTML-Parser-3.76-0/blib/arch/auto/HTML/Parser/Parser.bundle, 0x0002): tried: '/Users/markus/.cpan/build/HTML-Parser-3.76-0/blib/arch/auto/HTML/Parser/Parser.bundle' (code signature in <F2C6AAD0-D2A8-34D6-A697-A817A2334036> '/Users/markus/.cpan/build/HTML-Parser-3.76-0/blib/arch/auto/HTML/Parser/Parser.bundle' not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.), '/usr/lib/Parser.bundle' (no such file) at /Applications/MAMP/Library/lib/perl5/5.30.1/darwin-thread-multi-2level/DynaLoader.pm line 197. ll blib/arch/auto/HTML/Parser/Parser.bundle -rwxr-xr-x 1 markus staff 71960 22 Dez 09:37 blib/arch/auto/HTML/Parser/Parser.bundle
Posted
by markus42.
Last updated
.
Post not yet marked as solved
1 Replies
340 Views
The project can run on simulator well but it can't run on the iOS devices. I got the error: "error: Build input file cannot be found: '/Users/tantan/Library/Developer/Xcode/DerivedData/Videe-bpukzfmjaxewiuaiolulcqllukjg/Build/Products/Debug-iphoneos/[AppName].app/AppName' (in target 'AppName' from project 'Videe')" Are there any solutions for that? Thanks.
Posted
by tanttdev.
Last updated
.
Post not yet marked as solved
0 Replies
484 Views
I'm getting the error: ** "Warning: Error creating LLDB target at path '/Users/tantan/Library/Developer/Xcode/DerivedData/Videe-bpukzfmjaxewiuaiolulcqllukjg/Build/Products/Debug-iphonesimulator/[AppName].app'- using an empty LLDB target which can cause slow memory reads from remote devices."** Is there anyone who can explain to me what the reason is and how can fix it? Thanks,
Posted
by tanttdev.
Last updated
.
Post not yet marked as solved
1 Replies
222 Views
According to Increasing Performance by Reducing Dynamic Dispatch, addding 'final' keyword increase runtime performance by reducing dynamic dispatch. I'm wondering if adding 'final' keyword will also improve compile time. read such opinions in some articels, but not clear to me. I tested it, and it seems to me 'final' not affect compile time.
Posted Last updated
.
Post marked as solved
1 Replies
528 Views
Hi all, my project is running fine on simulator and real device, but when I try to archive it for distribution the following error code appears. Build input file cannot be found: '/Users/mauro/Library/Developer/Xcode/DerivedData/FlexoCalculator_mobile-acfisshphqrnvoennhvdkcvtplhc/Build/Intermediates.noindex/ArchiveIntermediates/FlexoCalculator_mobile/InstallationBuildProductsLocation/Applications/FlexoCalculator_mobile.app/FlexoCalculator_mobile' I already cleaned build folder and derived data but issue is still there. I have no idea on where this error comes from and how to clean it. Any help is appreciated. Xcode 13.2.1 - Swift 4 - Project for iOS 10 This project was well compiled and distributed for years. Now, after upgrade to Monterey/Xcode 13, I'm not able to compile it anymore. This error is not visible on logs, but is present on left panel only:
Posted
by ML69.
Last updated
.
Post marked as solved
1 Replies
397 Views
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 !
Posted
by chapo213.
Last updated
.
Post not yet marked as solved
0 Replies
458 Views
Project is based on python3.8 and 3.9, containing some C and C++ source How can I do parallel computing on CPU and GPU of M1max In deed, I buy Mac m1max for the strong GPU to do quantitative finance, for which the speed is extremely important. Unfortunately, cuda is not compatible with Mac. Show me how to do it, thx. Are Accelerate(for CPU) and Metal(for GPU) can speed up any source by building like this: Step 1: download source from github Step 2: create a file named "site.cfg"in this souce file, and add content: [accelerate] libraries=Metal, Acelerate, vecLib Step 3: Terminal: NPY_LAPACK_Order=accelerate python3 setup.py build Step 4: pip3 install . or python3 setup.py install ? (I am not sure which method to apply) 2、how is the compatibility of such method? I need speed up numpy, pandas and even a open souce project, such as https://github.com/microsoft/qlib 3、just show me the code 4、when compiling C++, C source, a lot of errors were reported, which gcc and g++ to choose? the default gcc installed by brew is 4.2.1, which cannot work. and I even tried to download gcc from the offical website of ARM, still cannot work. give me a hint. thx so much urgent
Posted
by jefftang.
Last updated
.
Post not yet marked as solved
0 Replies
239 Views
Compatibilty of m1max have troubled me hundreds of hours, please help, I am doing some urgent projects. 1、which gcc to install? show me the code when I do it, some error happens, gcc(version 4.2.1 installed by brew) cannot compile some source, such as "ecos". Moreover, I cannot compile many sources directly by python3 setup.py install (without accelerate) How to config the gcc? which version to use on m1max 2、sometimes I can compile source by brew. but extremely unconvenient, because I need to install packages on vitual environment (e.g. conda env)other than on base path. what should I do? can I install brew on vitual environment? or just use brew to build the source, then I install by pip on vitual env? or can I config the brew to install on only vitual environment? Just show me the code 3、to compile, do I also need to install g++? witch version show me the code
Posted
by jefftang.
Last updated
.
Post not yet marked as solved
3 Replies
1.7k Views
I have an SDK that is a static xcframework built against 3 pods (which are configured as static frameworks as well). When I include the SDK bundle in a client project (which also includes the 3 pods as static frameworks) it gives me linkage errors (Undefined Symbol) for every reference in the SDK to these dependencies. The rest of the project (which also relies on them) compiles (and I presume, links) fine. Why can't the SDK xcframework link to them? I'm pretty sure no archs are getting excluded. The XCFramework includes both arm64 for device (iOS) and x8664arm64 for simulator Note, when I convert everything to dynamic frameworks, it works fine.
Posted
by harikaram.
Last updated
.
Post marked as solved
1 Replies
202 Views
Why is XCode reporting issues (or errors) twice sometime? Using XCode Version 13.1 (13A1030d). For example (dummy example), XCode starts by showing just 1 error: and then, seconds later it shows this: I tried unsetting/setting "Build Active Architecture Only" (ONLY_ACTIVE_ARCH). But it did have an effect. Moreover the problem is erratic - sometimes the error is reported once only; and then on a second build it shows errors twice.
Posted
by recursive.
Last updated
.
Post not yet marked as solved
1 Replies
238 Views
Hi, does someone knows how to build, download or install swift-dependency-tool for MacOS with M1 ? It seems it is required to decode swiftdeps files. The source code is here https://github.com/apple/swift/tree/main/tools/swift-dependency-tool, but I don't know how to build it, or if it is included in some package.
Posted
by ans73.
Last updated
.
Post marked as solved
1 Replies
216 Views
Is it possible to set LC_CTYPE in a System Extension? I am running into issues with vswprintf due to what I presume are locale-related issues. The errno that vswprintf sets is EILSEQ. In a brand new program (not system extension), vswprintf fails with EILSEQ if LC_CTYPE is not set, but it does work when LC_CTYPE is set with something like setlocale(LC_CTYPE, "UTF-8"). The difference is that in a system extension, the setlocale() seems to make no difference. Is there another way to set LC_CTYPE for a system extension? Is it not possible to use vswprintf within a system extension?
Posted
by keehun.
Last updated
.
Post not yet marked as solved
1 Replies
654 Views
Greetings, All. I wish to build gcc-9.2.0 on my M1 Mini. Note that I am not really interested in gcc, as Apple's clang compiler is fantastic, but actually in gm2, which is written as a front end to gcc. Now, I understand that the gcc folk do not support M1, so I tried to build a cross-compiler to run under Rosetta-2, namely set both host and build to x86_64-darwin. The build trundles along (well, it flies -- this h/w is fast!) until it reaches "fixing" the header files. The path /usr/include is hard-coded throughout the build tools and it comes to a screeching halt. So how to fool the gcc build tools? The system will not let me create a symlink in /usr. I tried prepending an appropriate path from xcrun to the hard-code path but there are a *lot* of them. This is not a priority so I can just await M1 support. Thank you. jog
Posted
by N59.
Last updated
.
Post marked as solved
2 Replies
409 Views
I am developing in C++ and Objective C using Xcode 13.1, running on a 2019 Mac Pro with Big Sur 11.6.1. I am working on an app to run on (only) Macintoshes with Intel silicon. (Apple silicon will involve a port, later.) In Xcode, my compiler is set to Apple CLang, with defaults across the board. I need to embed some Intel assembly-language code in some of the C++ code for my application. I can't find any manuals or examples for how to do that. I have written Intel assembler before, but not for a long time, and never embedded in a MacOS app. Can someone recommend any books or links to documentation or examples? Apple's own documentation seems in great part no longer maintained.
Posted
by Knightley.
Last updated
.