GitHub actions on macOS using action/python plugin cause an error - python

I have created a MacOS self hosed runner for build and test machine purposes, in the middle of the running I a getting the the following error although I have installed python on mac/bin/sh: python: command not found
So I have added the
uses: actions/setup-python#v3
with:
python-version: 2.7
but it gives me the following error Error: dyld[52057]: Library not loaded: /Users/runner/hostedtoolcache/Python/2.7.18/x64/lib/libpython2.7.dylib Referenced from: <CDBDD2D2-8089-3055-BF48-1818C0431C7D> /Users/dev/actions-runner/_work/_tool/Python/2.7.18/x64/bin/python2.7 Reason: tried: '/Users/runner/hostedtoolcache/Python/2.7.18/x64/lib/libpython2.7.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/hostedtoolcache/Python/2.7.18/x64/lib/libpython2.7.dylib' (no such file), '/Users/runner/hostedtoolcache/Python/2.7.18/x64/lib/libpython2.7.dylib' (no such file), '/usr/local/lib/libpython2.7.dylib' (no such file), '/usr/lib/libpython2.7.dylib' (no such file, not in dyld cache) Error: ./setup.sh: line 52: 52057 Abort trap: 6 ./python -m ensurepip Error: The process '/bin/bash' failed with exit code 134
Does anyone know how to overcome this?

Related

Anki build fails with "protoc_wrapper failed"

