Anchor test without AVX2 CPU - solana

After initialising a project with anchor init, when I run anchor-test, it gives me this message at the last.
Unable to get recent blockhash. Test validator does not look started. Check .anchor/test-ledger/test-ledger-log.txt for errors. Consider increasing [test.startup_wait] in Anchor.toml.
The expected output at last should be the transaction hash but I don't get it.
When I use solana-test-validator it returns Aborted(Core Dumped). It seems like my CPU is not AVX2 compatible for which I am not able to run solana-test-validator.
The project is instructing me to build from source.
What to do now?

Sounds like you'll need to build solana-test-validator from source! This isn't very hard to do thankfully, and the steps go:
Install Rust:
$ curl https://sh.rustup.rs -sSf | sh
$ source $HOME/.cargo/env
$ rustup component add rustfmt
Install build dependencies, for Ubuntu:
$ sudo apt-get update
$ sudo apt-get install libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang make
Download the source code:
$ git clone https://github.com/solana-labs/solana.git
$ cd solana
Build the test validator:
$ cargo build --bin solana-test-validator --release
Run it:
$ ./target/release/solana-test-validator
More information directly in the repo: https://github.com/solana-labs/solana#building

Related

Can't install apertium language packages from source - make command shows errors

I am trying to install apertium-eng-ita package from source (available at https://github.com/apertium/apertium-eng-ita). The system is debian 11 (i tried also on fresh ubuntu, get the same error). So i downloaded all the files into my /root directory (/root/eng-ita contents all the files from provided link) and run:
./autogen.sh
This generated all the necessary files inside the "eng-ita" folder, including "Makefile". But then i run:
make
and see errors like:
apertium-validate-dictionary apertium-eng-ita.eng-ita.dix /bin/bash:
apertium-validate-dictionary: command not found make: ***
[Makefile:769: eng-ita.autobil.bin] Error 127
I began googling (for example, here is some info - https://wiki.apertium.org/wiki/Installation_troubleshooting) this 127 error and found some information about PATH, but where i can put this PATH to make it work?
If you're installing from source, you should first add the apt source and install apertium-all-dev which will give you make etc. Cf. https://wiki.apertium.org/wiki/Prerequisites_for_Debian you should
curl -sS https://apertium.projectjj.com/apt/install-nightly.sh | sudo bash
sudo apt-get -f install locales build-essential automake subversion git pkg-config \
gawk libtool apertium-all-dev
(But you don't need to install from source if you just want to use the pair and not develop for it. There are nightly debian packages of the latest git commit; after running the first command you can get that package with sudo apt install apertium-eng-ita)

unrecognized option --gc-keep-exported on arm ld

Right now, I'm trying to integrate a GitHub Action that checks if some code on a pull request compiles properly (VEX Robotics for anyone interested). However, when it gets to running the make command, I get this error:
Building Project
make: Entering directory '/github/workspace/V5'
Adding timestamp [OK]
Creating cold package with libpros,okapilib [ERRORS]
/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: unrecognized option '--gc-keep-exported'
/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
make: *** [bin/cold.package.elf] Error 1
common.mk:200: recipe for target 'bin/cold.package.elf' failed
I'm extremely confused as to why this is occurring? --gc-keep-exported is a real option, and this code compiles perfectly on my local machine. I've tried changing the ubuntu version and updating the VEX SDK to see if it helps, but I keep on getting the same error. What should I do?
Code:
Dockerfile:
FROM ubuntu:18.04
RUN apt-get update
# Install GCC & Clang
RUN apt-get install build-essential -y
RUN apt-get install clang -y
# Install needed ARM deps
RUN apt-get install gcc-arm-none-eabi -y
RUN apt-get install binutils-arm-none-eabi -y
# Install 7z & cURL
RUN apt-get install p7zip-full -y
RUN apt-get install curl -y
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
entrypoint.sh:
echo "Downloading VEX SDK"
# Get VEX SDK and put it in ~/sdk
curl -L https://content.vexrobotics.com/vexcode/v5code/VEXcodeProV5_2_0_1.dmg -o _vexcode_.dmg
7z x _vexcode_.dmg || :
7z x Payload~ ./VEXcode\ Pro\ V5.app/Contents/Resources/sdk -osdk_temp || :
mkdir ~/sdk
mv sdk_temp/VEXcode\ Pro\ V5.app/Contents/Resources/sdk/* ~/sdk
rm -fR _vex*_ _vex*_.dmg sdk_temp/ Payload~
ls ~/sdk # ls just for testing
echo "Building Project"
# Now make the makefile in the set path
make --directory=$1
The reason this was happening was because I used an old version of gcc-arm-none-eabi. The version on apt is super outdated (v6.3.1 vs v10.2.1).
I was able to use the new version by downloading the tarball available on their site and using the direct paths to compile my code.
There is a newer GCC version available for a newer Ubuntu version, you could browse for another one, or be lazy and enjoy some malpractice with me:
FROM ubuntu:latest

What is this error `make.exe": no_c_compiler: Command not found`

I'm trying to build grpc from source on Windows 2012 Server edition. I downloaded and installed Python 3.5 from the Python website and installed the entire MinGW package as well as git along with git bash. Following the instructions for building from source:
$ git clone https://github.com/grpc/grpc.git
$ cd grpc
$ git submodule update --init
$ make
$ [sudo] make install
I get the aforementioned error after executing make. Here's the shell output for your perusal.
PS C:\Users\thunderboltsid\grpc> make
[MAKE] Generating /c/Users/thunderboltsid/grpc/libs/opt/pkgconfig/grpc.pc
[MAKE] Generating /c/Users/thunderboltsid/grpc/libs/opt/pkgconfig/grpc_unsecure.pc
[MAKE] Generating cache.mk
[C] Compiling third_party/zlib/adler32.c
make.exe": no_c_compiler: Command not found
make.exe": *** [/c/Users/thunderboltsid/grpc/objs/opt/third_party/zlib/adler32.o] Error 127
I really can't understand what is this error supposed to be. Tried googling but that didn't help. Any input will be appreciated.
you may need run apt-get install which
install build-base in your system, example:
apt-get install build-base
You may simply have no C compiler installed, not even gcc. If that's the reason then installing gcc resolves the issue:
apt get install gcc

Linphone compiling problems on osx

I'm trying to compile linphone on mountain lion. I have downloaded the sources and followed all the instructions in the README.macos file. The first time, when I got to '$ port install ige-mac-integration' an error occurred. It said gtk2 had to be installed with x11, however, the instructions said to install it with quartz and no_x11. I tried installing gtk2 again, this time with x11, but when I get to the compiling process it tells me quartz is needed. I can't install both, because the gtk2 installation will complain about it, and it seems I need both to complete the entire process of installing and compiling linphone.
I have tried these steps with the downloadable sources, as well as the git sources, both gave me the same problems. Linphone does not have a forum, so I couldn't ask it on their site.
I just need to get the sources and start using them, so any recommendations on how to open the linphone source, edit it, and compile/run it would be very welcome. The ideal situation would be where I can just open an xcode project file.
This is the readme file:
**********************************
* Compiling linphone on macos X *
**********************************
You need:
- Xcode (download from apple or using appstore application)
- Macports: http://www.macports.org/
Download and install macports using its user friendly installer.
- Install build time dependencies
$ port install automake autoconf libtool intltool
- Install some linphone dependencies with macports
$ port install speex
$ port install libosip2 # WARNING: currently outdated in macport
$ port install libeXosip2 #WARNING: currently outdated in macport
$ port install ffmpeg-devel
$ port install libvpx
- Install srtp (optional) for call encryption
$ port install srtp
If that fails, get from source:
$ git clone git://git.linphone.org/srtp.git
$ cd srtp && autoconf && ./configure --prefix=/opt/local && make libsrtp.a
$ sudo make install
- Install zrtpcpp (optional), for unbreakable call encryption
$ port install cmake
$ git clone git://git.linphone.org/zrtpcpp.git
$ cd zrtpcpp && cmake -Denable_ccrtp=false . && make
$ sudo make install
- Install gtk. It is recommended to use the quartz backend for better integration.
$ port install gtk2 +quartz +no_x11
$ port install hicolor-icon-theme
- Compile and install the tunnelsu
If you got the source code from git, run ./autogen.sh first
Then or otherwise, do:
$ ./configure --prefix=/opt/local && make && sudo make install
- Compile linphone
If you got the source code from git, run ./autogen.sh first.
Then or otherwise, do:
$ ./configure --prefix=/opt/local --with-readline=/opt/local --disable-strict --disable-x11 --with-srtp=/opt/local --with-gsm=/opt/local --enable-zrtp && make
Install to /opt/local
$ sudo make install
Done.
If you want to generate a portable bundle, then install gtk-mac-bundler.
Use git:
$ git clone https://github.com/jralls/gtk-mac-bundler.git
$ cd gtk-mac-bundler && make install
$ export PATH=$PATH:~/.local/bin
#make this dummy charset.alias file for the bundler to be happy:
$ sudo touch touch /opt/local/lib/charset.alias
Then run, inside linphone source tree:
1. Run configure as told before but with "--enable-relativeprefix" appended.
$ make
$ make bundle
The resulting bundle is located in linphone build directory, together with a zipped version.
For a better appearance, you can install the gtk-quartz-engine (a gtk theme) that make gtk application more similar to other mac applications (but not perfect).
$ git clone https://github.com/jralls/gtk-quartz-engine.git
$ cd gtk-quartz-engine
$ autoreconf -i
$ ./configure --prefix=/opt/local && make
$ sudo make install
Generate a new bundle to have it included.
Below is the details to configure the dependencies and build linphone.
==============================================================
Step: 1:- Dependency configuration:
I just followed the instruction which is available in "README.macos" upto sqlite3 configuration. I had some problem with dependancies configuration.
Because of macport version, srtp configuration is failed. So I have downloaded "MacPorts-2.1.3-10.8-MountainLion.pkg" and installed manually.
Because of GTK version, libsoup is failed. So I have downloaded "GTK_2.18.5-X11.pkg" and installed manually.
After the manual installation, I have followed "README.macos" again for reconfiguration.
NOTE: Sometime terminal won't recognize "wget".
--> Solution: just execute below command.
echo 'alias wget="curl -O"' >> ~/.bash_profile
Step: 2:- Compile and Install:
I got some problem related to intltool while compiling.
Solution: just I set the path by executing below commands
export PATH=$PATH:/opt/local/bin
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info
Now it is successfully compiled and installed.
Step: 3:- Creating bundle to run the app:
Just I followed below commands to make the build.
If you want to generate a portable bundle, then install gtk-mac-bundler.
Use git:
$ git clone https://github.com/jralls/gtk-mac-bundler.git
$ cd gtk-mac-bundler && make install
$ export PATH=$PATH:~/.local/bin
#make this dummy charset.alias file for the bundler to be happy:
$ sudo touch touch /opt/local/lib/charset.alias
Then run, inside linphone source tree:
1. Run configure as told before but with "--enable-relativeprefix" appended.
$ make
$ make bundle
It will create "linphone.app" file in current linphone directory. It will support only for "Mountain Lion".
Step: 4:- Support for lower version: (e.g.: Lion, Snow Leopard...)
We have to configure "libiconv hack" to supporting for lower version
I think it will help you.
I wrote an answer here. It's a bit long but I sincerely hope it is clear enough and will help you.
It contains the build settings and other libs you need to include.
Cool stuff I didn't need to run the make :)
Best,

How to compile Clisp 2.46?

When I try to compile the newest version of Clisp on Ubuntu 8.04 I always get this error after running configure:
Configure findings:
FFI: no (user requested: default)
readline: yes (user requested: yes)
libsigsegv: no, consider installing GNU libsigsegv
./configure: libsigsegv was not detected, thus some features, such as
generational garbage collection and
stack overflow detection in interpreted Lisp code
cannot be provided.
Please do this:
mkdir tools; cd tools; prefix=`pwd`/i686-pc-linux-gnu
wget http://ftp.gnu.org/pub/gnu/libsigsegv/libsigsegv-2.5.tar.gz
tar xfz libsigsegv-2.5.tar.gz
cd libsigsegv-2.5
./configure --prefix=${prefix} && make && make check && make install
cd ../..
./configure --with-libsigsegv-prefix=${prefix} --with-readline --with-unicode --with-module=i18n --with-module=gdbm --with-module=pcre --with-module=readline --with-module=regexp
If you insist on building without libsigsegv, please pass
--ignore-absence-of-libsigsegv
to this script:
./configure --ignore-absence-of-libsigsegv --with-readline --with-unicode --with-module=i18n --with-module=gdbm --with-module=pcre --with-module=readline --with-module=regexp
I've tried doing as requested, but it didn't help: it seems to ignore the --with-libsigsegv-prefix option. I also tried putting installing libsigsegv in a standard location (/usr/local). Oh, and of course, Ubuntu tells me that libsigsegv and libsigsegv-dev are installed in the system.
I'd really like to be able to compile this version of Clips, as it introduces some serious improvements over the version shipped with Ubuntu (I'd also like to have PCRE).
Here are my notes from compiling CLISP on Ubuntu in the past, hope this helps:
sudo apt-get install libsigsegv-dev libreadline5-dev
# as of 7.10, Ubuntu's libffcall1-dev is broken and I had to get it from CVS
# and make sure CLISP didn't use Ubuntu's version.
sudo apt-get remove libffcall1-dev libffcall1
cvs -z3 -d:pserver:anonymous#cvs.sv.gnu.org:/sources/libffcall co -P ffcall
cd ffcall; ./configure; make
sudo make install
cvs -z3 -d:pserver:anonymous#clisp.cvs.sourceforge.net:/cvsroot/clisp co -P clisp
cd clisp
./configure --with-libffcall-prefix=/usr/local --prefix=/home/luis/Software
ulimit -s 16384
cd src; make install
If you look at 'config.log' it might tell you why configure is not finding libsigsegv

Resources