Project announcement: libcmini

C and PASCAL (or any other high-level languages) in here please

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 842
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: Project announcement: libcmini

Post by mfro »

wongck wrote:Thank you for the excellent small lib.
Sorry for my lack of knowledge on Github, but these are sources and there is no ready to use Lib.
Is that true or am I looking at the wrong place?
Thank you for your interest in libcmini.
Yes. Currently, there is no binary distribution available. I'm still working on it.

There is an automated build process on each check-in using travis-ci already (stolen from EmuTOS), but I don't have a good concept distributing the result yet, need to figure out all that github stuff myself first. Until then, it's just a matter of three commands to build it:

Code: Select all

git clone https://github.com/mfro0/libcmini
cd libcmini
make

ThorstenOtto
Atari God
Atari God
Posts: 1074
Joined: Sun Aug 03, 2014 5:54 pm

Re: Project announcement: libcmini

Post by ThorstenOtto »

mfro wrote:but I don't have a good concept distributing the result yet, need to figure out all that github stuff myself first.
Basically, you have three choices
  1. deploy it to a separate host. This is done e.g. in the EmuTOS repo (deploying to the old SF repo), and in Aranym (deploying to bintray).
  2. deploy it to a different repo, using the same account on github. This is what freemint currently does, but since this it is just another git repo, this will be just a new commit, and the repo will constantly grow even if you delete old images before committing.
  3. deploy it to a separate branch in the same repo. This is what I'm currently doing in my RscView repo (https://github.com/th-otto/rscview). The builds branch there only contains the binaries, not the sources from master. But you have to be careful with the travis settings, otherwise any commit to that branch will trigger another build, resulting in an endless build loop.
Feel free to ask any questions if you need help with this.

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 842
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: Project announcement: libcmini

Post by mfro »

ThorstenOtto wrote:
mfro wrote:but I don't have a good concept distributing the result yet, need to figure out all that github stuff myself first.
Basically, you have three choices
Thank you. Actually, I'm aiming for the fourth one ;).

Not really different from what you suggest, but since github appears to create a source archive on release anyway, I'm trying to stuff my binary release in there as well (seems to be the natural choice for a library anyway).
I just need to find a good way to do this.

ThorstenOtto
Atari God
Atari God
Posts: 1074
Joined: Sun Aug 03, 2014 5:54 pm

Re: Project announcement: libcmini

Post by ThorstenOtto »

mfro wrote:I just need to find a good way to do this.
If you find one, let me know ;) I've already tried this, and it does not seem to be possible, because you don't have direct access to the directories where the repo is stored on the server. And the source archives that appear there are only build when you create a tag, something that you most likely don't want to do for automatic builds.

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 842
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: Project announcement: libcmini

Post by mfro »

ThorstenOtto wrote:
mfro wrote:I just need to find a good way to do this.
If you find one, let me know ;) I've already tried this, and it does not seem to be possible, because you don't have direct access to the directories where the repo is stored on the server. And the source archives that appear there are only build when you create a tag, something that you most likely don't want to do for automatic builds.
This appears to work now as I wanted it. Whenever I do a tagged commit (release), the installation files get deployed into the corresponding github release.

Repository growth avoided, target achieved ;)

Binary files can be found here: https://github.com/mfro0/libcmini/releases

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12882
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: Project announcement: libcmini

Post by wongck »

mfro wrote: Binary files can be found here: https://github.com/mfro0/libcmini/releases
WOW... that's quick.
Great stuff !!! Thanks !!!
My Stuff: FB/Falcon CT63 CTPCI ATI RTL8139 USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list

ThorstenOtto
Atari God
Atari God
Posts: 1074
Joined: Sun Aug 03, 2014 5:54 pm

Re: Project announcement: libcmini

Post by ThorstenOtto »

mfro wrote:Whenever I do a tagged commit (release), the installation files get deployed into the corresponding github release.
Yes, this was the problem i encountered. You can use it for releases, but not for snapshot builds like eg. used in Freemint or Aranym.

But grats that you found a quick solution for your case ;)

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 842
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: Project announcement: libcmini

Post by mfro »

ThorstenOtto wrote:... You can use it for releases, but not for snapshot builds like eg. used in Freemint or Aranym ...
Maybe that's (one of) the reason(s) we didn't see a new release for both since years? :D

