Request for apophenia in manjaro repostiory


Using pacman and yaourt I couldn’t find the package apophenia. This package is a library for dealing with materix, vectors, and databases in C. One can use this library for statistical analysis in C. (

It would be great if one could add a package of the library to the repository.


i’ve moved this post to the package request category.


beat me to it, i also edited the title @nownuri . you should present a description of what apophenia is in your original post and why it should be added.


theres a github page for apophenia that seems easy enough to to install.

in terminal:
sudo pacman -S make gcc gsl sqlite git
git clone
cd Apophenia
git checkout pkg
sudo make install


Looks like it wouldnt be too hard to write an AUR package for it :

@dglt BAH :persevere:

Well anyhoo … this line is enjoyable:

PS: Lawyers, please note that a file named COPYING in the install/ directory describes how this package is licensed under GPLv2.


great minds think alike :roll_eyes:


Something like this might work … I’m away from home, so maybe someone wants to give it a shot


(as with all AUR things we assume you have base-devel installed)

mkdir -p ~/.builds/apophenia && cd ~/.builds/apophenia


And put this in it:

# Maintainer: cscs
# Good Luck

pkgdesc="An open statistical library for working with data sets and statistical or simulation models"
depends=('sqlite' 'gsl')
makedepends=('git' 'make')

build() {
  cd ${srcdir}/${_gitname}
  cd ${srcdir}/${_gitname}/${_gitname}-${pkgver}

package() {
  make -C ${srcdir}/${_gitname}/${_gitname}-${pkgver} DESTDIR=${pkgdir}/ install

Save and exit with Ctrl+X

makepkg -sri


What’s the point of using _gitname when it’s the same as the pkgname?


If it wouldnt stay the same.
For example this is just a test, and while gitname will be static, maybe if this moves to AUR it would be apophenia-stable apophenia-git and so on. So the package name can change without touching the rest of the (albeit very short) code.
[besides it was already there from the last pkgbuild I had made :wink:]


Hmm, yes. Future-proofing, I see. Good show, old chap.

(I was just watching Doctor Who, so you’ll have to read that in William Hartnell’s voice :smile:).


sorry i cant help more, but i dont even know what that program does. links on that github link may help.

∙ Find detailed setup instructions and some troubleshooting notes at .


in terminal:
sudo pacman -S make gcc gsl sqlite git
git clone
cd Apophenia
git checkout pkg
sudo make install

I tried the above before posting this request. After the ‘sudo make install’, when a program using the library is compiled and runs, then the following error occurs.
‘error while loading shared libraries: cannot open shared object file: No such file or directory’
The file was found in my /usr/local/lib but was not recognized properly. I thought this has something to do with environmental variable setting or the path wherhe the so files are copied. In addition, I tried installing the library in home directory as explained in the readme file, but the target directory was not set with ‘cofigure’


Please attempt to undo what you’ve done, then go back to my instructions above. I had a missing piece before, but I edited and it should work now - it just successfully installed on my system.

[I have no way of testing it or anything but here it is:]


If a number of people confirm it works well, we can move to submitting it to the AUR so others can use it easily too.


executable files are installed but the libraries are not. Can you please try compiling the following example program?

#include <apop.h>
//Your processes are probably a bit more complex.
double process_one(gsl_rng *r){
    return gsl_rng_uniform(r) * gsl_rng_uniform(r) ;
double process_two(gsl_rng *r){
    return gsl_rng_uniform(r);
int main(){
    gsl_rng *r = apop_rng_alloc(123);
    //create the database and the data table.
    apop_table_exists("samples", 'd'); //If the table already exists, delete it.
    apop_query("create table samples(iteration, process, value); begin;");
    //populate the data table with runs.
    for (int i=0; i<1000; i++){
        double p1 = process_one(r);
        double p2 = process_two(r);
        apop_query("insert into samples values(%i, %i, %g);", i, 1, p1);
        apop_query("insert into samples values(%i, %i, %g);", i, 2, p2);
    apop_query("commit;"); //the begin-commit wrapper saves writes to the drive.
    //pull the data from the database, converting it into a table along the way. 
    apop_data *m  = apop_db_to_crosstab("samples", "iteration","process", "value");
    gsl_vector *v1 = Apop_cv(m, 0); //get vector views of the two table columns.
    gsl_vector *v2 = Apop_cv(m, 1);
    //Output a table of means/variances, and t-test results.
    printf("\t   mean\t\t   var\n");
    printf("process 1: %f\t%f\n", apop_mean(v1), apop_var(v1));
    printf("process 2: %f\t%f\n\n", apop_mean(v2), apop_var(v2));
    printf("t test\n");
    apop_data_show(apop_t_test(v1, v2));
    apop_data_print(m, "the_data.txt");

For compilation you need the following options.

-lapophenia -lgsl -lgslcblas -lsqlite3


oh, you just mean use it as a makefile…mk. I see what you mean.


I usually use a makefile but for a test using gcc command with those cflags would be sufficient. I think this installation procedure should include a way of setting environmental variables. I managed to do it on Ubunto, but not on Majaro yet. Strangely, ./configure --target=path does not work either on Manjaro, so one cannot point a target non-root directory.


I think thats the issue I’m running into. I’m pretty sure I’ve follwoed the build instructions they give … but I’m always ending up in the same spot with a few executables and like 3 libs. I see it compile all the other libs … but they dont want to go anywhere. :thinking:
[I thought I fixed the pkgbuild … but no, and tried a few ways…]
@Lolix if you have some spare time could you give us/me some pointers here?


I’m tired so I’ll be terse

I’ve got to build the package, somewhat, docs and examples seems that need to be installed manually. I found some things quirky for packaging

Program is compiled with prefix /usr/local (should be avoided, Arch guidelines) instead of /usr, can be this the issue? Can it be modified passing --help to ./configure is ignored

It is packaged for Debian and Ubuntu and there are some patches

$ gcc -o apo apo.c -lapophenia -lgsl -lgslcblas -lsqlite3

$ l
totale 24
-rwxr-xr-x 1 fabio fabio 17560 22 gen 23.32 apo
-rw-r–r-- 1 fabio fabio 1497 22 gen 23.31 apo.c

$ ./apo
./apo: error while loading shared libraries: cannot open shared object file: No such file or directory

$ ldd apo (0x00007ffd1c9c6000) => not found => /usr/lib/ (0x00007f6d09895000) => /usr/lib/ (0x00007f6d09656000) => /usr/lib/ (0x00007f6d09530000) => /usr/lib/ (0x00007f6d0936c000) => /usr/lib/ (0x00007f6d091e7000) => /usr/lib/ (0x00007f6d091e0000) => /usr/lib/ (0x00007f6d08fc9000) => /usr/lib/ (0x00007f6d08fa8000)
/lib64/ => /usr/lib64/ (0x00007f6d09d64000)

$ sudo updatedb
$ locate

$ LD_PRELOAD=/usr/local/lib/ /home/fabio/Dev/pkg_make/NOT/apo
	   mean		   var
process 1: 0.259623	0.051570
process 2: 0.497805	0.083759

t test
1st avg: 0.259623; 1st std dev: 0.227089; 1st count: 1000.
2st avg: 0.497805; 2st std dev: 0.289412; 2nd count: 1000.
t-statistic: -20.4642.
  mean left - right   -0.238181
        t statistic    -20.4642
                 df        1998
    p value, 1 tail 5.89207e-85
 confidence, 1 tail           1
    p value, 2 tail           0
 confidence, 2 tail           1

Any ideas?


I’m sorry that the source code configuration is not compatible with Manjaro. So it would be difficult to install the library using yaourt?


is generally recommended not to use yaourt as not fully supported anymore
yay or trizen is usually suggested for KDE

Manjaro WiFi switch disappeared after installation of yaourt