I am trying to update to the latest version of SQLite and when sourcing the package I get error. couldn't find procedure Sqlite3_Init
The version of SQLite that I had before was installed using teacup.
I have tried to follow the steps but I have never really compiled anything really, Any help would be appreciated!
tried compiling sqlite-autoconf-3280000.tar.gz
You've got the right download. The Tcl extension is in the tea folder inside there; the README in that directory has instructions for what to do.
Alternatively, full source distributions of Tcl 8.6 also include SQLite along with a few other extensions (though there's a cut-down source distribution that doesn't).
Related
I am in the process of developing an R package with external source code that takes a long time to compile. While compilation time isn't a big problem for a one-off installation, I have to routinely reinstall the package to test new additions. Is it possible to prevent re-compiling the source code if there haven't been any changes to it?
I don't necessarily need this to be automated, but I can't figure out a manual solution either. As my source code is in Rust, the following serves as the most representative example I have (note that it requires Rust cargo to be installed):
git clone https://github.com/r-rust/hellorust
Rscript -e "devtools::install('hellorust', quick = TRUE)"
When I run the above, I see that the hellorust.so file has been created in the src directory, but how do I make devtools::install() use this file rather than recompile everything? It doesn't seem like devtools::install(quick = TRUE) or devtools::install(build = FALSE) are meant for this...
Alternatively, is it possible to achieve the desired behavior on the Rust side of things? I don't understand why cargo would recompile everything if there haven't been any changes and the target directory is still there. That said, I'm quite new to Rust and compiled languages in general so my understanding of the broader concepts involved here is unfortunately quite limited...
I would also be interested to learn if there is a better way to test R packages during development than manually reinstalling them.
Based on the comments by r2evans, the final answer seems to be that this isn't what devtools::install is for.
As per the devtools documentation, there are three main tools for "frequent development tasks":
load_all
document
test
Of these load_all "simulates installing and reloading your package, loading R code in R/, compiled shared objects in src/ and data files in data/". By default, load_all() will not recompile source code in src/ (unless the recompile flag is set to true).
So the answer is to use load_all as opposed to install during package development and manually control when to compile the source code using something like devtools::compile_dll.
I got GPS community edition, but it can't create GtkADA projects. So I cloned and built GtkADA using the GPR projects, but when I try to open a GtkADA example or start a new GtkADA project from GPS, I get the error:
unknown project file: "gtkada"
Edit:
Windows 10 x64, trying to "get into" Ada.
Edit2: Got farther.
I tried setting GPR_PROJECT_PATH to include the following paths:
drive:\gitrepos\gtkada\src
drive:\gitrepos\gtkada\src\lib
drive:\gitrepos\gtkada\src\lib\gtkada\relocatable
drive:\gitrepos\gtkada\src\obj
I am trying to run the base widget example, downloaded from https://www.adacore.com/code-samples for GtkAda.
Now I get:
file "gdk-gc.ads" not found
Indeed I cannot find this file in either the GNAT or GtkAda repo.
Edit2: I am still having difficulty.
Edit3: Other people on freenode#ada were saying the OpenGL part of GtkAda is broken, and many people simply disable it.
I had the same problem and couldn't find Gtkada (about gdk-gc.ads I can't help you).
Therefore I wrote the relative path from my project file to GtkAda.gpr
with "../../lib/gnat/gtkada"; -- on linux (I installed my gtkada into my gnat folder)
In your case, if you installed it on C:\GtkAda you should search for GtkAda.gpr, then copy paste its path.
(Not sure if absolute path works. You will maybe need to tell your project to search outside of its folders by using ".." until you are in C:, then paste your path.)
PS: Adacore provides a GtkAda installer for windows: https://www.adacore.com/download/more
Edit: On my windows, I simply used the installer then
with "gtkada" worked.
I want to use sqlite with the json extension so I've installed it with homebrew. When I run which sqlite though, the one that is being used is the anaconda install. If I try and use pythons sqlite library I have the same issue. It's linked to the Anaconda version and the JSON functions aren't available. How do I replace this with the brew version? Brew provided some values when I installed sqlite but I don't know if I need them or how they are used.
LDFLAGS: -L/usr/local/opt/sqlite/lib
CPPFLAGS: -I/usr/local/opt/sqlite/include
PKG_CONFIG_PATH: /usr/local/opt/sqlite/lib/pkgconfig
Sqlite installed by Homebrew is keg-only, which is not linked to /usr/local/... .
This is because system already have older version of sqlite3.
If you really want to invoke Homebrew's sqlite binary, specify full path as below.
$ /usr/local/opt/sqlite/bin/sqlite3
(All Homebrew package is symlinked under /usr/local/opt)
I'm not so familiar with python, but AFAIK sqlite is statically linked to python executable.
In other words, maybe you have to build python from source to use with Homebrew's sqlite.
The answer by equal-l2 is correct. Also, the comment under it by Keith John Hutchison.
But, since they are from quite a few years ago and there is not an officially accepted answer still, here you go as this still catches you off-guard in 2022.
To fix, add this to your ~/.zshrc file and you should be good:
export PATH=/usr/local/opt/sqlite/bin:$PATH
Remember to have $PATH at the end like the above and not at the beginning like so:
export PATH=$PATH:/usr/local/opt/sqlite/bin
as the shell traverses your $PATH for command completion left to right and stops at the first instance found and obviously you want your desired path to be considered first.
Also, you might need to run source ~/.zshrc and rehash if you want it to just start working in the same terminal session.
I have installed SAS Studio in OSX via virtualBoxVM. All seems working except making R run from SAS, which is what I am looking for.
Running :
proc options option=RLANG;
run;
I get
SAS (r) Proprietary Software Release 9.4 TS1M3
NORLANG Disables SAS from executing R language statements.
Changing the Autoexec file to:
-RLANG
-config "/Users/me/SAS/SAS_Base_OpenSrcIntegration/sasv9.cfg"
does not make the trick. Neither changing configuration files...
Any ideas on how to activate RLANG in OSX?
I believe you need to set the RLANG option in the .cfg file, not the autoexec.sas file. Once you do that, restart the SAS server so that it picks up the config change.
I don't have a configuration like this. Let me know if you have problems.
EDIT:
You can find the default configuration file in
*SASHOME*/SASFoundation/9.4/nls/sasv9.cfg
The exact location will depend on where SAS is installed, version, etc. In general, look for the NLS folder under SASFoundation.
I am trying to compile Network.HTTP (http://hackage.haskell.org/package/network) on win32/cygwin. However, it does fail with following message:
Setup.hs: Missing dependency on a foreign library:
* Missing (or bad) header file: HsNet.h
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
Unfortuntely it does not give more clues. The HsNet.h includes sys/uio.h which, actually should not be included, and should be configurered correctly.
Don't use cygwin, instead follow Johan Tibells way
Installing MSYS
Install the latest Haskell Platform. Use the default settings.
Download version 1.0.11 of MSYS. You'll need the following files:
MSYS-1.0.11.exe
msysDTK-1.0.1.exe
msysCORE-1.0.11-bin.tar.gz
The files are all hosted on haskell.org as they're quite hard to find in the official MinGW/MSYS repo.
Run MSYS-1.0.11.exe followed by msysDTK-1.0.1.exe. The former asks you if you want to run a normalization step. You can skip that.
Unpack msysCORE-1.0.11-bin.tar.gz into C:\msys\1.0. Note that you can't do that using an MSYS shell, because you can't overwrite the files in use, so make a copy of C:\msys\1.0, unpack it there, and then rename the copy back to C:\msys\1.0.
Add C:\Program Files\Haskell Platform\VERSION\mingw\bin to your PATH. This is neccesary if you ever want to build packages that use a configure script, like network, as configure scripts need access to a C compiler.
These steps are what Tibell uses to compile the Network package for win and I have used this myself successfully several times on most of the haskell platform releases.
It is possible to build network on win32/cygwin. And the above steps, though useful (by Jonke) may not be necessary.
While doing the configuration step, specify
runghc Setup.hs configure --configure-option="--build=mingw32"
So that the library is configured for mingw32, else you will get link or "undefined references" if you try to link or use network library.
This combined with #Yogesh Sajanikar's answer made it work for me (on win64/cygwin):
Make sure the gcc on your path is NOT the Mingw/Cygwin one, but the
C:\ghc\ghc-6.12.1\mingw\bin\gcc.exe
(Run
export PATH="/cygdrive/.../ghc-7.8.2/mingw/bin:$PATH"
before running cabal install network in the Cygwin shell)