Can't import Lean 4 packages - lean

I've made a Leanprover installation on Ubuntu 22.04 and used the stable toolchain. The elan toolchain list shows the following default
leanprover/lean4:stable (default)
I've made a test file called test.lean that contains the following
import Leanpkg
#eval Leanpkg.leanVersionString
When I run lean test.lean I get
test.lean:1:0: error: unknown package 'Leanpkg'
test.lean:2:6: error: unknown identifier 'Leanpkg.leanVersionString'
test.lean:2:0: error: unknown constant 'sorryAx'
What should I do to make it work?

Related

unknown import: `wasi_snapshot_preview1::sock_setsockopt` has not been defined when running Rust WASI binary

Title says it all - I am attempting to run a very basic Rust program using hyper_wasi, and everything compiles seemingly ok using cargo wasi run. Unfortunately when it actually executes, I get:
Error: failed to run main module `target/wasm32-wasi/debug/<my project name here>.wasm`
Caused by:
0: failed to instantiate "target/wasm32-wasi/debug/<my project name here>.wasm"
1: unknown import: `wasi_snapshot_preview1::sock_setsockopt` has not been defined
Execution environment is a rather older Mac (2013 MBP with Big Sur), clang version:
Homebrew clang version 15.0.3
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
If anyone can point me at what I might be missing I'd appreciate it.

Python 3.7 + Ansible = clang errors

First, delete and recreate a fresh virtualenv. This works fine:
rm -rf ~/.virtualenvs/test
python3 -m venv ~/.virtualenvs/test
As soon as I try to install the pip library ansible, I get clang compilation errors. There is a large amount of compiler output to the console that I'm editing out for simplicity. I suspect this isn't an issue with my local environment, but a software compatibility issue with Python 3.7.
vex --path ~/.virtualenvs/test pip install ansible
<snip>
ext/_yaml.c:24143:21: error: no member named 'exc_type' in 'struct _ts'
*type = tstate->exc_type;
~~~~~~ ^
<snip>
51 warnings and 15 errors generated.
error: command 'clang' failed with exit status 1
This looks like an issue with cython. There are many similar issues reported on GitHub for some famous libraries like scikit-learn, pandas etc. Considering creating an issue in Ansible repo.
Also see:
https://github.com/cython/cython/issues/1955

Unable to build Tensorflow from source MacOS High Sierra

I've followed all the steps in the official guide. Except I built it using:
$ bazel build -c opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=- msse4.1 --copt=-msse4.2 --config=opt -k //tensorflow/tools/pip_package:build_pip_package
And during ./config I've set the right paths and disabled Google Cloud Platform, Hadoop, XLA, VERBS, OpenCL, CUDA, MPI support.
Hardware:
Macbook Pro 13 inch (mid 2014)
CPU: Intel Core i5 (4278U)
RAM: 8GB
Software:
High Sierra (10.13.2)
Clang Version: clang-900.0.39.2
Bazel Version: 0.9.0
Conda Version: 4.4.3
Python: 3.6.3
All the packages are upto date. This worked perfectly fine 2 months ago on this machine. For some strange reasons it doesn't build anymore now. I'm just posting a part of the error list here:
WARNING: Config values are not defined in any .rc file: opt
ERROR: Skipping 'msse4.1': no such target '//:msse4.1': target 'msse4.1' not declared in package '' defined by /Users/rakshithgb/Documents/Tensorflow/tensorflow/BUILD
WARNING: Target pattern parsing failed.
ERROR: /private/var/tmp/_bazel_rakshithgb/fde7bc60972656b0c2db4fd0b79e24fb/external/com_googlesource_code_re2/BUILD:96:1: First argument of 'load' must be a label and start with either '//', ':', or '#'. Use --incompatible_load_argument_is_label=false to temporarily disable this check.
ERROR: /private/var/tmp/_bazel_rakshithgb/fde7bc60972656b0c2db4fd0b79e24fb/external/com_googlesource_code_re2/BUILD:98:1: name 're2_test' is not defined (did you mean 'ios_test'?)
ERROR: /private/var/tmp/_bazel_rakshithgb/fde7bc60972656b0c2db4fd0b79e24fb/external/com_googlesource_code_re2/BUILD:100:1: name 're2_test' is not defined (did you mean 'ios_test'?)
And it ends like this:
ERROR: /Users/rakshithgb/Documents/Tensorflow/tensorflow/tensorflow/core/kernels/BUILD:550:1: Target '#local_config_sycl//sycl:using_sycl' contains an error and its package is in error and referenced by '//tensorflow/core/kernels:debug_ops'
WARNING: errors encountered while analyzing target '//tensorflow/tools/pip_package:build_pip_package': it will not be built
INFO: Analysed target //tensorflow/tools/pip_package:build_pip_package (203 packages loaded).
INFO: Found 0 targets...
ERROR: command succeeded, but there were errors parsing the target pattern
INFO: Elapsed time: 12.763s, Critical Path: 0.02s
FAILED: Build did NOT complete successfully
Has anyone else had this issue? How do I fix it? I've uploaded the entire error log on GitHub Tensorflow issue page. #15622
Ok it looks like the new bazel version isn't compatible with the current Tensorflow release. It looks like the fix will be issued in the next release. According to this thread on GitHub - #15492
The temporary fix that worked for me was to build it using --incompatible_load_argument_is_label=false in the bazel command. So my build command now looks like this:
$ bazel build --config=opt --incompatible_load_argument_is_label=false //tensorflow/tools/pip_package:build_pip_package

