Command Line Tools

RSS for tag

Command line tools allow for easy installation of open source software or development on UNIX within Terminal.

Command Line Tools Documentation

Posts under Command Line Tools tag

117 Posts
Sort by:
Post not yet marked as solved
0 Replies
514 Views
Hi, I'm having problems with extremely build and compilation of software in the command line and I'm not sure why. I'm currently using macOS Sonoma 14.3 on my 2020 MacBook Air 1.1 GHz Quad-Core Intel Core i5. I also have the latest version of Xcode installed. Although I've been experiencing extreme delays in the command line for a while, the problem really became noticeable after I updated my OS to Sonoma. It meant that all the software I had installed via command line that I regularly use became outdated and now I cannot build it again. I've spoken in depth with the authors of the software and they have tried on a system identical to mine and have a build time of 30 minutes, but my machine takes over 3 hours on the same software. I've uninstalled and reinstalled command line tools several times but nothing seems to work. Also when I build I use the command make -j7 to use 7/8 cores so the problem isn't that I'm making full use of my CPU either. I've spoken to Apple support who recommended I try in Safe Mode and using a different user to rule out background software that opens on start up and decreases performance, as well as to rule out the setup on my main user. I'm just not sure what to do anymore as I've been trying for days and to no avail. Does anyone have any suggestions? P.S. It may be irrelevant, but since Sonoma I've also been experiencing a lot of issues with clang and also SDK pathways.
Posted
by alexgav02.
Last updated
.
Post not yet marked as solved
0 Replies
417 Views
I'm working with cupsfilter command to convert files from PDF to PS. We had been previously working with cupsfilter on Linux, but we had to migrate to macOS and some of the command line arguments are not compatible. In particular, we can't control autorotation and scaling on macOS. They seem to be "on" by default, but there are some cases where we need to turn them "off" so page doesn't rotate or scale to fit automatically. On Linux, those options are controlled with -o nopdfAutorotate and -o nofit-to-page. Any ideas how to control rotation and scaling on macOS? Thank you very much in advance.
Posted
by maganap.
Last updated
.
Post not yet marked as solved
0 Replies
585 Views
MacOS14.0 Xcode15.1(已登录开发者账号) Build with Jenkins(fastlane) 1.刚登录开发者账号几个小时内,功能正常;而后使用Jenkins构建时会出现"Your session has expired. Please log in." 2.如果我在出现错误后,手动打开以下Xcode,而后再进行Jenkins构建,则不会出现错误;(但如果之后关闭Xcode,过一段时间错误还会复现) + xcodebuild -exportArchive -exportOptionsPlist /var/folders/8x/c3qf2sz95jd40fk49d5dbg400000gn/T/gym_config20240119-38953-jl7k5y.plist -archivePath '/Users/smg_ios/Library/Developer/Xcode/Archives/2024-01-19/WinTaxProject 2024-01-19 13.45.59.xcarchive' -exportPath /var/folders/8x/c3qf2sz95jd40fk49d5dbg400000gn/T/gym_output20240119-38953-3u2rch -allowProvisioningUpdates 2024-01-19 13:47:15.691 xcodebuild[44905:206740] DVTPortal: Service '<DVTPortalViewDeveloperService: 0x6000024d3400; action='viewDeveloper'>' encountered an unexpected result code from the portal ('1100') 2024-01-19 13:47:15.691 xcodebuild[44905:206740] DVTPortal: Error: Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={ creationTimestamp = "2024-01-19T05:47:15Z"; httpCode = 200; protocolVersion = QH65B2; requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action"; responseId = "29bf9da6-b667-4025-bd1f-09de9f5c76f1"; resultCode = 1100; resultString = "Your session has expired. Please log in."; userLocale = "en_US"; userString = "Your session has expired. Please log in."; }, NSLocalizedDescription=Your session has expired. Please log in.} log
Posted Last updated
.
Post marked as solved
4 Replies
531 Views
If there's another version of our app on the volume, it'll relocate the installed one there. This is particularly delightful, since nothing will work if it's not in /Applications. We use pkgbuild and productbuild to create the .pkg file.
Posted
by kithrup.
Last updated
.
Post not yet marked as solved
4 Replies
683 Views
I'm dealing with a problem uploading our release binaries that is completely perplexing. If I use the ITMS Transporter desktop app to upload my IPA, everything works fine. If I use the ITMS Transporter command line interface (which i'm calling from inside the desktop app's directory /Applications/Transporter.app/Contents/itms/bin/iTMSTransporter -m upload...) to upload my IPA, I get the following error ERROR ITMS-90529: Invalid package. Applications built with sdk 9.0 or later must be packaged as proper IPA files. No idea why this error is coming up. I can also use altool to upload my binaries successfully. The issue is altool is being deprecated and I need to be able to use the ITMS command line interface as part of some deployment scripts we have. Please help!
Posted Last updated
.
Post not yet marked as solved
1 Replies
488 Views
I'm having some problems accessing contacts inside of mac cli app. The main issue is that the app is not triggering a dialog requesting access to contacts. Some sources state that NSContactsUsageDescription should be added to info.plist. This info.plist is nowhere to be found inside the project in xcode. Then, some sources are stating that there was a xcode update, and now permissions are added on Targets -&gt; Info tab, but this tab does not exist on mac cli project. Here is a code snippet: #import &lt;Contacts/Contacts.h&gt; int main(int argc, const char * argv[]) { @autoreleasepool { CNAuthorizationStatus status = [CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts]; if (status == CNAuthorizationStatusNotDetermined) { NSLog(@"Contact access not determined."); CNContactStore *contactStore = [[CNContactStore alloc] init]; [contactStore requestAccessForEntityType:CNEntityTypeContacts completionHandler:^(BOOL granted, NSError * _Nullable error) { NSLog(@"Got response"); }]; } else if (status == CNAuthorizationStatusAuthorized) { NSLog(@"Access granted"); } else { NSLog(@"Access to contacts is denied or restricted."); } } return 0; } Running this outputs: Contact access not determined. and app exits with code 0. How would one access contacts inside of mac cli app project? Or setup proper permissions so that dialog would trigger? PS. I have also tried adding info.plist manually, but there was no difference. Maybe I did something wrong? Is info.plist even used in mac cli project?
Posted
by branisha.
Last updated
.
Post not yet marked as solved
2 Replies
387 Views
I'm an old C programmer just starting to learn Swift and the X-code environment. In Apple's "Develop in Swift Fundamentals", on page 19 I found the first exercise to print "Hello World" in the Terminal using Swift REPL. Weirdly, after following the instructions, I get the following "Badly placed ()'s" error (I'm omitting the Swift Subcommands menu)- Last login: Tue Dec 26 12:55:07 on ttys000 [MacBook-Pro:~] xxxxx% swift Welcome to Swift! [MacBook-Pro:] xxxxx% print("Hello, World!") Badly placed ()'s. [MacBook-Pro:] xxxxx% This is a pretty discouraging result! Obviously, I'm missing something (and please, no jokes about requisite neurons).
Posted Last updated
.
Post not yet marked as solved
1 Replies
447 Views
I am reasonably new to Mac development, so I know just enough to be dangerous. I want to build a script that will run on command using rsync script to backup my photography folders to my NAS. I can drag the folder names to the terminal and all works fine. When I copy and paste into terminal to test it fails Here is the command line and subsequent error. ichflynn@Richs-MacBook-Pro ~ % rsync -arv --delete /Volumes/Samsung_T5/LRPhotos-T5/ /Volumes/QNAP-USB-2/LRPhotos-T5/ sending incremental file list rsync: [Receiver] mkdir "/Volumes/QNAP-USB-2/LRPhotos-T5" failed: No such file or directory (2) rsync error: error in file IO (code 11) at main.c(793) [Receiver=3.2.7] rsync: [sender] write error: Broken pipe (32) rsync error: error in file IO (code 11) at io.c(848) [sender=3.2.7] richflynn@Richs-MacBook-Pro ~ % Suggestions?
Posted
by talldiver.
Last updated
.
Post not yet marked as solved
3 Replies
641 Views
I am building simple command-line programs in C. When I run LLDB on the command line on any such executable , even though I set a breakpoint in main, LLDB always runs to termination and reports an error. Below is an example: ~ % clang -Wall -g prog.c -o prog aviram@csaamdS278stma ~ % lldb prog (lldb) target create "prog" Current executable set to '/Users/aviram/prog' (x86_64). (lldb) breakpoint set --name main Breakpoint 1: where = progmain + 15 at prog.c:73:21, address = 0x0000000100003ebf (lldb) run Process 99926 launched: '/Users/aviram/prog' (x86_64) Process 99926 exited with status = -1 (0xffffffff) lost connection (lldb) ` Note that it says "lost connection" even though I am _ remote debugging. This happens with every executable I build._ Details: 2019 MacBook Pro (x86_64, Sonoma); Apple Clang 12.0.0 (downloaded with Xcode 15.0.1). Why is this happening and what can I do to debug my program (for real) using LLDB from the command line? Thanks.
Posted Last updated
.
Post not yet marked as solved
0 Replies
364 Views
Hello. We are currently creating our dmg with hdiutil and I was wondering if it would be possible to have localized resources in it. Right now, we have a single background image for every locale. Would it be possible to have different background image based on user locale, also with default background image as a backup in case we don't have users locale? The use case for this is the Quebec's Bill 96 Law 14, stating that products sold in Quebec have to be localised in Canadian french. Thank you.
Posted
by capso.
Last updated
.
Post not yet marked as solved
1 Replies
446 Views
How can I update my c++(20) to c++23?
Posted
by kaaaveh.
Last updated
.
Post not yet marked as solved
3 Replies
492 Views
Hello, I have recently started coding in c++, using xcode's command line tool (university project). Ever since I started using this Apple made app on my 2022 macbook air M2, I am battling a major issue. Every time I try to either build my project for the second time or to clear the console, after I have made some input through the console, the Xcode crashes. I've been looking for the solution for weeks now, even reinstalled the whole xcode app, but nothing helped. I will be very much grateful for any suggestions... thanks. Here is one of my codes, where the issue appears: // Hlavickove soubory #include &lt;stdlib.h&gt; // Standardni knihovna #include &lt;stdio.h&gt; // Standardni input, output #include &lt;math.h&gt; // Matematicka knihovna #define N_MAX 100 // Samotny program int main() // Zahlavi hlavni funkce { int n, max, i, souradnice_je_0; // Definice promennych a jejich nastaveni do vychozich hodnot float a[N_MAX], ap, gp, hp; souradnice_je_0 = 1; max = 100; ap = 0; gp = 1; hp = 0; Znovu: printf("\n Zadej dimenzi vektoru n: "); scanf("%i", &amp;n); // Zadani poctu dimenzi if(n&gt;N_MAX) // Osetreni maxima dimenzi { printf("\n Chyba v datech: Zadaná dimenze n musí být menší než %i", max); goto Znovu; } else if(n&lt;=0) // Osetreni kladnosti dimenzi { printf("\n Chyba v datech: Zadaná dimenze n musí být větší než 0"); goto Znovu; } else { if(n == 1) // Kontrola gramatiky:Dd { printf("\n Vektor má %i dimenzi", n); } else if(n&gt;1 and n&lt;5) { printf("\n Vektor má %i dimenze", n); } else { printf("\n Vektor má %i dimenzí", n); } } for(i = 0; i &lt; n; i++) // Zadani souradnic vektoru { printf("\n Zadej hodnotu x[%i] souřadnici vektoru: ", i); scanf("%f", &amp;a[i]); printf("x[%i] = %g",i, a[i]); if(a[i] == 0) // Kontrola zda a[i] je 0 kvuli h.p. { ap = ap + a[i]; // Arit. prumer 1. cast gp = gp * a[i]; // Geom. prumer 1. cast souradnice_je_0 = 0; // Switch kvuli deleni nulou } else { ap = ap + a[i]; // Arit. prumer 1. cast gp = gp * a[i]; // Geom. prumer 1. cast hp = hp + (1 / a[i]); // Harm. prumer 1. cast } } if(hp==0) { souradnice_je_0 = 0; // Switch kvuli deleni nulou } ap = ap /n; // Arit. prumer 2. cast printf("\n Aritmeticky prumer je: %g", ap); if(gp&gt;=0) // Nelze odmocnit zaporne cislo { gp = pow(gp, 1./n); // Geom. prumer 2. cast } if(gp&gt;=0) { printf("\n Geometricky prumer je: %g", gp); } else { printf("\n Geometricky prumer neni pro zadany vektor definovan"); } if(souradnice_je_0 == 0) { printf("\n Harmonicky prumer neni pro zadany vektor definovan \n"); } else { hp = n / hp; // Harm. prumer 2. cast printf("\n Harmonicky prumer je: %g \n", hp); } return 0; }
Posted
by Fexe.
Last updated
.
Post not yet marked as solved
5 Replies
455 Views
I'm trying to use tapi to generate a .tbd for a multi-arch dynamic library. The dynamic library has LC_UUIDs for both architectures, but the generated .tbd does not have a uuids section. I have tried generating .tbd versions 2, 3, and 4. (Which version should I use if I want to support older macOS releases?) I'm using the command tools from Xcode 15.0.1 on macOS 14.1 on arm64.
Posted
by cbfiddle.
Last updated
.
Post not yet marked as solved
1 Replies
513 Views
I used the command: utils/build-script --swift-darwin-supported-archs "$(uname -m)" --xcode --clean and encountered the following error: CMake Error at cmake/modules/SwiftUtils.cmake:24 (message): Error! Variable THIN_INPUT_TARGETS is false, empty or not set. Call Stack (most recent call first): stdlib/cmake/modules/AddSwiftStdlib.cmake:3068 (precondition) stdlib/public/libexec/swift-backtrace/CMakeLists.txt:39 (add_swift_target_executable) Please let me know the solution to this error. Thank you. Have a great day as well. 👍
Posted
by devKobe24.
Last updated
.
Post marked as solved
4 Replies
645 Views
I'm using Flutter for creating app and I need to run a file with arguments from dart code (This file is in the app's container) on MacOS. How can I do it in a sandbox? I don't want to disable sandbox because then i can't publish app in App Store. I tried this code ProcessResult result = await Process.run(path, [-pa], includeParentEnvironment: true); but I'm getting error: ProcessException: Operation not permitted. Also, I saw thing called "Embedding a command-line tool in a sandboxed app", but I don't know how to do it in my case.
Posted
by execOQ.
Last updated
.
Post not yet marked as solved
1 Replies
789 Views
I'm using MacOS Sonoma. My header files (located in /usr/local/include), which are symlinks to the SDKs found in /Library/Developer/CommandLineTools/SDKs/ emit a ton of '_Nullable'-errors like these: /usr/local/include/stdio.h:386:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness] FILE *funopen(const void *, ^ /usr/local/include/stdio.h:386:6: note: insert '_Nullable' if the pointer may be null FILE *funopen(const void *, ^ _Nullable /usr/local/include/stdio.h:386:6: note: insert '_Nonnull' if the pointer should never be null FILE *funopen(const void *, ^ _Nonnull on both MacOSX14.0.sdk and MacOSX13.3.sdk. I found this problem here in the LLVM-issues too https://github.com/llvm/llvm-project/issues/54988 and it is fixed if i remove the central MacOSX.sdk symlink because then clang looks in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h for the headers and they don't contain these warnings. But I don't know how safe it is to just remove the MacOSX.sdk symlink because I would imagine that many other programs might depend on it. How can I either fix these header files or tell clang to look elsewhere without removing my MacOSX.sdk file which might mess up other things?
Posted
by SomeFruit.
Last updated
.
Post not yet marked as solved
1 Replies
902 Views
Hello, When I use leaks -atExit -- I always get these two messages: MallocStackLogging: could not tag MSL-related memory as no_footprint, so those pages will be included in process footprint - (null) MallocStackLogging: recording malloc and VM allocation stacks using lite mode Does osmebody know how I can fix this problem? Thank you
Posted
by matrixa.
Last updated
.
Post marked as solved
5 Replies
1.7k Views
Hey everyone, I have an Python script that uses PyQt5. Unfortunately there is no wheel for pyqt5 to install it with pip so you have to build from source, if you are on arm64. This is how I successfully did it till today: It requires qmake, which I installed via brew (brew install qt5). After adding this to my path I can execute it (which qmake shows the correct path). Then I install pyqt5 via pip with this command: pip install pyqt5 --config-settings --confirm-license= --verbose (pyqt5 asks for license agreement, but pip install is not interactive, hence the long command). As I said, till last week I could do this successfully. When I tried this today I got the error: The dbus-python package does not seem to be installed. These bindings will be built: Qt, pylupdate, pyrcc. Generating the Qt bindings... Generating the pylupdate bindings... _in_process.py: /private/var/folders/ws/vdb_nvyj35g9ck_srpvqpccm0000gn/T/pip-install-jr3725ba/pyqt5_7d0f0bcc5a7241bd8afa726e0fa5e8d1/sip/QtCore/qprocess.sip: line 99: column 5: 'Q_PID' is undefined error: subprocess-exited-with-error It seems thta something with sip-related changed. The only thing that has changed on my system was an update from Xcode14 to Xcode15. I don't really see why this should affect pyqt5 or sip, but it's the only thing I can think of. I also tried to install sip via brew additionally, but this did not change anything. Any ideas?
Posted
by gernophil.
Last updated
.