Tiny Core Linux
Tiny Core Base => Corepure64 => Topic started by: ajschorr on December 06, 2024, 09:40:18 AM
-
Hi, I'm using Core Pure 64 for system rescue. My server wedged a few weeks ago,
and I had to hard power cycle it, and an XFS filesystem got corrupted. I thought
I could boot into Tinycore to run xfs_repair, but it seems that the version in Tinycore
is way too old. Inside Tinycore 15.0, I'm seeing xfsprogs 4.5.0, whereas in RHEL 9,
xfsprogs is at version 6.4.0. Is there any way of getting Tinycore xfsprogs brought
up to date? 4.5.0 seems very stale. Am I doing something wrong?
Thanks,
Andy
-
I won’t be able to update the extension before 7-10 days, if you need it before then you could try building it yourself?
-
Hi, thanks for responding. It is not super urgent, but I did think of trying to build a newer version
myself. The problem is that I don't have the slightest idea how to do this. Is there a wiki page
that explains the process? I'd be happy to give it a shot.
Thanks,
Andy
-
Hi ajschorr
These are the most recent build notes for x86_64:
http://tinycorelinux.net/8.x/x86_64/tcz/src/xfsprogs
The build notes here are more recent and more detailed:
http://tinycorelinux.net/13.x/aarch64/tcz/src/xfsprogs
They are for 64 bit ARM, so you need to change CFLAGS
and CXXFLAGS to something like this:
CFLAGS='-mtune=generic -Os -pipe -flto -fuse-linker-plugin -fno-exceptions'
CXXFLAGS='-mtune=generic -Os -pipe -flto -fuse-linker-plugin -fno-exceptions -fno-rtti'
You also need to load the dependencies:
tce-load -wil compiletc docbook-xsl gettext gzip llvm-bin
inih-dev doesn't exist in Tinycore 15 x86_64.
urcu-dev doesn't exist either, but userspace-rcu-dev might suffice.
It's possible you might not need those 2 if you skip running:
make DESTDIR=/tmp/packing-xfsprogs-dev install-dev
-
Hi, thanks. I'm trying to build in tinycore 15.0 running inside
qemu-kvm, and clearly I'm pretty clueless about this process. I did the
following:
tce-load -wil compiletc docbook-xsl gettext gzip llvm-bin
That mostly worked, but for this error:
Downloading: docbook-xsl.tcz
Connecting to repo.tinycorelinux.net (128.127.66.77:80)
wget: server returned error: HTTP/1.1 404 Not Found
md5sum: docbook-xsl.tcz.md5.txt: No such file or directory
Error on docbook-xsl.tcz
I then set CFLAGS & CXXFLAGS as per your suggestion:
CFLAGS='-mtune=generic -Os -pipe -flto -fuse-linker-plugin -fno-exceptions'
CXXFLAGS='-mtune=generic -Os -pipe -flto -fuse-linker-plugin -fno-exceptions -fno-rtti'
export CFLAGS CXXFLAGS
And I threw in LDFLAGS from the ARM example:
LDFLAGS='-Wl,-O1'
export LDFLAGS
But configure is crapping out:
checking for msgfmt... /usr/local/bin/msgfmt
checking for msgmerge... /usr/local/bin/msgmerge
checking for xgettext... /usr/local/bin/xgettext
checking for rpm... /bin/rpm
/bin/rpm: invalid option -- '-'
BusyBox v1.36.1 (2024-01-28 10:23:59 UTC) multi-call binary.
Usage: rpm -i PACKAGE.rpm; rpm -qp[ildc] PACKAGE.rpm
Manipulate RPM packages
Commands:
-i Install package
-qp Query package
-qpi Show information
-qpl List contents
-qpd List documents
-qpc List config files
./configure: line 15534: test: -ge: unary operator expected
checking for ini.h... no
FATAL ERROR: could not find a valid ini.h header.
Install the libinih development package.
Which seems to get back to the lack of inih-devel.
I tried this as well:
tce-load -wil rpm
That fixed the rpm complaint, but configure still craps out with:
checking for rpm... /usr/local/bin/rpm
checking for rpmbuild... /usr/local/bin/rpmbuild
checking for ini.h... no
FATAL ERROR: could not find a valid ini.h header.
Install the libinih development package.
Any pointers on how it might be possible to move forward? Do I need
to attempt to build that package as a prerequisite?
Thanks,
Andy
-
I managed to build inih-r49, like so (possibly totally incorrectly):
meson --prefix=/usr/local . redhat-linux-build -Ddefault_library=shared -Ddistro_install=true
meson compile -C redhat-linux-build --verbose
su root
meson install -C redhat-linux-build --no-rebuild
I then reran in xfsprogs-6.4.0:
./configure --prefix=/usr/local
But it crapped out again:
checking for uuid_compare... no
checking for uuid_compare in -luuid... yes
checking for pthread.h... yes
checking for pthread_mutex_init in -lpthread... yes
checking for urcu.h... no
checking for urcu.h... (cached) no
FATAL ERROR: could not find a valid urcu header. It seems like I'll need that as well, unless there's
a configure option to avoid the requirement. But I don't see one...
Regards,
Andy
-
Hi ajschorr
Build notes for urcu:
http://tinycorelinux.net/13.x/aarch64/tcz/src/urcu/
Once again, modify the flags.
I thought you were working 64 bit, not 32 bit.
The flags for 32 bit should be:
CFLAGS='-march=i486 -mtune=i686 -Os -pipe -flto -fuse-linker-plugin -fno-exceptions'
CXXFLAGS='-march=i486 -mtune=i686 -Os -pipe -flto -fuse-linker-plugin -fno-exceptions -fno-rtti'
LDFLAGS='-Wl,-O1'
export CFLAGS CXXFLAGS LDFLAGS
This:
P=/usr/local/libexec/gcc/aarch64-unknown-linux-gnu/10.2.0/liblto_plugin.so.0.0.0
should probably be changed to:
P=/usr/local/lib/gcc/i486-pc-linux-gnu/13.2.0/liblto_plugin.so
-
Hi ajschorr
... This:
P=/usr/local/libexec/gcc/aarch64-unknown-linux-gnu/10.2.0/liblto_plugin.so.0.0.0
should probably be changed to:
P=/usr/local/lib/gcc/i486-pc-linux-gnu/13.2.0/liblto_plugin.so
Forget that. It looks like gcc has that library in the right location in TC15 x86.
So skip this part:
# fix lto
P=/usr/local/libexec/gcc/aarch64-unknown-linux-gnu/10.2.0/liblto_plugin.so.0.0.0
sudo mkdir -p /usr/local/lib/bfd-plugins
sudo ln -sfv $P /usr/local/lib/bfd-plugins/liblto_plugin.so
-
Oops, I am 64-bit, not 32-bit. What did I do wrong that implied 32 bits?
I basically have no idea what I'm doing. I generally don't use TC
except as a rescue shell. Normally, I use RHEL 9. So I'm fairly
clueless and probably making lots of mistakes.
Regards,
andy
-
Hi ajschorr
In your original post you mentioned Core Pure 64.
Then when you mentioned "tinycore 15.0 running inside qemu-kvm"
I somehow got it in my head you were running 32 bit. Sorry, my mistake.
The flags for 64 bit should be:
CFLAGS='-mtune=generic -Os -pipe -flto -fuse-linker-plugin -fno-exceptions'
CXXFLAGS='-mtune=generic -Os -pipe -flto -fuse-linker-plugin -fno-exceptions -fno-rtti'
LDFLAGS='-Wl,-O1'
export CFLAGS CXXFLAGS LDFLAGS
Skip this part of the build notes:
# fix lto
P=/usr/local/libexec/gcc/aarch64-unknown-linux-gnu/10.2.0/liblto_plugin.so.0.0.0
sudo mkdir -p /usr/local/lib/bfd-plugins
sudo ln -sfv $P /usr/local/lib/bfd-plugins/liblto_plugin.so
-
OK, thanks, I think I'm starting to get the idea. If I can come up with recipes
for building inih, urcu, and xfsprogs, are these instructions accurate for how to
build the package and submit?
https://wiki.tinycorelinux.net/doku.php?id=wiki:creating_extensions
Or is my goal just to come up with the recipes for building the packages, and
then somebody else packages it up?
Thanks,
Andy
-
Up to you - I can do it in a couple of days time.
-
That will surely be far more efficient. I'm OK with taking a swing at it if you're too busy, but I'm also far
less likely to get it right. If you have the time to do it, it would be much appreciated...
Thanks,
Andy
-
xfsprogs posted
-
Thank you so much. I see it is now xfsprogs 6.12.0. This is fantastic. Much appreciated.
Regards,
Andy