Unable to run a QMediaPlayer based application

I've created a virtual machine with a fresh install of Ubuntu 14.04.5 LTS (Trusty Tahr), then I've installed Qt 5.8. The arch is x64.
I've tried to execute the following example:
http://doc.qt.io/qt-5/qtmultimedia-multimediawidgets-player-example.html, the result is the error:
defaultServiceProvider::requestService(): no service found for -
"org.qt-project.qt.mediaplayer"
I've enabled the QT_DEBUG_PLUGINS=1 variable and seen that:
Got keys from plugin meta data ("gstreamermediaplayer")
QFactoryLoader::QFactoryLoader() checking directory path "/home/user/QtWorkspace/bin/mediaservice" ...
Cannot load library /home/user/Qt/5.8/gcc_64/plugins/mediaservice/libgstmediaplayer.so: (/home/user/Qt/5.8/gcc_64/plugins/mediaservice/../../lib/libqgsttools_p.so.1: undefined symbol: _gst_value_list_type)
QLibraryPrivate::loadPlugin failed on "/home/user/Qt/5.8/gcc_64/plugins/mediaservice/libgstmediaplayer.so" : "Cannot load library /home/user/Qt/5.8/gcc_64/plugins/mediaservice/libgstmediaplayer.so: (/home/user/Qt/5.8/gcc_64/plugins/mediaservice/../../lib/libqgsttools_p.so.1: undefined symbol: _gst_value_list_type)"
defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"
What is the cause of the "libqgsttools_p.so.1: undefined symbol: _gst_value_list_type" error? Why this mismatch? Is it possible that QtMultimedia does not support GStreamer 1.0 (Trusty comes with GStreamer 1.2.4 installed)?

Can't compile QT 5.5.1 on Amazon Centos: Project ERROR: Unknown module(s) in QT: quick

I am trying to compile QT 5.5.1 on Amazon AMI 2015.09, which looks la lot like Centos 6.5.
I keep getting this error:
Project ERROR: Unknown module(s) in QT: quick
However, there is no quick module that I can find, and no obvious way to enable to disable it from looking at the ./configure script.
My procedure:
I downloaded qt-everywhere-opensource-src-5.5.1.tar.gz
I unpacked it.
I ran ./configure
Confirmed that I want the opensource license and agreed to the LGPL.
Ran gmake -j4 (but I get the same behavior with gmake.
Interestingly, make distclean gives me this error:
Project ERROR: Unknown module(s) in QT: quick-private
Here are all of the errors sent to STDERR:
Checking for openal... Checking for bluez... no
Checking for bluez_le... no
Checking for btapi10_2_1... no
/home/ec2-user/qt-everywhere-opensource-src-5.5.1/qtmultimedia/qtmultimedia.pro:28: Variable GST_VERSION is not defined.
Checking for resourcepolicy... no
Checking for gpu_vivante... no
Checking for libbb2... no
no
Project MESSAGE: Unsupported Bluetooth platform, will not build a working QtBluetooth library.
Project MESSAGE: Either no Qt D-Bus found or no BlueZ headers.
qbluetoothdevicediscoveryagent_p.h:0: Note: No relevant classes found. No output generated.
qbluetoothservicediscoveryagent_p.h:0: Note: No relevant classes found. No output generated.
qbluetoothserver_p.h:0: Note: No relevant classes found. No output generated.
qbluetoothlocaldevice_p.h:0: Note: No relevant classes found. No output generated.
Checking for assimp... no
Project ERROR: Unknown module(s) in QT: quick
gmake[4]: *** [sub-textureandlight-make_first] Error 3
gmake[3]: *** [sub-canvas3d-make_first] Error 2
gmake[2]: *** [sub-canvas3d-make_first] Error 2
gmake[1]: *** [sub-examples-make_first] Error 2
gmake: *** [module-qtcanvas3d-make_first] Error 2
gmake: *** Waiting for unfinished jobs....
At another poster's suggestion I tried ./configure -skip qtquick but that didn't work:
$ ./configure -skip qtquick
+ cd qtbase
+ /home/ec2-user/qt-everywhere-opensource-src-5.5.1/qtbase/configure -top-level -skip qtquick
Attempting to skip non-existent module qtquick.
$
this is what I think will solve your problems:
You have use `make confclean' instead of making distclean for deleting the previous configuration.
Configure in verbose mode — more information will be provided, sorry, I don't remember exact flag, if I'm not mistaken, it's -v.
If you don't need quick, add -skip qtquick to the configure.

Resources