Error (object._d_arraysetlengthTImpl not found) while building D project on MacOS - macos

I was trying to build existing Dlang project on my home Mac. But I am getting this error. I haven't find anything about it.
$ dub build
Running pre-generate commands for vibe-d:tls...
Performing "debug" build using dmd for x86_64.
tinyendian 0.2.0: target for configuration "library" is up to date.
dyaml 0.8.0: building configuration "library"...
/Library/D/dmd/src/phobos/std/uni.d(935,32): Error: object._d_arraysetlengthTImpl not found. The current runtime does not support resizing arrays, or the runtime is corrupt.
/Library/D/dmd/src/phobos/std/uni.d(968,32): Error: object._d_arraysetlengthTImpl not found. The current runtime does not support resizing arrays, or the runtime is corrupt.
/Library/D/dmd/src/phobos/std/uni.d(4064,18): Error: template instance std.uni.MultiArray!(BitPacked!(uint, 13LU), BitPacked!(bool, 1LU)).MultiArray.length!0LU error instantiating
/Library/D/dmd/src/phobos/std/uni.d(4312,37): instantiated from here: TrieBuilder!(bool, dchar, 1114112, sliceBits!(8LU, 21LU), sliceBits!(0LU, 8LU))
/Library/D/dmd/src/phobos/std/regex/internal/ir.d(26,14): instantiated from here: CodepointSetTrie!(13, 8)
/Library/D/dmd/src/phobos/std/uni.d(935,32): Error: object._d_arraysetlengthTImpl not found. The current runtime does not support resizing arrays, or the runtime is corrupt.
/Library/D/dmd/src/phobos/std/uni.d(968,32): Error: object._d_arraysetlengthTImpl not found. The current runtime does not support resizing arrays, or the runtime is corrupt.
/Library/D/dmd/src/phobos/std/uni.d(4064,18): Error: template instance std.uni.MultiArray!(BitPacked!(uint, 13LU), BitPacked!(bool, 1LU)).MultiArray.length!1LU error instantiating
/Library/D/dmd/src/phobos/std/uni.d(4312,37): instantiated from here: TrieBuilder!(bool, dchar, 1114112, sliceBits!(8LU, 21LU), sliceBits!(0LU, 8LU))
/Library/D/dmd/src/phobos/std/regex/internal/ir.d(26,14): instantiated from here: CodepointSetTrie!(13, 8)
dmd failed with exit code 1.
Can somebody pls help?
I am using these:
MacOS 10.15.4
DMD64 v2.091.1
DUB 1.20.1

Thx to Adam D. Ruppe.
It looks like there was a problem with previously installed version of dmd.
Solved by:
brew uninstall dub
brew uninstall dmd
delete /Library/D directory
brew install dmd
brew install dub

Related

./configure doesn't find Qt5Core, QT5GUI, QT5Widgets

I've recently replaced Win10 by Linux Debian 11.2 on my PC (hence I'm a newbee in Linux). Now, not all programs are available as deb-Files.
I tried to compile source code - here a synthesizer ams-2.2.0 - from a tar.gz files (after unzipping into a separate folder) with steps (as written in the INSTALL.TXT to this source, and obviously usual)
./configure
make
make install
I get a bunch of error messages for missing files, when running ./congigure most resolved by installation of missing packages, but at last it fails with error message:
checking for QTCore Qt5Gui Qt5Widgets >= 5.0... no
configure: error: cannot find Qt5 library >= 5.0
(hope to get all written correctly, because I can't copy from the terminal ... Ctrl-Shift-C doesn't seem to work)
I checked the installation in synaptics and found that Qt-Version is 5.12. So what's wrong here?
I'm afraid to have this error message everytime I try to compile different source codes.
You need to install libqtcore and libqtwidgets with development headers, they are in qtbase5-dev package.
sudo apt install build-essential qtbase5-dev qtchooser

libgstvulkan-1.0.0.dylib missing from GStreamer plugins bad on OS X/Homebrew

