Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: MrToga on April 14, 2022, 06:22:09 AM
-
Hello i'm a newbie on tiny linux and I'm triyng to create a lamp environment on my rpi 2 with piCore v13.x and i do not find the apache, mariadb and php extension on the repo.
Can someone help me please
Thanks in advance.
-
Those extensions do not exist in the repo - you would need to compile them.
-
Thank you for your response
How can i compile them (sorry i'm very new to linux) ?
-
If you look here: http://www.tinycorelinux.net/10.x/x86_64/tcz/src/php/
..there’s an example build script for php for x86_64 that could be adapted..
-
I read the build script(what I could)but were can i execute this? (I have installed gcc.tcz and compiletcz i don't know if this can be of any use)
-
I have compiled php-7.4.0.tar.xz(this package can be find on the link you sent me earlier) on piCore but when i run the configure script, he don't find the libxml-2.0 package.
So i tried to install the lixml2.tcz in the repo and create a symbolic link with the libxml2.so into libxml-2.0.
But he still doesn't find the package.
Any tought?
-
You need to load the libxml2-dev extension.
-
It works ! thank you I also needed to load SQlite3-dev.tcz and now i was thinking if I import the apache2.4 extension from the piCore v9 into mine.
Is it possible or do i need to do the same thing as I did(if you have a link for the apache2.4 it would be nice).
-
Hi MrToga
A build script for Apache can be found here:
http://tinycorelinux.net/8.x/armv7/tcz/src/apache2.4/
-
Thanks.
But is it ok if i use this extension for piCore v8 on my piCore v13.x?
-
I tried to compile apache with the link you send but when i ./configure i get an error that i don't have APR-util so i tried to install APR-util with the same link you send me.
But now when I ./configure the directory apr-util i have an error that said APR could not be located. Please use the --with-apr option but when i use the --with-apr piCore don't find any .shell. Am I missing a file?
-
Do you need apache ?
I think it easier to make/compile a nginx extension.
And with PHP-FPM.
-
Hi MrToga
... get an error that i don't have APR-util so i tried to install APR-util with the same link you send me. ...
No, install apr-util-dev.tcz from TC13:
tce-load -wi apr-util-dev.tcz
-
Hello guys and thank for the help so far.
So when ./configure it worked fine but after reading the INSTALL file then told us to use the command make after ./configure but i get this error :
/bin/sh: /usr/local/build-1/libtool : not found
So i checked if libtool is there and it is.
Any tought ?
-
I’d guess you are missing perl5, python or bash.
-
Yes I was missing bash.
Thanks
-
I get another error in my make command that said :
/bin/sh: can't open '/home/tc/apacheBuild/httpd-2.4.20/shlibtool' : No such file or directory.
Am I missing another extension ?
-
OK I just needed to ./configure and then make
-
How can i create a extention .tcz with apache.I saw a video on how to create a extension (link : https://www.youtube.com/watch?v=yRm-YRuLFio) but my question is how do I keep all my compiled apache because with the command make install apache's file are everywhere. Do I need to move all the apache files into one directory ?
-
Hi MrToga
The ,build script found here handles ./configure, compiling, and packaging for you:
http://tinycorelinux.net/8.x/armv7/tcz/src/apache2.4/
Download these files from the link:
apache2.4.build 08-Jul-2016 14:02 4656
apache2.4.ins 31-May-2016 06:36 492
httpd-2.4.20.tar.gz 02-May-2016 02:38 8299011
httpd-2.4.23.tar.bz2 06-Jul-2016 08:11 6351875
httpd.conf 19-Oct-2015 02:00 18552
The script is currently set up to compile version 2.4.23. Edit the script and change that to 2.4.20 (2 places)
if you want the older version for some reason.
Make the following 2 scripts executable:
chmod 775 apache2.4.build
chmod 775 apache2.4.ins
This line in the .build script tells make where to install the files so they are not scattered all over the place:
make install DESTDIR=$TMPDIR
-
Hi it worked thank you.
So now I was wondering since I've got apache2.4.tcz if i could put this file in my /mnt/mmcblk0p2/tce/optimal directory but I saw a <extension name>.tcz.dep and i don't have it,
It is okay or do i really need this extension to make apache permanent on my rasp.
-
OK so I run the script i put apache2.4.tcz (also apache2.4-dev.tcz and apache2.4-doc.tcz) in /mnt/mmcblk0p2/tce/oprimal and in the onboot.lst file but I don't find the file that run my apache server.
Any tought ?
-
update :
I found that in the script there are 2 line in the .build that are commented in the section service script :
#mkdir -p $TMPDIR/usr/local/etc/init.d
#cp apache2.4.srv $TMPDIR/usr/local/etc/init.d/apache2.4
So i tried to uncomment them and run the script but I don't find the etc repertory in /tmp/tcloop/apache2.4/usr/local/ .
Am I searching in the wrong area?
-
Hi MrToga
I found that in the script there are 2 line in the .build that are commented in the section service script : ...
You can comment those lines out again.
The file it refers to is a systemd service script and does not exist. Tinycore does not use systemd.
... I saw a <extension name>.tcz.dep and i don't have it, ...
That is the dependency file for apache. It is used by the operating system to load other extensions Apache needs
in order to run.
Place this file in your /mnt/mmcblk0p2/tce/optional directory.
http://tinycorelinux.net/8.x/armv7/tcz/apache2.4.tcz.dep
Run this command:
tce-load -w apr-util openssl pcre
... (also apache2.4-dev.tcz and apache2.4-doc.tcz) in /mnt/mmcblk0p2/tce/oprimal and in the onboot.lst ...
You don't need those to run apache.
Reboot your RPi and then try starting apache as mentioned here:
http://tinycorelinux.net/8.x/armv7/tcz/apache2.4.tcz.info
-
Hi Rich,
After I've done what you told me I try to use the .info and saw the command to start apache but when I try the command I get this error :
sudo apachectl -k start
sudo: apachectl: command not found
-
Hi MrToga
Does this command find apachectl:
ls -l /usr/local/sbin/apachectl
Also, the build script should have created apache2.4.tcz.list. Please attach a copy of that to your next post.
-
ls -l /usr/local/sbin/apachectl don't find apachectl
And in the apache2.4.tcz.list I don't find apachectl neither
-
Hi MrToga
Somewhere an error occurred and and nothing was built. This is what that file should look like:
http://tinycorelinux.net/8.x/armv7/tcz/apache2.4.tcz.list
Run this:
ls -l /usr/local/tce.installed > installed.txt
Attach installed.txt to your next post.
-
Here
-
Hi MrToga
I suspect some -dev extensions may be missing, possibly openssl. Look in the build directory for a .log file.
It's probably called config.log. Attach that to your next post.
-
I think I was missing the openssl-dev because after installing it i tried a ./apache2.4.build and it seem longer than the last attempts with the .build
I will tell you after it's finished
-
Hi MrToga
Hopefully that's the last piece of the puzzle. :)
-
Ok so it's finished but I still miss something.
Because my apache2.4.tcz.list looks like this now
-
Hi MrToga
I suspect a compilation error, maybe a missing .h file. Lets see if running the build script like this catches the error:
./apache2.4.build > build.txt 2>&1
Attach build.txt to your next post.
-
Hi
Here's the build.txt (was too big for the website so it's compressed)
-
I found something while doing the compilation of apache manually I get a few error that said :
ab.c:(.text.startup+0x80c): undefined reference to `SSLv2_client_method'
/usr/local/bin/ld: ab.c:(.text.startup+0x8b8): undefined reference to `CRYPTO_malloc_init'
collect2: error: ld returned 1 exit status
And this are the same errors as in the file build.txt.
It's strange because i've done the compilaiton manually earlier and it worked.
How can I correct that?
-
Hi MrToga
After some searching it appears the issue is openssl changed:
----- Snip -----
OpenSSL 1.0.2 and earlier provided CRYPTO_malloc_init:
----- Snip -----
OpenSSL 1.1.0 and later do not appear to provide CRYPTO_malloc_init:
----- Snip -----
Found here:
https://stackoverflow.com/a/40606758
openssl changed from 1.0.2j:
http://tinycorelinux.net/8.x/armv7/tcz/openssl.tcz.info
to 1.1.1l:
http://tinycorelinux.net/13.x/armv7/tcz/openssl.tcz.info
I would say you should try a newer source package. andyj maintains apache for the x86 repositories and he is
currently using version 2.4.46. I would follow his lead. The apache source packages can be found here:
http://archive.apache.org/dist/httpd/
I suggest downloading this:
http://archive.apache.org/dist/httpd/httpd-2.4.46.tar.bz2
The script is currently set up to compile version 2.4.23. Edit the script and change that to 2.4.46 (2 places)
Make sure the following extensions are installed:
apr-util-dev expat2-dev gdbm-dev openssl-dev pcre-dev
Try running the build script and see what pops up.
-
Hi Rich,
So after using the script my apache2.4.tcz.list look like this but now the script doesn't create the apache2.4.tcz
-
Hi MrToga
At first glance, that appears to be a successful build. Do you have squashfs-tools installed?
-
Yes it's already install but the error is :
mv : can' rename '../apache2.4.tcz/usr/local/lib/*.a' : No such file or directory
mv : can' rename '../apache2.4.tcz/usr/local/lib/*.ala : No such file or directory
mv : can' rename '../apache2.4.tcz/usr/local/lib/*.exp' : No such file or directory
mv : can' rename '../apache2.4.tcz/usr/local/lib/pkgconfig' : No such file or directory
mksquashfs: error while loading shared libraries: liblzo2.so.2: cannot open shared object file: no such file or directory
mv : can't rename '../apache2.4.tcz' : No such file or directory
md5sum : can't open '../apache2.4.tcz' : No such file or directory
same error goes for apache2.4.dev and .doc
Sorry I need to go have a nice day Rich and thanks for the help so far :)
-
Hi MrToga
... mksquashfs: error while loading shared libraries: liblzo2.so.2: cannot open shared object file: no such file or directory ...
lzo.tcz is a dependency of squashfs-tools.tcz and should have been loaded with squashfs-tools:
http://tinycorelinux.net/13.x/armv7/tcz/squashfs-tools.tcz.dep
Do you have a squashfs-tools.tcz.dep in your tce/optional directory whose contents match the above link?
-
Hi Rich,
My squashfs-tools.tcz.dep have the same content than in the link
-
Update :
It work I think I didn't install squashfs-tools.tcz but now apache is working and it's persistent.
-
Hi MrToga
So, are you saying the build script now completes correctly and creates the apache2.4.tcz file?
-
Hi Rich,
Yes i've got apache2.4.tcz an it's persistent on my rasp
-
Hello everyone,
I'm triyng to make php persistent on my rasp.
After I have configure and compile php I have Install php in a folder I have created just for this and now i was wondering if anyone know what folder and wich file to compress with squashfs-tools to have a php7.tcz php7-dev.tcz and php7-doc.tcz
I'am using this version of php http://tinycorelinux.net/8.x/armv7/tcz/src/php7/
-
Update :
Juanito link a script to build php for x86_64 and I was wondering how can i adapt this script fo piCore or is there an existing php script for piCore ?
(link : http://www.tinycorelinux.net/10.x/x86_64/tcz/src/php/build-php.sh)
Thanks in advance.
-
Hi MrToga
Looking at what andyj did for TC8 x86_64:
----- Snip -----
EXT=php7
TCZ=/tmp/$EXT/TCZ
----- Snip -----
make
----- Snip -----
make install INSTALL_ROOT=$TCZ-dev
----- Snip -----
He tells the make process where to install the results.
After that, he proceeds to remove what does not belong in -dev into other extensions.
Found here:
http://www.tinycorelinux.net/8.x/x86_64/tcz/src/php7/build-php.sh
That build script is x86_64 specific so I would not try to run it directly.
Try adding this after make -j4 in your build script:
EXT=php7
TCZ=/tmp/$EXT/TCZ
make install INSTALL_ROOT=$TCZ-dev
If that works, you can try copying everything after make install INSTALL_ROOT=$TCZ-dev from andyj script.
-
Hi Rich
I found a php.config script (here :http://www.tinycorelinux.net/8.x/armv7/tcz/src/php7/php7.config) but when I run it I get this error
It said that I don't have apxs but I already have the apx command but I don't know where to find it.
-
Hi MrToga
According to this, apxs should be in the apache extension you built:
http://tinycorelinux.net/8.x/armv7/tcz/apache2.4.tcz.list
Also, is perl5.tcz loaded?
-
Yes perl5.tcz is loaded and I have apxs
-
I think apxs is in another folder than /usr/local/bin because in this folder i don't find apachectl neither wich work
-
Nevermind I found apxs it in the usr/local/bin folder
-
Hi MrToga
I think apxs is in another folder than /usr/local/bin ...
If it's present, this will tell you where it is:
which apxs
-
Hi Rich,
I found it using which apxs and it return :
/usr/local/bin/apxs
-
Update :
I found the error (here : https://stackoverflow.com/questions/43640200/there-is-a-error-as-apxs-not-found-and-apache-is-not-built-when-i-buildconfigur), I needed to add a line in the apache build script (link : http://tinycorelinux.net/8.x/armv7/tcz/src/apache2.4/apache2.4.build) in
./configure \
--with-apxs
-
Hello guys,
I finally have php7 persistent but I tried to run php code on my apache server but apache doesn't interpret php
How can I fix that?
-
Hi MrToga
I know nothing about Apache or PHP, but I do know this, secrecy is not a good strategy when seeking assistance. You
are literally our eyes since we can not see your screen so we don't know what you've tried or what kind of errors
may have been displayed.
Possible information to provide may include but is not limited to:
Post your php code.
Tell us where you placed the file containing that code.
Changes you made to http.conf.
Changes you made to php.ini.
Changes you made to any other .conf/.ini files.
Error messages you received.
This is the .info file for an old php5 extension. It has some notes on apache that might be useful:
http://tinycorelinux.net/10.x/x86/tcz/php5.tcz.info
-
Hi Rich,
I tried to do a make install INSTALL_ROOT=/tmp/php7 and now i'm searching in this repertory and I don't find php.ini nor libphp5.so needed for interpretation.
(link here :https://www.php.net/manual/fr/install.unix.apache2.php)
I also used this script to compile.
-
Hi MrToga
See if the attached file runs without errors.
If it does, attach the php7.list file to your next post.
If it doesn't, post the errors.
-
Hi Rich,
After I run php7.config I get an error that libmcrypt was not found so I compiled the extension using this link ( http://www.tinycorelinux.net/8.x/armv7/tcz/src/libmcrypt/)
and then I get some error from openssl using php7.config so I put the result in build.txt .
-
Hi MrToga
... I get an error that libmcrypt was not found so I ...
Copy libmcrypt.tcz , libmcrypt-dev.tcz , and libmcrypt-dev.tcz.dep from:
http://tinycorelinux.net/8.x/armv7/tcz/
Then:
tce-load -i libmcrypt-dev
This is the same version being used in the TC13 x86 and x86_64 repositories.
-
Hi,
After I have dowloaded libmcrypt.tcz libmcrypt-dev.tcz and libmcrypt-dev.tcz.dep and add it in /mnt/mmblk0p2/tce/optional directory I tried to use the php7.config script but I get a bunch of error from openssl.c.
Here is the php7.config script and the build.txt (the return of the sript).
Any thougths ?
-
Did you load the libmcrypt-dev extension?
-
Hi juanito,
Yes libmcrypt-dev is loaded
-
You could try loading coreutils to remove some of the errors.
Which version of openssl are you using - it looks like php is looking for a newer version?
-
I'm currently using openssl 1.1.1
-
Hi,
After searching I found out that in the ./configure help openssl need to be in version 0.9.8 but the problem is that I need this version of openssl for my apache
Here the file from ./configure --help
-
Which version of php are you trying to compile - the versions in the x86_64 repo use openssl-1.1.1
-
Hi MrToga
After I have dowloaded libmcrypt.tcz libmcrypt-dev.tcz and libmcrypt-dev.tcz.dep ...
I believe the build.txt you attached (reply #62) is the same file you attached to reply #60 and not a fresh file.
The new php7.config file shows you removed --enable-so option but the build.txt file you posted still contains this:
configure: WARNING: unrecognized options: --enable-so
I also ran a diff on the 2 build.txt files and they are identical.
... openssl need to be in version 0.9.8 ...
No, it says:
--with-openssl=DIR Include OpenSSL support (requires OpenSSL >= 0.9.8)
That means 0.9.8 is the minimum version, so 1.1.1 is fine.
-
Hi,
I'm compiling the php version of raspberry PI (here : http://www.tinycorelinux.net/8.x/armv7/tcz/src/php7/ ) and also I repost the same file because after compiling php7 I'll still have the same error than the last one sorry if it's disturb you .
But I found something in the build file:
/home/tc/php-7.0.8/ext/openssl/openssl.c:1923:15: error: invalid use of incomplete typedef 'X509_EXTENSION' {aka 'struct X509_extension_st'}
1923 | p = extension->value->data;
So with this I search in /usr/local/include/openssl/ossl_typ.h to see if the funxtion x509 is here.
-
php-7.4.14 builds on an RPi3 against openssl-1.1.1 and apache-2.4.46..
-
Hi MrToga
Try changing this:
--with-openssl \
To this:
--with-openssl-dir=/usr/local \
--with-openssl=shared,/usr/local \
in your php7.config file.
Also make sure openssl-dev is loaded.
-
Hello guys,
After I wrote the commands Rich said I still have the same error, and I also tried a new version of php (php7.4.29.tar.xbz link:https: //www.php.net/downloads ) but in this new version he doesn't fin oniguruma during the comilation.
Here is the build.txt from the php7.0
-
I think you will need to build libonig and use php-7.4.14 - this is what I did on piCore-13.1 and it worked.
-
Hi juanito,
Where can I foud php 7.4.14 and libonig ?
-
I compiled it from source: http://tinycorelinux.net/12.x/x86_64/tcz/src/php/
-
..and onig-6.9.6 from here: http://tinycorelinux.net/11.x/x86_64/tcz/src/libonig/
-
Hi juanito,
After compiling onig I tried to compil php7.4.14 with the same php7.config script but during the make I got this error /usr/local/include/ap_hooks.h:40:10: fatal error: apr_hooks.h: no such file or directory
But I found this file in /tmp/tcloop/apr-util-dev/usr/local/include/apr-1/apr_hooks.h
Any tought ?
-
Update : I didn't set apr-util onboot
Now i Find the file in the correct directory
-
Hi,
After I succefully compiled php-7.4.14 with php7.config I still can't interpret php on my apache server and I also have in /usr/local/apache2/modules/ my files named libphp7.so for the interpretion but still can't interpret.
I used this link for help : ( https://www.php.net/manual/fr/install.unix.apache2.php )
Any toughts?
-
Do you get an error message?
-
Not at all
Just for the make install INSTALL_ROOT= so I just comment them on the script
-
Hi MrToga,
A few days ago i more or less ran into the same challenges that you face with missing apache extension for 13.x.
After some tinkering i decided to move back to a 9.x version of piCore. That version does have apache, php & maria and you can install them from the app in the desktop enviroment. They now run fine on my ZeroW ;)
Maybe this is a solution four you as well, good luck ;)
-
I also have in /usr/local/apache2/modules/ my files named libphp7.so for the interpretion but still can't interpret.
Does this give an error: ldd /usr/local/apache2/modules/libphp7.so
-
Hi,
After I run your command i've got this but it doesn't return an error
-
Hi eSPee,
I don't want to go on a lower version of piCore because I really need firefox and in the piCore9.x it doesn't exist
-
After I run your command i've got this but it doesn't return an error
That looks OK.
I know nothing about apache/php, so it's difficult to troubleshoot. I would guess that there is a way to start apache that gives verbose error messages, which might help.
You could also compare your build files to those in the 9.x repo (*.tcz.list) to see if you are missing something.
-
Update :
It worked !
I just needed to add in the httpd.conf files this command :
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
-
Hi,
Now I was wondering if it exist a script to make onig persistent because I didn't find any script nor any make install INSTALL_ROOT= for onig
I'm using this version of onig : http://tinycorelinux.net/11.x/x86_64/tcz/src/libonig/
-
see attached
-
Thanks juanito,
But in the file you attached are you sure you can remove files by doing this
vi files [remove those that do not belong]
Why don't we use rm here ?
-
The file named "files" contains a list of files created after the timestamp "mymarker", you need to edit the list to remove the files that are not required.
-
Do I need to do it manually or it's in the next command ?
-
Ok so i need to remove all the files that doesn't belong to the extension
Am I right?
-
affirmative - if you are going to submit an extension, you need to make libonig and libonig-dev
-
what files are needed for an extension-dev and an extension
Because I don't see the difference between them
-
Hi MrToga
vi files [remove those that do not belong]
vi is the name of an editor that can be used from the command line. I prefer a GUI based editor myself.
files is the name of a file that contains a list of file names. files.txt or files.list would have been more obvious.
You need to manually remove any file names from that list that don't belong to the extension.
-
Ok so my fault but I found out you can use make install DESTDIR=$PATH for onig and i get this tree :
onig/
usr/
local/
bin/ include/ lib/
Onig-config oniggnu.h oniguruma.h (.a .so .la and pkgconfig directory)
What I need to put in my onig-dev and my onig ?
-
Hi MrToga
Congratulations on finding DESTDIR=$PATH. You just made your life easier.
The following belong in -dev:
usr/local/bin/onig-config
usr/local/include/*
usr/local/lib/*.a
usr/local/lib/*.la
usr/local/lib/pkconfig/*
Something like this:
http://tinycorelinux.net/10.x/x86/tcz/libonig-dev.tcz.list
-
Hi,
I'm trying to install mariadb with this version (http://www.tinycorelinux.net/8.x/armv6/tcz/src/mariadb/ ) and now I'm trying to compile it but when I do the cmake .
I get an error (Attached file) that said that I don't have CURSE so i tried to install ncurse-dev (link : http://tinycorelinux.net/13.x/armv6/tcz/) on my rpi but still have the same error.
Any toughts ?
-
Earlier versions of cmake had a lot of problems detecting ncurses.
You can check if you have ncurses and ncurses-dev loaded with: tce-status -i | grep ncurses
If you run the command "cmake -LAH --blah --blah" it will output a list of configure switches - perhaps one of them might allow you to tell cmake where the ncurses headers and libraries are?
-
Try this:
-DCURSES_CURSES_LIBRARY=/usr/local/lib/libncurses.so -DCURSES_FORM_LIBRARY=/usr/local/lib/libform.so -DCURSES_INCLUDE_PATH=/usr/local/include -DCURSES_NCURSES_LIBRARY=/usr/local/lib/libncurses.so
-
Hi juanito,
After I run this command -DCURSES_CURSES_LIBRARY=/usr/local/lib/libncurses.so -DCURSES_FORM_LIBRARY=/usr/local/lib/libform.so -DCURSES_INCLUDE_PATH=/usr/local/include -DCURSES_NCURSES_LIBRARY=/usr/local/lib/libncurses.so
It said that it didn't find libcurses.so
So I searched in /usr/local/lib to see if I have something with curses in it and i've got this :
libncurses++w.so
libncurses++w.so.6
libncurses++w.so.6.2
libncursesw.so
libncursesw.so.6
libncursesw.so.6.2
So I was wondering wich one should I used ?
-
Ah, sorry I was ssh'd into piCore, but looked on the local machine..
Try: -DCURSES_CURSES_LIBRARY=/usr/local/lib/libncursesw.so -DCURSES_FORM_LIBRARY=/usr/local/lib/libformw.so -DCURSES_INCLUDE_PATH=/usr/local/include/ncursesw -DCURSES_NCURSES_LIBRARY=/usr/local/lib/libncursesw.so
-
Hi juanito,
I also tried this but still he can't found it
I get this error :
-sh: -DCURSES_CURSES_LIBRARY=/usr/local/lib/libncursesw.so: not found
-
Update :
I tried to run this :
sudo cmake \-DCURSES_CURSES_LIBRARY=/usr/local/lib/libncursesw.so \-DCURSES_FORM_LIBRARY=/usr/local/lib/libformw.so \-DCURSES_INCLUDE_PATH=/usr/local/include/ncursesw \-DCURSES_NCURSES_LIBRARY=/usr/local/lib/libncursesw.so
And now I get this error :
Cmake Error at storage/xtradb/CMakeLists.txt:507 (MESSAGE):
Percona XtraDB is not supported on this plateform
-
I see there's a mention of that here: http://tinycorelinux.net/7.x/x86_64/tcz/src/mariadb/build-mariadb-10.1.sh
-
Any toughts on this one?
-
Update :
Strange thing appened I just reboot my rasp decompressed my mariadb run the previous command and now it work i'm currently doing my make
-
And now I get this error during the make
-
This looks like mariadb expects an older version of OpenSSL?
You could try a newer version of mariadb?
-
I could but I don't find any version for RPI (or I just don't know) here the link for the version :
https://mariadb.com/downloads/
-
Hi MrToga
There's a more recent version here:
http://tinycorelinux.net/12.x/x86_64/tcz/src/mariadb/
-
Hi guys,
The version Rich linked work but now I got this problem :
During the make I get an error that said I don't have space left on the device I'm currently compiling in /home/tc
The error : /usr/local/bin/Id: final link failed: no space left on device
Where can I compile this to get enough space ?
While using the command df | less I saw that I have 14.4G available on my /mnt/mmblk0p2 can I compile here or I am stuck?
-
Hi MrToga
Yes. Make a directory on /mnt/mmblk0p2 and build it there. The build may take longer, but you should not
run out of space.
-
Do I need to just put my mariadb directory in /mnt/mmblk0p2 ?
-
Hi MrToga
That should be sufficient. What else did you think you might need?
-
Hi Rich,
I get another error :
/home/tc/mariadb-10.5.8/strings/ctype-cp932.c:34891:1: fatal error: error writing to /tmp/cc07N1G8.s : no space left on device
Maybe the make still compile in /home/tc ?
-
Hi MrToga
After you created a source directory and unpacked the source package on /mnt/mmblk0p2 , did you remove
it from /tmp to free up that space?
Also, any commands used for compiling that reference /tmp should be changed to point to /mnt/mmblk0p2.
-
Hi Rich,
Yes I just put my mariadb repertory from /home/tc in /mnt/mmblk0p2 that's why I get another space error but now I decompressed my mariadb in /mnt/mmblk0p2 and do my sudo cmake \-DCURSES_CURSES_LIBRARY=/usr/local/lib/libncursesw.so \-DCURSES_FORM_LIBRARY=/usr/local/lib/libformw.so \-DCURSES_INCLUDE_PATH=/usr/local/include/ncursesw \-DCURSES_NCURSES_LIBRARY=/usr/local/lib/libncursesw.so
and when I do the sudo make I get another error because the make command try to download pcre2-10.34.zip from this link : http://ftp.pcre.org/pub/pcre/pcre2-10.34.zip
But can't get it and i get in return this error :
error: downloading 'http://ftp.pcre.org/pub/pcre/pcre2-10.34.zip' failed
status_code: 6
status_string: "Couldn't resolve host name"
log:
-- LOG BEGIN --
Could not resolve host: fpt.pcre.org
Closing connection 0
-- LOG END --
-
Hi MrToga
Is pcre2-dev.tcz installed?
Also, this link that juanito posted provides some clues in the cmake section:
http://tinycorelinux.net/7.x/x86_64/tcz/src/mariadb/build-mariadb-10.1.sh
It includes the following:
-DWITH_PCRE=system
-
Hi Rich,
After running your command He still can't find pcre2-8
I get this error :
system pcre2-8 library is not found or unusable
But when I search pcre2-8 I found it in /usr/local/lib/libpcre2-8.so
I also tried to do -DWITH_PCRE=/usr/local/lib/libpcre2-8.so
But he still try to download pcre2-10.34.zip
-
Hi MrToga
If that's going to work, you might have to tell it where, not what, like this:
-DWITH_PCRE=/usr/local/lib/
-
I don't think that will work:
// Which pcre to use (possible values are 'bundled', 'system', or 'auto')
WITH_PCRE:STRING=auto
-
Hi Juanito
Well sure, if you're going to look at the source, of course you'll get it right. :)
-
I updated cmake in case that was causing the problem - mariadb-10.5.8 configures for me:
cmake -LAH -DCMAKE_BUILD_TYPE=Release -DFEATURE_SET=xsmall -DMRN_GROONGA_EMBED=OFF -DWITH_SSL=system -DWITH_ZLIB=system -DWITH_PCRE=system -DWITH_READLINE=system -DWITH_EMBEDDED_SERVER=OFF -DMYSQL_MAINTAINER_MODE=OFF -DWITH_SYSTEMD=no -DMYSQL_DATADIR=/home/tc/mysql/data -DCMAKE_VERBOSE_MAKEFILE=TRUE -DCMAKE_CXX_FLAGS_RELEASE="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe -DNDEBUG" -DCMAKE_C_FLAGS_RELEASE="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe -DNDEBUG" -DCURSES_CURSES_LIBRARY=/usr/local/lib/libncursesw.so -DCURSES_FORM_LIBRARY=/usr/local/lib/libformw.so -DCURSES_INCLUDE_PATH=/usr/local/include -DCURSES_NCURSES_LIBRARY=/usr/local/lib/libncursesw.so ../
..using groonga-CMakeLists.txt.patch and editing libmariadb/cmake/ConnectorName.cmake line 25 to read ENDIF()
-
Hi,
After I add juanito's command in my cmake like this :
sudo cmake \-DCURSES_CURSES_LIBRARY=/usr/local/lib/libncursesw.so \-DCURSES_FORM_LIBRARY=/usr/local/lib/libformw.so \-DCURSES_INCLUDE_PATH=/usr/local/include/ncursesw \-DCURSES_NCURSES_LIBRARY=/usr/local/lib/libncursesw.so \-WITH_PCRE:STRING=auto
and I install curl-dev.
I'm currently doing the make and it's seem to keep going, he doesn't try to download pcre2 anymore
-
Hi MrToga
If you are putting everything on 1 line, you should not include the \ character.
Placing it at the end of a line like this tells the system "ignore this carriage return, I'm not done":
sudo cmake \
-DCURSES_CURSES_LIBRARY=/usr/local/lib/libncursesw.so \
-DCURSES_FORM_LIBRARY=/usr/local/lib/libformw.so \
-DCURSES_INCLUDE_PATH=/usr/local/include/ncursesw \
-DCURSES_NCURSES_LIBRARY=/usr/local/lib/libncursesw.so \
-WITH_PCRE:STRING=auto
Placing the \ character anyplace else has a completely different meaning and can change the outcome of your command.
-
Hi guys,
After removing all the \ characters from my previous command and done à sudo make I get an error at the end of the make
Here the attached file
I also find out that in my mariadb/client/mysql.cc there is a line where the error occurs is :
static void my_vidattr(chtype attrs)
{
if (have_curses)
vidattr(attrs);
}
Maybe my ncurses.tcz is outdated ?
Any toughts ?
[attachment deleted by admin]
-
I gave it a try and the build failed at 97% done with:
mariadb-10.5.8/client/mysql.cc:105:13: error: variable or field 'my_vidattr' declared void
105 | static void my_vidattr(chtype attrs)
I'd guess this is something to do with -std=gnu++11, gcc and the code used.
You could try a more recent version of mariadb?
-
Where can I found an newer version it doesn't seem to be a newer version for tiny core
-
I found where I can download some newer version of mariadb : https://mariadb.com/kb/en/mariadb-server-10-7-3/
I'm gonna try it with the 10.7.3 version
-
Update :
I still have the same error with the version 10.7.3
-
At 74% I get
/usr/local/bin/ld: ../lib/libgroonga.so: undefined reference to `provider_service_lz4_static'
collect2: error: ld returned 1 exit status
-
Strange I didn't get that
My error was at 96% :
error : variable or field 'my_vidattr' declared void
like the last version
Maybe you didn't install liblz4.tcz ?
-
Update :
I found something to make the copilation work
You need to write #undef HAVE_VIDATR
in /mariadb/client/mysql.cc above the line #ifdef HAVE_VIDATR
So I was wondering maybe in the cmake there's an option to configure this variable
-
The available options are listed with cmake -LAH
-
I was also wondering if I can increase the size of a repertory on tinyCore because during my make install my repertory /tmp doesn't have enough space to handle mariaDB.
Is it possible ?
-
Hi MrToga
/tmp is located in RAM, as is most of the file system. Create a work directory in /mnt/mmblk0p2 if you are
running out of space.
... You need to write #undef HAVE_VIDATR
in /mariadb/client/mysql.cc above the line #ifdef HAVE_VIDATR ...
That may not be a good idea. HAVE_VIDATR is also referenced in cmake/readline.cmake.
Open the config.h.cmake file and see if changing this:
#cmakedefine HAVE_VIDATTR 1
to this:
#cmakedefine HAVE_VIDATTR 0
makes the error go away.
-
I finally got mariadb-10.5.8 to build, see attached
-
Hi juanito,
Thanks for sharing but I gave up the idea of mariadb because during the make install I don't have enough space on my RAM to have mariaDB on my RPI3.
So I'm using sqlite3 instead with phpliteadmin to have a GUI (link here if you want : https://bitbucket.org/phpliteadmin/public/downloads/)
Thank for all.
-
I agree mariadb is heavy for a RPi3, but once it’s made into an extension it won’t use much ram.
-
mariadb extensions posted anyway - are you going to submit apache, libonig and php extensions?
-
Hi Juanito,
I can submit you apache but for php I just created a php.tcz I don't have another thing (same goes for libonig I just have onig.tcz) is it okay ?
But where do I submit ?
-
See: https://web.archive.org/web/20191011054952/http://wiki.tinycorelinux.net/wiki:creating_extensions
Submit the extensions to tcesubmit@gmail.com
-
php7 apache onig and libmcrypt submitted
-
Posted - thank you for your contribution :)
-
My pleasure ;D