I am creating an iOS app and use Carthage to build external libraries. Since the libraries I use are currently both Swift 2 and Swift 3 I am in a bit of a squeeze. Thus I want to have one Swift 2 branch and one Swift 3 branch for development and then merge them when the libraries are all Swift 3 compatible.
However, I am not able to select which toolchain for build for with Carthage (version 0.18).
Here is the contents of my Cartfile:
# Swift 2 libraries
github "stephencelis/SQLite.swift" ~> 0.10.1
github "Haneke/HanekeSwift"
# Swift 3 libraries
#github "stephencelis/SQLite.swift" "swift3"
#github "Haneke/HanekeSwift" "feature/swift-3"
#github "kitasuke/PagingMenuController"
#github "Alamofire/Alamofire" ~> 4.0
This currently builds by using carthage update. Here are some output verifying that I am currently using Swift 2:
$ swift --version
Apple Swift version 2.2 (swiftlang-703.0.18.8 clang-703.0.31)
Target: x86_64-apple-macosx10.9
$ ls -lh $(which swift)
-rwxr-xr-x 1 root wheel 18K Jul 8 19:52 /usr/bin/swift
Now I want to switch to build with Swift 3. I have multiple toolchains installed in /Library/Developer/Toolchains, which is where OSX installs them when I run the installer:
$ ls -lh /Library/Developer/Toolchains
drwxr-xr-x 6 root wheel 204B Sep 30 20:07 swift-2.2.1-SNAPSHOT-2016-04-23-a.xctoolchain
drwxr-xr-x 7 root wheel 238B Sep 30 17:41 swift-3.0-RELEASE.xctoolchain
drwxr-xr-x 7 root wheel 238B Oct 6 20:53 swift-3.0.1-PREVIEW-2.xctoolchain
lrwxr-xr-x 1 root wheel 30B Oct 8 12:51 swift-latest.xctoolchain -> swift-3.0-RELEASE.xctoolchain/
Note that I have both Xcode8 and Xcode7 installed:
$ ls /Applications/Xcode*
/Applications/Xcode.app:
Contents
/Applications/Xcode8.app:
Contents
$ xcodebuild -version
Xcode 7.3.1
Build version 7D1014
Now, lets say I have the following scenario:
$ cat Cartfile
github "Alamofire/Alamofire" ~> 4.0
$ carthage update --toolchain com.apple.dt.toolchain.Swift_3_0
*** Fetching Alamofire
*** Checking out Alamofire at "4.0.1"
*** xcodebuild output can be found in /var/folders/wg/fjk346qs7mx8fhplf8_805wm0000gn/T/carthage-xcodebuild.zfHVn5.log
*** Building scheme "Alamofire iOS" in Alamofire.xcworkspace
warning: failed to load toolchain 'com.apple.dt.toolchain.Swift_3_0': Could not find toolchain: com.apple.dt.toolchain.Swift_3_0
I just cannot get this to work. So my question is:
How can I build with Carthage by using another toolchain?
Here's what I have tried:
Changing the symbolic link of swift-latest.xctoolchain to other things. Does no difference.
Manually adding the toolchains to my PATH variable in .bashrc like this, but it makes no difference.
$ cat ~/.bashrc
export PATH="$PATH:/Library/Developer/Toolchains/swift-2.2.1-SNAPSHOT-2016-04-23-a.xctoolchain/usr/bin/"
export PATH="$PATH:/Library/Developer/Toolchains/swift-3.0-RELEASE.xctoolchain/usr/bin/"
export PATH="$PATH:/Library/Developer/Toolchains/swift-3.0.1-PREVIEW-2.xctoolchain/usr/bin/"
Running the build with TOOLCHAINS=com.apple.dt.toolchain.Swift_3_0 carthage build and similar, but it makes no difference (still cannot find the toolchain).
As of Carthage 0.17 there is an option --toolchain that allows one to specify an exact toolchain ID to use for the build. Example usage:
carthage update --toolchain org.swift.402017072a
The ID of the toolchain comes from the key CFBundleIdentifier in Info.plist file of the toolchain.
I solved this by using the command sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/ or similar, thereby setting the toolchain to the proper one. This will then be the default one used by Carthage. I could not figure out how to select another toolchain when running Carthage.
You can use
export TOOLCHAINS="org.swift.51220191107a"
export TOOLCHAIN_DIR=/Library/Developer/Toolchains/swift-5.1.2-RELEASE.xctoolchain
carthage update
Download Swift toolchain
https://swift.org/download/#releases
Just
export TOOLCHAINS="swift"
do the trick.
Related
I'm developing in Ubuntu 22.04 Desktop environment. To produce a packaged app for Windows do I need to use a MS Windows environment or can I do it within Ubuntu 22.04 Desktop environment? I ask this, because I do not see any "windows"-related output:
/out/make$ ls -lah
total 20K
drwxrwxr-x 5 raphy raphy 4,0K gen 5 12:42 .
drwxrwxr-x 4 raphy raphy 4,0K gen 5 12:41 ..
drwxrwxr-x 3 raphy raphy 4,0K gen 5 12:41 deb
drwxrwxr-x 3 raphy raphy 4,0K gen 5 12:42 rpm
drwxrwxr-x 3 raphy raphy 4,0K gen 5 12:42 zip
even if I've set in package.json maker-squirrel :
"makers": [
{
"name": "#electron-forge/maker-squirrel",
Do I have to install the wine terminal in my Ubuntu 22.04 Desktop environment, in order to correctly product the Windows packaged app? Or what else do I have to do?
Executing : yarn make --platform=win32 I get the following message:
raphy#raohy:~/ForgeTypescriptReactWebpack$ yarn make --platform=win32
yarn run v1.22.19
$ electron-forge make --platform=win32
✔ Checking your system
✔ Loading configuration
✔ Resolving make targets
› Making for the following targets: squirrel, zip
❯ Running package command
✔ Preparing to package application
✔ Running packaging hooks
✔ Running generateAssets hook
✔ Running prePackage hook
✔ [plugin-webpack] Preparing native dependencies: 1 / 1
✔ [plugin-webpack] Building webpack bundles
❯ Packaging application
❯ Packaging for x64 on win32
✔ Copying files
✔ Preparing native dependencies [0.1s]
✖ Finalizing package
› Wrapper command 'wine64' not found on the system. Consult your Linux distribution's package manager to deter…
Wine is required to use the appCopyright, appVersion, buildVersion, icon, and
win32metadata parameters for Windows targets.
See https://github.com/electron/electron-packager#building-windows-apps-from-non-windows-platforms for detai…
◼ Running postPackage hook
◼ Running preMake hook
◼ Making distributables
◼ Running postMake hook
An unhandled rejection has occurred inside Forge:
Error: Wrapper command 'wine64' not found on the system. Consult your Linux distribution's package manager to determine how to install Wine.
Wine is required to use the appCopyright, appVersion, buildVersion, icon, and
win32metadata parameters for Windows targets.
See https://github.com/electron/electron-packager#building-windows-apps-from-non-windows-platforms for details.
at spawnWrapper (/home/raphy/ForgeTypescriptReactWebpack/node_modules/cross-spawn-windows-exe/dist/src/wrapper.js:77:19)
at async module.exports (/home/raphy/ForgeTypescriptReactWebpack/node_modules/rcedit/lib/rcedit.js:42:3)
at async WindowsApp.runRcedit (/home/raphy/ForgeTypescriptReactWebpack/node_modules/electron-packager/src/win32.js:95:7)
at async WindowsApp.create (/home/raphy/ForgeTypescriptReactWebpack/node_modules/electron-packager/src/win32.js:105:5)
at async Promise.all (index 0)
at async packager (/home/raphy/ForgeTypescriptReactWebpack/node_modules/electron-packager/src/index.js:204:20)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
So, definitely Wine has to be installed
After installing wine and executing the yarn make --platform=win32 again, I get some strange errors, for which I open another post
I have a react native app that when Run from XCode it works as expected (builds and runs on a simulator). But when I try run it from my terminal with
npx react-native run-ios
I get the error:
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening foo.xcworkspace.
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace foo.xcworkspace -configuration Debug -scheme foo -destination id=FEB37
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
xcodebuild: error: The workspace named "foo" does not contain a scheme named "foo". The "-list" option can be used to find the names of the schemes in the workspace.
It might have something to do with my schemes here
When I manage my schemes in XCode I do NOT see scheme 'foo'. It is a generic app so it uses scheme 'bar' which is in the XCode manage gui.
I've also tried
npx react-native run-ios --configuration Debug --scheme Development
and get a very large logout with it ending in:
** BUILD FAILED **
The following build commands failed:
MergeSwiftModule normal x86_64
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
If I downgrade XCode from 12.5 to 12.0.1 it works as expected. But I would like to use the latest XCode.
If I run react-native info
info Fetching system and libraries information...
(node:11609) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
System:
OS: macOS 11.4
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU # 2.30GHz
Memory: 905.50 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.16.0 - ~/.nvm/versions/node/v14.16.0/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.11 - ~/.nvm/versions/node/v14.16.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK:
API Levels: 28, 29, 30
Build Tools: 29.0.2, 30.0.3, 31.0.0
System Images: android-28 | Google Play Intel x86 Atom, android-29 | Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.2 AI-202.7660.26.42.7351085
Xcode: 12.5/12E262 - /usr/bin/xcodebuild
Languages:
Java: 15.0.2 - /usr/bin/javac
npmPackages:
#react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.64.0 => 0.64.0
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
I've tried restarting my mac...
Do I have to wait for dependencies to be updated?
Here is the Podfile
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'
target 'vicinity' do
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
)
end
post_install do |installer|
react_native_post_install(installer)
end
I have also tried to clean and rerun the start script.
Any help in getting this to build in terminal would be great.
Here is the last bit of the build failure logs:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -merge-modules -emit-module /Users/grant/Library/Developer/Xcode/Derivtes.noindex/Pods.build/Debug-iphonesimulator/lottie-react-native.build/Objects-normal/x86_64/lottie_react_native.swiftmodule
<unknown>:0: error: fatal error encountered while reading from module 'lottie_react_native'; please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project
<unknown>:0: note: module 'lottie_react_native' full misc version is '5.4(5.4)/Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)'
*** DESERIALIZATION FAILURE (please include this section in any bug report) ***
could not deserialize type for 'ContainerView': top-level value not found
Cross-reference to module 'lottie_react_native'
... RCTView
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/Devel...ld/Debug-iphonesimulator/lottie-react-native.build/Objects-normal/x86_64/lottie_react_native.swiftmodule
1. Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
2. While evaluating request ASTLoweringRequest(Lowering AST to SIL for module lottie_react_native)
0 swift-frontend 0x000000010c7e5e85 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1 swift-frontend 0x000000010c7e4e78 llvm::sys::RunSignalHandlers() + 248
2 swift-frontend 0x000000010c7e6446 SignalHandler(int) + 262
3 libsystem_platform.dylib 0x00007fff2066ed7d _sigtramp + 29
4 libdyld.dylib 0x00007fff20643d08 _dyld_fast_stub_entry(void*, long) + 65
5 libsystem_c.dylib 0x00007fff2057e411 abort + 120
6 swift-frontend 0x0000000108554384 swift::ModuleFileSharedCore::fatal(llvm::Error) + 100
7 swift-frontend 0x00000001084d9b48 swift::ModuleFile::fatal(llvm::Error) + 2600
8 swift-frontend 0x000000010853d824 swift::SILDeserializer::readVTable(llvm::PointerEmbeddedInt<unsigned int, 31>) + 2532
9 swift-frontend 0x00000001085c21cb swift::SILDeserializer::getAll(bool) + 107
10 swift-frontend 0x0000000107ea2393 swift::ASTLoweringRequest::evaluate(swift::Evaluator&, swift::ASTLoweringDescriptor) const + 10899
11 swift-frontend 0x0000000107fae50d swift::SimpleRequest<swift::ASTLoweringRequest, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> > (swift::ASTLoweringDescriptor), (swift::RequestFlags)9>::evaluateRequest(swift::ASTLoweringRequest const&, swift::Evaluator&) + 205
12 swift-frontend 0x0000000107ea64ac llvm::Expected<swift::ASTLoweringRequest::OutputType> swift::Evaluator::getResultUncached<swift::ASTLoweringRequest>(swift::ASTLoweringRequest const&) + 780
13 swift-frontend 0x0000000107ea2d3f swift::performASTLowering(swift::ModuleDecl*, swift::Lowering::TypeConverter&, swift::SILOptions const&) + 143
14 swift-frontend 0x0000000107a0602e swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7150
15 swift-frontend 0x0000000107987e82 main + 1266
16 libdyld.dylib 0x00007fff20644f5d start + 1
17 libdyld.dylib 0x0000000000000087 start + 18446603339972718891
=== BUILD TARGET react-native-splash-screen OF PROJECT Pods WITH CONFIGURATION Debug ===
Check dependencies
CompileC /Users/grant/Library/Developer/Xcode/Derive...t-native-splash-screen/react-native-splash-screen-dummy.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/grant/repos/foo/foo-centres-app/packages/app/ios/Pods
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/De...dk/tools:/Users/grant/Library/Android/sdk/tools/bin:/Users/grant/Library/Android/sdk/platform-tools"
/Applications/Xcode.app/Contents/Developer/Toolc...ld/Debug-iphonesimulator/react-native-splash-screen.build/Objects-normal/x86_64/react-native-splash-screen-dummy.o
CompileC /Users/grant/Library/Developer/Xcode/Derived...app/node_modules/react-native-splash-screen/ios/RNSplashScreen.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/grant/repos/foo/foo-centres-app/packages/app/ios/Pods
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/D...y/Android/sdk/tools/bin:/Users/grant/Library/Android/sdk/platform-tools"
/Applications/Xcode.app/Contents/Developer/...uild/Debug-iphonesimulator/react-native-splash-screen.build/Objects-normal/x86_64/RNSplashScreen.o
** BUILD FAILED **
The following build commands failed:
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
MergeSwiftModule normal x86_64 /Users/grant/Library/Developer/Xcode/DerivedData/foo-...or/lottie-react-native.build/Objects-normal/x86_64/lottie_react_native.swiftmodule
(2 failures)
info Run CLI with --verbose flag for more details.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! #foo/foo-centres-app-app#3.0.3 start: `scripts/start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the #foo/foo-centres-app-app#3.0.3 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
➜ ~/repos/foo/foo-centres-app/packages/app git:(update-release-app-v2) ✗
The output of xcodebuild -list
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -list
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
Information about project "foo":
Targets:
foo
Build Configurations:
Debug
Release
Emp
Chad
Test
PreProduction
Master
If no build configuration is specified and -scheme is not passed then "Release" is used.
Schemes:
Chad
Development
Emp
Master
PreProduction
Release
Test
I suspect something else..
please check beyond the schema such as accessibility/permission. Since there are more than one reasons this can happen, I recommend verifying all below.
// a very helpful debug
xcodebuild -list
Basic Debug xcodebuild -list; once they are configured correctly, shared they will successfully should up as shared for you.
Default configuration of Schemes is private you have to configure/make it shared
In the terminal/command-line build, the Xcode UI never runs and the xcoderun tool doesn't have its own cache of Schemes to work with.
Step 1: Make your schema accessible to the command-line build
Make your schema accessible to the command-line build by changing it to a shared scheme.
Menu > Product > Scheme > Manage Schemes
Verify/Check off the 'Shared' box for that scheme
Select Schema you want to create and click on the Edit button
Uncheck and Checkoff just to be sure the "Shared" checkbox.
Now go to WorkspaceName.xcworkspace/xcshareddata/xcschemes
Now verify a new .xcscheme file has been created in your project at
WorkspaceName.xcworkspace/xcshareddata/xcschemes.
Please remember to commit this file to your repository, so that your CI builds will also work
Verify again, since the folder names are case sensitive
From your build or release configuration path
Step 2: Do you have cocoapods - yes/no
NO, If your project is NOT using cocoapods , then you should delete the .xcworkspace file from ./ios directory.
yes, or if you are using a workspace (e.g. with pods), debug/verify like so, here..
// a very helpful debug
xcodebuild -workspace MyProject.xcworkspace -list
Another question on SO, with different approach
Step 3:
If you previously created the folder from step 1, or for some reason renamed/edited project, then go in an update the names manually
Open Foo as a directory in finder.
Open the folder xcshareddata/xcschemes
Rename the xcscheme files there
Can you make sure you're using the right version of Xcode, by running xed --version. There might be a mismatch with the Xcode version that React Native is using (not that this should cause a problem by itself)? You can change it with xcode-select.
Can you try upgrade lottie-react-native to 4.0.2, using npm i lottie-react-native#4.0.2, you're using 3.5.0.
Can you try upgrade lottie-ios to 3.2.3, using npm i lottie-ios#3.2.3
Then make sure you run cd ios and pod install
If you get linker warnings, follow this
If you get desperate, you can delete the ios folder and regenerate it by running by creating a new project with the same name, and copying the iOS folder into your existing project. Or you can just compare the 2 projects/ schemes, and see what you're missing.
Good luck 🙂
Looking at this output from xcodebuild -list
Information about project "foo":
Targets:
foo
Build Configurations:
Debug
Release
Emp
Chad
Test
PreProduction
Master
If no build configuration is specified and -scheme is not passed then "Release" is used.
Schemes:
Chad
Development
Emp
Master
PreProduction
Release
Test
And this error from npx react-native run-ios -
xcodebuild: error:
The workspace named "foo" does not contain a scheme named "foo".
The "-list" option can be used to find the names of the schemes in the workspace.
The error says that - the target foo (listed under Targets: in the output) should have a corresponding scheme called foo (that should have been listed under Schemes: in the output) which it can't find while using npx react-native run-ios.
As you say, you are able to run this from Xcode successfully, you should note which scheme are you running. You can find it on the top left corner - right next to play / stop buttons. Adventure iOS in the below screenshot is the scheme.
Note down it's name (case sensitive), make sure it's listed under Schemes: in the above output, if it's not - make sure it's shared (Edit Scheme > Check the Shared Checkbox).
After that you can run using command line using that scheme name like following - say you are successfully running "Chad" scheme from Xcode, run that using command line like this.
npx react-native run-ios --scheme "Chad"
I am trying to install AWS Elastic Beanstalk CLI (https://github.com/aws/aws-elastic-beanstalk-cli-setup) but am having the the greatest trouble understanding why it doesn't work (I'm not good with this kind of stuff so it might be something easy..)
I've followed all the setup instructions but I get the following output and error when I run this command ./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer:
==============================================
I. Installing Python
==============================================
*************************************************************
1. Determining whether pyenv is already installed and in PATH
*************************************************************
- pyenv was not found in PATH.
*********************************************************
2. Determining whether pyenv should be cloned from GitHub
*********************************************************
- pyenv git repository already cloned to /Users/apple/.pyenv-repository. Won't attempt to clone again.
*******************************************
3. Temporarily export necessary pyenv paths
*******************************************
****************************************************************************
4. Checking whether Python can be downloaded (through curl, wget, or aria2c)
****************************************************************************
************************************************************
5. Installing Python 3.7.2. This step may take a few minutes
************************************************************
python-build: use openssl from homebrew
python-build: use readline from homebrew
Downloading Python-3.7.2.tar.xz...
-> https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz
Installing Python-3.7.2...
python-build: use readline from homebrew
BUILD FAILED (OS X 10.15.2 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/t9/6kkmnhns6g9192p5r2zwmf640000gn/T/python-build.20200204155232.99457
Results logged to /var/folders/t9/6kkmnhns6g9192p5r2zwmf640000gn/T/python-build.20200204155232.99457.log
Last 10 log lines:
File "/private/var/folders/t9/6kkmnhns6g9192p5r2zwmf640000gn/T/python-build.20200204155232.99457/Python-3.7.2/Lib/ensurepip/__main__.py", line 5, in <module>
sys.exit(ensurepip._main())
File "/private/var/folders/t9/6kkmnhns6g9192p5r2zwmf640000gn/T/python-build.20200204155232.99457/Python-3.7.2/Lib/ensurepip/__init__.py", line 204, in _main
default_pip=args.default_pip,
File "/private/var/folders/t9/6kkmnhns6g9192p5r2zwmf640000gn/T/python-build.20200204155232.99457/Python-3.7.2/Lib/ensurepip/__init__.py", line 117, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/private/var/folders/t9/6kkmnhns6g9192p5r2zwmf640000gn/T/python-build.20200204155232.99457/Python-3.7.2/Lib/ensurepip/__init__.py", line 27, in _run_pip
import pip._internal
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [install] Error 1
Exiting due to failure
I have the following in my .zshrc file:
CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include"
LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib"
CPPFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix zlib)/include"
So I have no idea what is going on...
The only thing that could explain this is the following message I get when installing zlib with brew:
==> Caveats
zlib is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
But then when go to /usr/local/opt in can see zlib as a symlink so I don't understand..
$ ll /usr/local/opt/
total 0
lrwxr-xr-x 1 apple admin 28B Feb 4 14:43 openssl -> ../Cellar/openssl#1.1/1.1.1d
lrwxr-xr-x 1 apple admin 28B Feb 4 14:43 openssl#1.1 -> ../Cellar/openssl#1.1/1.1.1d
lrwxr-xr-x 1 apple admin 21B Feb 4 15:13 zlib -> ../Cellar/zlib/1.2.11
...
You can try installing the EB CLI via Homebrew. This worked in my case whereas the other methods detailed here did not.
After upgrading haskell platform package, stack command does not work.
$ stack path
No compiler found, expected minor version match with ghc-8.0.1 (x86_64) (based on resolver setting in /home/eii/exercism/haskell/linked-list/stack.yaml).
To install the correct GHC into /home/eii/.stack/programs/x86_64-linux/, try running "stack setup" or use the "--install-ghc" flag.
$
I tried stack setup but it is trying to download an old GHC (ghc-8.0.1). I just installed Haskell platform 8.0.2 (haskell-platform-8.0.2-unknown-posix--full-x86_64.tar.gz). I am using a 64 bit Linux.
$ stack setup
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
ghc-8.0.1: 15.69 MiB / 108.01 MiB ( 14.52%) downloaded...^Cuser interrupt
$
I can compile with ghc-8.0.2 and ghci is working fine.. but I can't use stack nor install new packages.
$ stack update
Downloading package index from https://s3.amazonaws.com/hackage.fpcomplete.com/00-index.tar.gz
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpcomplete.com/00-index.tar.gz) ...
$ stack upgrade
Current Stack version: 1.3.2, available download version: 1.3.2
Skipping binary upgrade, your version is already more recent
$ which stack
/usr/local/bin/stack
$ ls -la /usr/local/bin/stack
lrwxrwxrwx. 1 root root 45 Feb 1 18:39 /usr/local/bin/stack -> /usr/local/haskell/ghc-8.0.2-x86_64/bin/stack
$ which ghc
/usr/local/bin/ghc
$ ls -la /usr/local/bin/ghc
lrwxrwxrwx. 1 root root 43 Feb 1 18:39 /usr/local/bin/ghc -> /usr/local/haskell/ghc-8.0.2-x86_64/bin/ghc
$
Please help.
I encountered this the other day on Arch Linux 4.17.4. The error was:
No setup information found for ghc-8.4.3 on your platform.
This probably means a GHC bindist has not yet been added for OS key 'linux64-ncurses6', 'linux64-tinfo6'.
Supported versions: ghc-7.8.4, ghc-7.10.2, ghc-7.10.3, ghc-8.0.1, ghc-8.0.2, ghc-8.2.1, ghc-8.2.2, ghc-8.4.1, ghc-8.4.2
As a workaround, I edited stack.yml to change
lts-12.0
to
lts-11.15
I am trying to do a clean build of Lilypond on a clean install of Mac OS X. Dependencies have been installed using Brew.
I do ./configure && make all in the Lilypond dir. It gets through the configure and starts building but ends on
ERROR: In procedure dynamic-link:
ERROR: file: "libguile-srfi-srfi-1-v-3", message: "file not found"
I know what libguile is, I don't know if it's on my system (or where it ought to be) but the configure script completes successfully and does not identify it as a missing dependency so I assume it was able to find it.
Any suggestions? Googling shows some old hints with regards to setting $LD_LIBRARY_PATH, but it seems these don't apply to Mac OS 10.6.
There is a port of lilypond available from MacPorts.
$ port info lilypond
lilypond #2.12.3, Revision 3 (textproc)
Variants: [+]docs, gui, universal
Description: Lilypond is a unix-based automated engraving system that generates beautiful sheet music from input files. Lilypond uses its
own input format, .ly, which in many ways is similar to LaTeX. Lilypond can export sheet music to PDF, EPS, SVG, and PNG
formats, and can also create MIDI files.
Homepage: http://lilypond.org/
Library Dependencies: fontforge, ghostscript, mftrace, guile, texinfo, pango, flex, urw-fonts, netpbm
Platforms: darwin
License: unknown
Maintainers: snc#macports.org, openmaintainer#macports.org
It's likely that the dynamic libraries have a .dylib extension, but need a .so extension.
I worked around this by creating links in /opt/local/lib
Owner-Users-MacBook-Pro-15:~ Carl$ ls -l /opt/local/lib | grep .so
-rwxr-xr-x 2 root admin 45152 Mar 11 12:19 libXcursor.1.dylib
-rw-r--r-- 2 root admin 50232 Mar 11 12:19 libXcursor.a
lrwxr-xr-x 1 root admin 18 Mar 11 12:19 libXcursor.dylib -> libXcursor.1.dylib
-rwxr-xr-x 2 root admin 1105 Mar 11 12:19 libXcursor.la
lrwxr-xr-x 1 root admin 32 Mar 11 21:19 libguile-srfi-srfi-1-v-3.so -> libguile-srfi-srfi-1-v-3.3.dylib
lrwxr-xr-x 1 root admin 36 Mar 11 21:19 libguile-srfi-srfi-13-14-v-3.so -> libguile-srfi-srfi-13-14-v-3.3.dylib
lrwxr-xr-x 1 root admin 32 Mar 11 21:20 libguile-srfi-srfi-4-v-3.so -> libguile-srfi-srfi-4-v-3.3.dylib
lrwxr-xr-x 1 root admin 33 Mar 11 21:20 libguile-srfi-srfi-60-v-2.so -> libguile-srfi-srfi-60-v-2.2.dylib
lrwxr-xr-x 1 root admin 17 Mar 11 21:21 libguile.so -> libguile.17.dylib
lrwxr-xr-x 1 root admin 30 Mar 11 21:22 libguilereadline-v-17.so -> libguilereadline-v-17.17.dylib
The easiest way to install Lilypond on macOS is to use lyp. Apart from installing lyp itself, which is a Ruby gem, there's no other dependency to install, no compilation step. Plus, you can install multiple versions of Lilypond and easily switch between them.
$ gem install lyp
$ lyp install lilypond
To install a specific version:
$ lyp install lilypond#2.19.53