On OS X 12.1, with I'm building an app that is complaining about:
dyld[12690]: Library not loaded: #rpath/lib/libgstvulkan-1.0.0.dylib
I've installed the following with Homebrew:
GStreamer 1.18.5 installed form homebrew
gst-plugins-ugly
gst-plugins-base
gst-plugins-bad
gst-plugins-good
I've been able to find all the required .dylib files so far, except for libgstvulkan-1.0.0.dylib, which should be included with gst-plugins-bad but doesn't appear to be in the Homebrew install.
Questions:
what am I missing? why don't I have libgstvulkan-1.0.0.dylib on my system and where do I get it?
I'd like to know how I can avoid Homebrew and just install the packages directly but I don't see how to get the bad plugins from that side. Do I need to build from source?
My understanding is there is no vulcan dependency in the homebrew formula, thus when building the artifact, there is no libgstvulkan-1.0.0.dylib artifact.
I tried to include molten-vk for the build and turned on vulkan flag, but it has some issue of finding the vulkan_core.h (which is already in /opt/homebrew/Cellar/molten-vk/1.1.8/libexec/include/vulkan/vulkan_core.h).
Local build error:
==> meson --prefix=/opt/homebrew/Cellar/gst-plugins-bad/1.18.5_1 --libdir=/opt/homebrew/Cellar/gst-plugins-bad/1.18.5_1/lib --buildtype=release --wrap-mode=nofallback -Dintrosp
Last 15 lines from /Users/rui/Library/Logs/Homebrew/gst-plugins-bad/01.meson:
Program g-ir-compiler found: YES (/opt/homebrew/Cellar/gobject-introspection/1.70.0_3/bin/g-ir-compiler)
Program glib-mkenums found: YES (/opt/homebrew/opt/glib/bin/glib-mkenums)
Program glib-mkenums found: YES (/opt/homebrew/opt/glib/bin/glib-mkenums)
Program glib-mkenums found: YES (/opt/homebrew/opt/glib/bin/glib-mkenums)
Program glib-mkenums found: YES (/opt/homebrew/opt/glib/bin/glib-mkenums)
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency opencv found: NO (tried pkgconfig, framework and cmake)
Run-time dependency opencv4 found: NO (tried pkgconfig, framework and cmake)
Library MoltenVK found: YES
Has header "vulkan/vulkan_core.h" : NO
../gst-libs/gst/vulkan/meson.build:146:2: ERROR: Problem encountered: vulkan plugin enabled, but vulkan.h not found
A full log can be found at /private/tmp/gst-plugins-bad-20220227-60197-31i3hx/gst-plugins-bad-1.18.5/build/meson-logs/meson-log.txt
Feel free to kick off a PR and we can get this forward.

Getting error: no matching version `^2.0.0` found for package `codec`?

Question
I'm new to Substrate and going through Add a Pallet to Your Runtime. At first, running the command cargo check -p node-template-runtime gave me error
error: failed to parse manifest at `/Users/bashar/work/substrate/start/substrate-node-template/pallets/template/Cargo.toml`
Caused by:
feature `rename-dependency` is required
consider adding `cargo-features = ["rename-dependency"]` to the manifest
I added it and then I started getting this error:
error: no matching version `^2.0.0` found for package `codec`
location searched: registry `https://github.com/rust-lang/crates.io-index`
versions found: 0.0.0
required by package `frame-benchmarking-cli v3.0.0`
... which is depended on by `node-template v3.0.0 (/Users/bashar/work/substrate/start/substrate-node-template/node)`
I tried modifying the codec version to 2.0.1 with no luck. My setup
rustup 1.23.1
rustc 1.50.0
cargo 1.30.0
Any idea what I'm doing wrong?
UPDATE
I went back to the Create Your First Substrate Chain, which this tutorial is built on, started from scratch, which the Pallet tutorial is based on. And this time, after cloning the repository for first tutorial, cargo build --release failed with the same error feature rename-dependency is required.
This built fine the first time before I moved to the second tutorial. Which makes me think maybe a recent Mac update ruined something? I even tried uninstalling Rust and re-installing it, then installing a new template. Same thing

Errors installing IJulia: Homebrew and Nettle