Seriously, for a library project like libcmini, this process seems ideal to me. You'll need to dig out your compiler to do something useful with it anyway, so there isn't much extra effort if you want to update between releases.

mikro
Hardware Guru
Hardware Guru
Posts: 2160
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: Project announcement: libcmini

Post by mikro »

Btw if you would like your SVN tree, just let me know -- I have a dump of all AtariForge SVN repos.

LuigiThirty
Atari maniac
Atari maniac
Posts: 97
Joined: Sat Sep 03, 2016 12:20 am

Re: Project announcement: libcmini

Post by LuigiThirty »

Awesome!

User avatar
willy
Atari freak
Atari freak
Posts: 72
Joined: Fri Apr 05, 2013 2:38 pm

Re: Project announcement: libcmini

Post by willy »

Hi.

I'm using gcc 8.3 without mintlib (not necessary for assembler), now i want to use libcmini.
I compiled everything but test compilation fails because of missing gem.h
What do i need installed to compile/use libcmini?

Code: Select all

CC objs/acctest.o
sources/acctest.c:10:10: fatal error: gem.h: No such file or directory
 #include <gem.h>
          ^~~~~~~
How to fix that without installing a whole mint subsystem ?

Thanks in advance.

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 842
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: Project announcement: libcmini

Post by mfro »

Thank you for your interest in libcmini.
willy wrote: How to fix that without installing a whole mint subsystem ?

Thanks in advance.
You do not need the whole 'mint subsystem', gemlib should be enough. If you do not want to install that either, you can still skip the build of the test programs:

Code: Select all

make libs startups
should do it.
Note that I didn't test libcmini with gcc 8.3 (only 4.6.4), so here be dragons (although I wouldn't expect too many problems).

User avatar
willy
Atari freak
Atari freak
Posts: 72
Joined: Fri Apr 05, 2013 2:38 pm

Re: Project announcement: libcmini

Post by willy »

I'm not afraid of dragons ... but little bugs ;)
make libs startups install-libs install-startup
did the job
willy@willy-mietus ~/src/falcon/libcminitest $ ll
total 12
drwxrwxr-x 2 willy willy 4096 Aug 31 19:02 ./
drwxr-xr-x 9 willy willy 4096 Aug 31 18:39 ../
-rw-r--r-- 1 willy willy 85 Aug 31 18:39 hello.c
willy@willy-mietus ~/src/falcon/libcminitest $ cat hello.c
#include <stdio.h>

int main(int argc, char *argv[])
{
printf("hello world\n");
}
willy@willy-mietus ~/src/falcon/libcminitest $ m68k-atari-mint-gcc -m68020-60 -nostdlib $LIBCMINI/startup.o hello.c -o hello.tos -s -L$LIBCMINI -lcmini -lgcc
willy@willy-mietus ~/src/falcon/libcminitest $ ll
total 16
drwxrwxr-x 2 willy willy 4096 Aug 31 19:02 ./
drwxr-xr-x 9 willy willy 4096 Aug 31 18:39 ../
-rw-r--r-- 1 willy willy 85 Aug 31 18:39 hello.c
-rwxrwxr-x 1 willy willy 3388 Aug 31 19:02 hello.tos*
willy@willy-mietus ~/src/falcon/libcminitest $ m68k-atari-mint-gcc --version
m68k-atari-mint-gcc (MiNT 20190223) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

willy@willy-mietus ~/src/falcon/libcminitest $
Thank You. Nice job.

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 842
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

libcmini: new release 0.5

Post by mfro »

Thanks to diligent contributors (thank you), libcmini received some new functionality and bug fixes which deserve a release. You can find it at the usual place:

Git repository:
https://github.com/mfro0/libcmini

Combined Source/Binary release files:
https://github.com/mfro0/libcmini/releases

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 842
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

libcmini: now a member of the FreeMiNT github organization

Post by mfro »

If you miss libcmini - it's now here:

https://github.com/freemint/libcmini

integrated into the freemint organization

User avatar
Count
Atari freak
Atari freak
Posts: 64
Joined: Sat Sep 16, 2017 9:15 am
Location: Germany