I'm on an arch linux machine and trying to compile anki from source, despite following the instructions, I seem to get the following error no matter what I do:
ERROR: /home/b3nj4m1n/Documents/Github/anki/pylib/anki/BUILD.bazel:111:9: Action pylib/anki/backend_pb2.py failed: (Exit 1): protoc_wrapper failed: error executing command bazel-out/k8-opt-exec-2B5CBBC6/bin/pylib/tools/protoc_wrapper external/protoc_bin_linux_x86_64/bin/protoc bazel-out/k8-opt-exec-2B5CBBC6/bin/pylib/tools/protoc-gen-mypy ... (remaining 20 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox
Traceback (most recent call last):
File "/home/b3nj4m1n/.cache/bazel/_bazel_b3nj4m1n/ee6625df9ac32592700069683600f2ec/sandbox/linux-sandbox/288/execroot/ankidesktop/bazel-out/k8-opt-exec-2B5CBBC6/bin/pylib/tools/protoc_wrapper.runfiles/ankidesktop/pylib/tools/protoc_wrapper.py", line 23, in <module>
subprocess.run(
File "/home/b3nj4m1n/.cache/bazel/_bazel_b3nj4m1n/ee6625df9ac32592700069683600f2ec/external/python/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['external/protoc_bin_linux_x86_64/bin/protoc', '--plugin=protoc-gen-mypy=bazel-out/k8-opt-exec-2B5CBBC6/bin/pylib/tools/protoc-gen-mypy', '--python_out=bazel-out/k8-fastbuild/bin/pylib', '--mypy_out=bazel-out/k8-fastbuild/bin/pylib', '-Iproto/', '-Iexternal/ankidesktop/proto/', 'proto/anki/backend.proto', 'proto/anki/card_rendering.proto', 'proto/anki/cards.proto', 'proto/anki/collection.proto', 'proto/anki/config.proto', 'proto/anki/deckconfig.proto', 'proto/anki/decks.proto', 'proto/anki/generic.proto', 'proto/anki/i18n.proto', 'proto/anki/import_export.proto', 'proto/anki/links.proto', 'proto/anki/media.proto', 'proto/anki/notes.proto', 'proto/anki/notetypes.proto', 'proto/anki/scheduler.proto', 'proto/anki/search.proto', 'proto/anki/stats.proto', 'proto/anki/sync.proto', 'proto/anki/tags.proto']' returned non-zero exit status 1.
Target //qt:runanki failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /home/b3nj4m1n/Documents/Github/anki/qt/BUILD.bazel:123:10 Middleman _middlemen/qt_Srunanki-runfiles failed: (Exit 1): protoc_wrapper failed: error executing command bazel-out/k8-opt-exec-2B5CBBC6/bin/pylib/tools/protoc_wrapper external/protoc_bin_linux_x86_64/bin/protoc bazel-out/k8-opt-exec-2B5CBBC6/bin/pylib/tools/protoc-gen-mypy ... (remaining 20 arguments skipped)
Just for testing purposes, I wrote a dockerfile which tries to build anki in an isolated environment. This works without issues. (Here's the dockerfile)
I verified that I have all the dependencies from the dockerfile installed on my main machine, but I still get the same error.
I also tried clearing the bazel cache without any success.
Please confirm if you have followed these steps
Install Xubuntu (xubuntu-20.04.3-desktop-amd64.iso) into a new VM.
Install VirtualBox Guest Additions and the automatic Xubuntu updates.
Install these packages and bazel according to linux.md.
Kindly refer to this document on how to build Anki from source.Thank you!

Python problems on RaspberryPI

I am using Python 3 on Raspberry PI and after a proper shutdown and power on of the system again I noticed that Python is no longer working. Note that it took several attempts to properly boot Raspberry PI (power on/off) due to a reason I am not sure of yet. After the boot I tried launching a custom program and the Python interpreter itself. In both cases I got ValueError: bad marshal data (unknown type code) I referred to the steps provided here to fix that problem: How to fix Python ValueError:bad marshal data?
What I did is as follows:
sudo find /usr -name '*.pyc' -delete without sudo I cannot delete
sudo update && sudo upgrade
pi#raspberrypi:~ $ python3 Fatal Python error: initsite: Failed to
import the site module Traceback (most recent call last): File
"/usr/lib/python3.7/site.py", line 79, in
import os File "/usr/lib/python3.7/os.py", line 191
def makedirs(name, mode=0o777, exist_ok=False):
"""makedirs(name [, mode=0o777][, exist_ok=False])
^ SyntaxError: invalid syntax
I am not able to resolve this issue. Do you have any suggestions? Can it be related with a symbolic link pointing the wrong direction or a file corruption?

Compiling Tensorflow and Bazel on 32-bit Linux

I was trying to compile bazel on my Debian 32-bit.
I started the process with this command:
env EXTRA_BAZEL_ARGS="--host_javabase=#local_jdk//:jdk" BAZEL_JAVAC_OPTS="-J-Xms384m -J-Xmx512m" bash ./compile.sh
And I get this error:
In file included from external/com_google_protobuf/src/google/protobuf/message.h:122,
from external/com_google_protobuf/src/google/protobuf/descriptor.pb.h:29,
from external/com_google_protobuf/src/google/protobuf/descriptor.cc:52:
external/com_google_protobuf/src/google/protobuf/descriptor.h:1283:26: note: 'class google::protobuf::FileDescriptor' declared here
class LIBPROTOBUF_EXPORT FileDescriptor {
^~~~~~~~~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option '-Wno-writable-strings'
ERROR: /path/to/bazel/third_party/BUILD:535:1: Executing genrule //third_party:filter_netty_dynamic_libs failed (Exit 12)
zip error: Nothing to do! (bazel-out/piii-opt/bin/third_party/netty_tcnative/netty-tcnative-filtered.jar)
Target //src:bazel_nojdk failed to build
INFO: Elapsed time: 1173,794s, Critical Path: 37,45s
INFO: 976 processes: 976 local.
FAILED: Build did NOT complete successfully
ERROR: Could not build Bazel
I searched for a while... but nothing...
Any idea?
I followed the official instructions available at https://docs.bazel.build/versions/master/install-compile-source.html
Unfortunately, Bazel does not support 32-bit builds. Based on the complexity of builds that Bazel is designed to handle, a 32-bit system is just not feasible to use.

flowgraph exit with error code -11 after start

I am a gnuradio 3.7.13.4 using WXGUI and a rtl sdr donggle on debian 4.19.28-2.
I tried to install gr-lora, since that i can't launch any flowgraph on gnuradio without having the -11 error code.
First, i assume that gr-lora has some bug and unistall it, then I tried to purge and reinstall gnuradio but the result is always the same.
So i have generated topblock.py and run
python topblock.py
But it ends with a segmentation fault.
In order to understand the problem, i create a simple flowgraph with an osmocom source and a fft sink.
Therefore, i get some trace when i launch the flow graph which indicates there is something fishy :
Generating: '/home/nicolas/top_block.py'
Executing: /usr/bin/python2 -u /home/nicolas/top_block.py
WARNING: Config file '/etc/gnuradio/conf.d/gnuradio-runtime.conf' failed to parse:
std::exception
Skipping it
WARNING: Config file '/etc/gnuradio/conf.d/gnuradio-runtime.conf' failed to parse:
std::exception
Skipping it
WARNING: Config file '/etc/gnuradio/conf.d/gnuradio-runtime.conf' failed >to parse:
std::exception
Skipping it
Done (return code -11)

Installing megam for NLTK on Windows

I need to install megam for nltk classification routines in Python.
I followed the instruction by Milk Magic from this post:
0. Downloaded megam source from http://www.umiacs.umd.edu/~hal/megam/index.html
1. Installed cygwin with gcc, make and ocaml packages
2. changed the makefile
3. when trying to compile megam with a makefile I receive an error with the following content
make
ocamldep *.mli *.ml > .depend
ocamlc -g -custom -o megam str.cma -cclib -lcamlstr bigarray.cma -cclib -lbigarray unix.cma -cclib -lunix -I /lib/ocaml/caml fastdot_c.c fastdot.cmo intHashtbl.cmo arry.cmo util.cmo data.cmo bitvec.cmo cg.cmo wsemlm.cmo bfgs.cmo pa.cmo perceptron.cmo radapt.cmo kernelmap.cmo abffs.cmo main.cmo
sh: flexlink: command not found
File "fastdot_c.c", line 1:
Error: Error while building custom runtime system
make: *** [Makefile:101: megam] Error 2
Do you know what the problem might be?
Maybe somebody has solved the same problem recently and could help.
As the error is
sh: flexlink: command not found
you need to find the package that contains it
$ cygcheck -p flexlink
Found 5 matches for flexlink
flexdll-0.34-1 - flexdll: Creates DLLs with runtime symbol resolution (installed binaries and support files)
flexdll-0.35-1 - flexdll: Creates DLLs with runtime symbol resolution (installed binaries and support files)
flexdll-0.35-2 - flexdll: Creates DLLs with runtime symbol resolution
...
So you need to install the flexdll package.
$ cygcheck -l flexdll |grep bin
/usr/bin/flexlink

Categories