I recently tried installing IJulia on OS X 10.6.8, with Julia v0.2.1. After installing IPython, I ran Pkg.build("IJulia") and got the following console errors:
julia> Pkg.build("IJulia")
INFO: Building Homebrew
INFO: Cloning brew from https://github.com/staticfloat/homebrew.git
Cloning into '/Users/peterrichter/.julia/v0.2/Homebrew/deps/usr'...
dyld: Library not loaded: /usr/lib/libcurl.4.dylib
Referenced from: /Applications/Julia-0.2.1.app/Contents/Resources/julia/libexec/git-core/git-remote-https
Reason: Incompatible library version: git-remote-https requires version 7.0.0 or later, but libcurl.4.dylib provides version 6.0.0
==============================[ ERROR: Homebrew ]===============================
brew_prefix! not defined
at /Users/peterrichter/.julia/v0.2/Homebrew/src/Homebrew.jl:200
at /Users/peterrichter/.julia/v0.2/Homebrew/deps/build.jl:1
================================================================================
It seems to be complaining about an old version of libcurl (?), but when I run curl -V in Terminal, it says I am using curl 7.19.7. Likewise, executing ipython --version shows that I'm using 2.0.0, the latest version of IPython. Am I misreading the error message? If so, what steps should I take to fix it?
Additional Errors
In addition to the error text I pasted above, it also printed the following:
INFO: Building Nettle
INFO: Attempting to Create directory /Users/peterrichter/.julia/v0.2/Nettle/deps/downloads
INFO: Directory /Users/peterrichter/.julia/v0.2/Nettle/deps/downloads already created
INFO: Downloading file http://www.lysator.liu.se/~nisse/archive/nettle-2.7.1.tar.gz
INFO: Done downloading file http://www.lysator.liu.se/~nisse/archive/nettle-2.7.1.tar.gz
INFO: Attempting to Create directory /Users/peterrichter/.julia/v0.2/Nettle/deps/src
INFO: Directory /Users/peterrichter/.julia/v0.2/Nettle/deps/src already created
INFO: Attempting to Create directory /Users/peterrichter/.julia/v0.2/Nettle/deps
INFO: Directory /Users/peterrichter/.julia/v0.2/Nettle/deps already created
INFO: Attempting to Create directory /Users/peterrichter/.julia/v0.2/Nettle/deps/src/nettle-2.7.1
INFO: Directory /Users/peterrichter/.julia/v0.2/Nettle/deps/src/nettle-2.7.1 already created
INFO: Attempting to Create directory /Users/peterrichter/.julia/v0.2/Nettle/deps/builds/nettle
INFO: Directory /Users/peterrichter/.julia/v0.2/Nettle/deps/builds/nettle already created
INFO: Changing Directory to /Users/peterrichter/.julia/v0.2/Nettle/deps/builds/nettle
checking build system type... x86_64-apple-darwin10.8.0
checking host system type... x86_64-apple-darwin10.8.0
checking for -R flag... none
Searching for libraries
checking /Users/peterrichter/.julia/v0.2/Nettle/deps/usr/lib... not found
checking /usr/local/lib... added
checking /sw/local/lib... not found
checking /sw/lib... not found
checking /usr/gnu/lib... not found
checking /opt/gnu/lib... not found
checking /sw/gnu/lib... not found
checking /usr/freeware/lib... not found
checking /usr/pkg/lib... not found
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/peterrichter/.julia/v0.2/Nettle/deps/builds/nettle':
configure: error: C compiler cannot create executables
See `config.log' for more details
===============================[ ERROR: Nettle ]================================
failed process: Process(`/Users/peterrichter/.julia/v0.2/Nettle/deps/src/nettle-2.7.1/configure --disable-openssl --libdir=/Users/peterrichter/.julia/v0.2/Nettle/deps/usr/lib --prefix=/Users/peterrichter/.julia/v0.2/Nettle/deps/usr`, ProcessExited(77)) [77]
at /Users/peterrichter/.julia/v0.2/Nettle/deps/build.jl:35
================================================================================
INFO: Building ZMQ
INFO: Building IJulia
Found IPython version 2.0.0 ... ok.
Creating julia profile in IPython...
(Existing KernelManager.kernel_cmd setting in ipython_config.py is untouched.)
(Existing IPythonWidget.execute_on_complete_input setting in ipython_qtconsole_config.py is untouched.)
(Existing FrontendWidget.lexer_class setting in ipython_qtconsole_config.py is untouched.)
(Existing NotebookApp.port setting in ipython_notebook_config.py is untouched.)
(Existing ipynblogo.png file untouched.)
(Existing ipynblogo.svg file untouched.)
(Existing favicon.ico file untouched.)
(Existing custom.js file untouched.)
(Existing julia.js file untouched.)
================================[ BUILD ERRORS ]================================
WARNING: Homebrew and Nettle had build errors.
- packages with build errors remain installed in /Users/peterrichter/.julia/v0.2
- build a package and all its dependencies with `Pkg.build(pkg)`
- build a single package by running its `deps/build.jl` script
================================================================================
It looks like you don't have a C compiler installed so the Pkg.add is failing on some of IJulia's nettle dependency.
Your first errors dependency though looks like it's a linking conflict between the bundled git implementation for your julia distribution and the system provided library.
You can see exactly what shared library the git app is using with otool.
otool -L /Applications/Julia-0.2.1.app/Contents/Resources/julia/libexec/git-core/git-remote-https
This should list the full path of the libcurl dylib that the git-remote-https binary is linking to.
You can compare that against the output for otool -L $(which curl) and see if they are linking to the same library.
You can also run otool -L on the referenced libraries themselves to see what versions they are. This should at least tell you what the conflict is. It's possible that you will need to upgrade the git version that your julia distribution uses. But I'm not sure what would be involved there. I just install julia from source which bypasses this particular problem.
You might find it easier to do the same.
What worked for me might be of help to you:
Using latest Anaconda free python, download windows32 exe file from github and extract, start julia.bat, then in the Julia command window type Pkg.add("IJulia"), In another command window type
ipython notebook --profile=julia and enjoy the webpage that opens in your default browser(Chrome)!!
I had trouble because of the syntax of the --profile=julia command part.
I too use macports and not Homebrew.
I seem to have fixed this by changing lines 21,22 in ~/.julia/v0.3/Nettle/deps/build.jl to:
libdirs = String["$(julia_usrdir)/lib"; "/opt/local/lib"]
includedirs = String["$(julia_usrdir)/include"; "/opt/local/include"]
i.e. I added the macports lib and include dirs explicitly.
Can someone please notify the appropriate authorities, cheers.

Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.6.sdk

I'm trying to install rpy2 for Python3 with the following command:
easy_install-3.2 rpy2
This gives a few warnings and an error:
warning: no previously-included files matching '*patch*' found anywhere in distribution
warning: no previously-included files matching '*diff*' found anywhere in distribution
warning: no previously-included files matching '.hg' found anywhere in distribution
no previously-included directories found matching 'dist'
gcc-4.2 not found, using clang instead
Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.6.sdk
Please check your Xcode installation
build/python3_rpy/rpy/rinterface/_rinterface.c:51:10: fatal error: 'signal.h' file not found
#include <signal.h>
^
1 error generated.
error: Setup script exited with error: command 'clang' failed with exit status 1
The file /Developer/SDKs/MacOSX10.6.sdk seems to be missing even though I have xcode 4.5.1 installed.
There is no file called MacOSX10.6.sdk in the "Downloads for Apple Developers" on the Apple home page. What do I do?
Ps. It all works well if I do not specify python3.
What is happening is that python was built with a pre-4.3 version of Xcode where the tools and SDKs were installed in /Developer. This is no longer the case with Xcode 4.3 where the tools and SDKs are part of the Xcode.app bundle. It also looks like python was compiled using gcc rather than clang.
I would recommend dumping the installation of python3 you have and installing it via macports, which will use the latest Xcode to build its ports and will therefore be able to compile additional python modules.
Once you have installed macports, simply do:
$ sudo port install python33
There is also a good chance those python modules can be installed by simply doing:
$ sudo port install whizzopymod
EDIT: Scratch that last part as macports doesn't have rpy2 for python3. You'll have to continue using easy_install I guess.

Resources