Re: Project announcement: libcmini

Post by Count »

Maybe it's time for a minor release 0.51 since some significant bugs have been fixed since the last release.

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 842
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: Project announcement: libcmini

Post by mfro »

Count wrote:Maybe it's time for a minor release 0.51 since some significant bugs have been fixed since the last release.
Yes, why not. But we first need to make sure the CI processes work again.

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 842
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: Project announcement: libcmini

Post by mfro »

Done. Binary release (0.51) can be found here:

https://github.com/freemint/libcmini/releases

User avatar
paulwratt
Atari freak
Atari freak
Posts: 66
Joined: Sat Dec 27, 2008 10:16 am

Re: Project announcement: libcmini

Post by paulwratt »

Anyone not on 'i386' or 'amd64' can use the following script to build Vincent's 'cross-mint':
https://gist.github.com/paulwratt/b4019 ... a34d3d36f1

it should even work on 'm68k-linux'. its not intellegent, if you see an error fly by it will be a build depends (but I think I got them all). script is for debian based OS, but outputs enough '--info' for someone to do it by hand (on different OS, like Haiku or RPM based, probably even RiscOS and Amiga - you just need a GCC toolchain)

NOTE: if you can figure out 'install_fake()' then you can do the same for all the libs, instead of building from source, but you still have to build 'binutils', 'mintbin' and 'gcc' for the local host. theres a post on mint mailing list that contains more details. you can remark (#) the 2nd 'gcc' build if you want to speed things up. If you install everything and then build 'libcmini' remember to rename (or copy) '/usr/m68k-atari-mint/lib/crt0.o' before and after (they are different)

EDIT: its possible that Vincent's GCC also supports the 'fastcall' mention in the 'libcmini' readme, but I have not verified that yet.

Cheers

Paul

ThorstenOtto
Atari God
Atari God
Posts: 1074
Joined: Sun Aug 03, 2014 5:54 pm

Re: Project announcement: libcmini

Post by ThorstenOtto »

its possible that Vincent's GCC also supports the 'fastcall' mention in the 'libcmini' readme, but I have not verified that yet.
Nope. it doesn't. The gcc 4.6.4 from my site has the patches applied (originally found in Peylow's branch]), but i would still consider that patches experimental. Especially, it only works with all libraries in question compiled with --mfastcall, which only works with libcmini, and rules out mintlib and any other library like libz or pnglib.

PS: i don't quite understand the purpose of your script. Especially, using the PPA as source archives does not make much sense to me, you should rather be using source snapshots of the respective repositories from freemint, since the versions in launchpad are somewhat outdated.

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 842
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: Project announcement: libcmini

Post by mfro »

ThorstenOtto wrote: Nope. it doesn't. The gcc 4.6.4 from my site has the patches applied (originally found in Peylow's branch]), but i would still consider that patches experimental.
I've tested it with my own build as well and the advertised speed improvement (+ a little slimmer in size) is indeed there.

Not usable for me personally, however (even if I'd be willing to rebuild all my libs) because the fastcall compiler crashes when trying to build ColdFire code (at least for me).

agranlund
Atari User
Atari User
Posts: 38
Joined: Sun Aug 04, 2019 1:49 pm

Re: Project announcement: libcmini

Post by agranlund »

Just wanted to pop in and express my gratitude for libcmini.
I'm using it for the ScummVM port, at first with Vincents gcc-4.6.4 and now with ThorstenOtto's gcc-9.3.1
It really makes a difference bringing down the size of the executable.

(Also a big thank you for supplying Mac builds of your newer gcc versions ThorstenOtto!)

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 842
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: Project announcement: libcmini

Post by mfro »

agranlund wrote:
Wed Jul 01, 2020 9:37 am
Just wanted to pop in and express my gratitude for libcmini.
I'm using it for the ScummVM port, at first with Vincents gcc-4.6.4 and now with ThorstenOtto's gcc-9.3.1
It really makes a difference bringing down the size of the executable.

(Also a big thank you for supplying Mac builds of your newer gcc versions ThorstenOtto!)
Thanks for your positive feedback! Appreciate if you find libcmini useful, that really raises motivation (and that surely applies to Thorsten as well).

Post Reply

Return to “C / PASCAL etc.”