I downloaded the sqlite3 source file (not amalgamation version)
There are test folder and many test files (journal1.test , pager1.test ... etc)
How to execute these test files?
Go to the SQLite's download page and download the Snapshop of the complete (raw) source tree on the Alternative Source Code Formats section.
Unzip it, cd into the folder and run:
sudo apt install tcl-dev zlib1g-dev
./configure
make test
You can run the quick test instead (less than 3 minutes):
make quicktest
Or just the tcl tests (aka veryquick):
make tcltest
On Mac
brew install tcl-tk
./configure --with-tcl=/usr/local/opt/tcl-tk/lib
make test
Related
I have the Atom editor installed on my Mac, with the Beautify Package. Works great for HTML,etc, but when I try to Beautify SQL it says that it needs SQLFormat, which is not installed by default. When I follow the github link it shows that SQLFormat is Python, install instructions are downalod zip and 'pip install sqlparse'. Do I need to install Python to load sqlparse? Anyone have some simple instructions on how to load on a mac?
first install sqlparse with pip ( to do this you need to have python)
pip install sqlparse
Once it's installed note down the python version with which its installed. e.g. in my case it was python3.7 / python3
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: sqlparse in ./Library/Python/3.7/lib/python/site-packages (0.4.2)
make sure /usr/local/bin/ is on your PATH variable by running echo $PATH if not add it your PATH variable.
then create a file sqlformat under /usr/local/bin/ (i.e. /usr/local/bin/sqlformat) using any editor of your choice and paste below snippet, make sure to use correct version of python and save the file
#!/bin/bash
FLAGS="$f $p $#"
exec python3 -m sqlparse $FLAGS
finally do change the file permission by
chmod 755 /usr/local/bin/sqlformat
I am trying to create a completely portable version of R for Mac that I can send to users with no R on their system and they can essentially double click a command file and it launches a Shiny application. I'll need to be able to install packages including some built from source (and some from GitHub).
I am using the script from this GitHub repository (https://github.com/dirkschumacher/r-shiny-electron/blob/master/get-r-mac.sh) as a starting point (it's also pasted below), creating a version of R, but (A) I find that when I try to launch R it gives me an error not finding etc/ldpaths and (B) when I try to launch Rscript it runs my system version -- I run `Rscript -e 'print(R.version)' and it prints out 4.0 which is my system version of R rather than the version 3.5.1 which the shell script has downloaded and processed.
I've experimented with editing the "R" executable and altering R_HOME and R_HOME_DIR but it still runs into issues when I try to install packages to the 3.5.1 directory.
Can anyone provide some guidance?
(By the way docker is not an option, this needs to be as simple as possible end-users with limited technical skills. So having them install docker etc won't be an option)
#!/usr/bin/env bash
set -e
# Download and extract the main Mac Resources directory
# Requires xar and cpio, both installed in the Dockerfile
mkdir -p r-mac
curl -o r-mac/latest_r.pkg \
https://cloud.r-project.org/bin/macosx/R-3.5.1.pkg
cd r-mac
xar -xf latest_r.pkg
rm -r r-1.pkg Resources tcltk8.pkg texinfo5.pkg Distribution latest_r.pkg
cat r.pkg/Payload | gunzip -dc | cpio -i
mv R.framework/Versions/Current/Resources/* .
rm -r r.pkg R.framework
# Patch the main R script
sed -i.bak '/^R_HOME_DIR=/d' bin/R
sed -i.bak 's;/Library/Frameworks/R.framework/Resources;${R_HOME};g' \
bin/R
chmod +x bin/R
rm -f bin/R.bak
# Remove unneccessary files TODO: What else
rm -r doc tests
rm -r lib/*.dSYM
Happy to help you get this working for your shiny app. You can use this github repo for Electron wrapping R/Shiny... just clone, and replace the app.R (for your other packages you need to install them in the local R folder after cloning and then running R from the command line out of the R-Portable-Mac/bin folder...
Try it with the Hello World app.R that is included first
https://github.com/ColumbusCollaboratory/electron-quick-start
And, then installing your packages in the local R-Portable-Mac folder runtime. Included packages by default...
https://github.com/ColumbusCollaboratory/electron-quick-start/tree/master/R-Portable-Mac/library
Your packages will show up here after install.packages() from the command line using the local R-Mac-Portable runtime.
We have been working on a R Addin for this also...
https://github.com/ColumbusCollaboratory/photon
But, note the add-in is still a work in progress and doesn't work with compiled R packages; still have to go into the local R folder and runtime on the command line and install the packages directly into the local R folder libpath as discussed above.
Give it a try and let us know through Github issues if you have any questions and issues. And, if you've already posted out there, sorry we haven't responded as of yet. Would love to communicate through the photon Add-In for this to get it working with compiling packages (into the libPath)--if you have the time to help. Thanks!
I am trying to start doing the Pintos Stanford project on Ubuntu. I downloaded the tar file that the Stanford website provides but when I try and run
pintos -- run alarm-multiple
I get the following error:
Unrecognized character \x16; marked by <-- HERE after if ($<-- HERE near column 7 at /home/adambomb/src/pintos/src/utils/pintos line 911
I found on another stackoverflow post that I should pull from latest version of pintos:
git clone git://pintos-os.org/pintos-anon pintos
But doing this gets me an error:
Cloning into 'pintos'...
fatal: read error: Connection reset by peer
I'm not really sure where to go from here and could use some insight to fix either of these problems.
I don't really know where to go from here.
I ran into the same issues as you trying various guides on the internet (eg. this guide) and looking through StackOverflow. However, this youtube video helped me the most.
Steps below can be found here. I'm using Ubuntu 18.04.
Run sudo apt-get install qemu
Get latest pintos source code from pintos public git repository or download older version with this link
2a. Under heads, find master and click the tree hyperlink
2b. Click snapshot and download the .tar.gz file to your directory
Run tar -xvzf pintos-anon-master-{value}.tar.gz where {value} is the commit-id
Open /utils/pintos-gdb with vim and edit GDBMACROS variable to point to the full path for pintos directory
Open Makefile with vim and edit LOADLIBES variable name to LDLIBS
Compile utils directory by navigating to /src/utils and running make
Edit /src/threads/Make.vars (line 7): change bochs to qemu
Compile threads directory by navigating to /src/threads and running make
Edit /utils/pintos (line 103): replace bochs with qemu
Edit /utils/pintos (~line 257): replace kernel.bin with the full path to kernel.bin
Edit /utils/pintos (~line 621): replace qemu with qemu-system-x86_64
Edit /utils/Pintos.pm (line 362): replace loader.bin with the full path to loader.bin
Open ~/.bashrc and add export PATH=/home/.../pintos/src/utils:$PATH to the last line.
Reload terminal by running source ~/.bashrc
Run pintos with pintos run alarm-multiple
I have this spec file for my open source shell scripting sdk https://github.com/icasimpan/shcf/blob/packagebuilds/packagebuilds/rpm/shcf.spec
I build it as follows:
rpmbuild --target noarch -bb shcf.spec
Now, this builds fine, however, the output rpm's content has duplicated path "shcf/shcf", like:
/opt/icasimpan/shcf/shcf/***
This is the prep area
%prep
echo "BUILDROOT = $RPM_BUILD_ROOT"
mkdir -p $RPM_BUILD_ROOT/opt/icasimpan/shcf
cd $RPM_BUILD_ROOT/opt/icasimpan/shcf
git clone --branch 0.3.1 https://github.com/icasimpan/shcf.git
exit
At first sight, it's obviously due to the clone done to "$RPM_BUILD_ROOT/opt/icasimpan/shcf". However, if I modify the clone line to say
git clone --branch 0.3.1 https://github.com/icasimpan/shcf.git .
rpm build will fail due to unpackaged files.
Is there anything I'm missing?
Thanks in advance.
As an example of my problem let's use libqb (https://github.com/ClusterLabs/libqb).
To install it from the sources I do the next:
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
The problem is that the version in "/usr/lib/pkgconfig/libqb.pc" is UNDEFINED.
I suspect that I have to pass a parameter to ./configure but I don't know which one.
I do it on Debian.
There are two ways to get sources:
use git ($ git clone)
download sources in an archive
In case of using git, you won't see this problem, because it uses git to get correct version of sources during build.
In case of archive you have to create .tarball-version file in the top dir and put there version you want. For example: $ echo "0.17.0" > .tarball-version.
P.S.: there will be created .version file during build. So, if you did any changes to .tarball-version then you have to remove .version file.